Skip to contentSkip to conversation

rsxx: Adding EEH check inside cregs timeout.

PATCH In review Philip J. Kelleher 2 participants 2 messages May 28, 2013 – May 29, 2013 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 7/8 rsxx: Adding EEH check inside cregs timeout.

From: Philip J Kelleher <[email protected]>

Unfortunaly, our CPU register path does not do any kind of EEH error checking. So to fix this issue, an ioread32 was added to the CPU register timeout code. This way, the driver can check to see if the timeout was caused by an EEH error or not.

-------------------------------------------------------------------------------

drivers/block/rsxx/cregs.c +9 -0
diff -uprN -X linux-block-vanilla/Documentation/dontdiff linux-block-vanilla/drivers/block/rsxx/cregs.c linux-block/drivers/block/rsxx/cregs.c
@@ -431,6 +431,15 @@ static int __issue_creg_rw(struct rsxx_c
 	*hw_stat = completion.creg_status;
 
 	if (completion.st) {
+		/*
+		 * This read is needed to verify that there has not been any
+		 * extreme errors that might have occurred, i.e. EEH. The
+		 * function iowrite32 will not detect EEH errors, so it is
+		 * necessary that we recover if such an error is the reason
+		 * for the timeout.
+		 */
+		ioread32(card->regmap + SCRATCH);
+
 		dev_warn(CARD_TO_DEV(card),
 			"creg command failed(%d x%08x)\n",
 			completion.st, addr);
#1 lore raw
Quoted 12 lines · Philip J. Kelleher

From: Philip J Kelleher <[email protected]>

Unfortunaly, our CPU register path does not do any kind of EEH error checking. So to fix this issue, an ioread32 was added to the CPU register timeout code. This way, the driver can check to see if the timeout was caused by an EEH error or not.

+++ linux-block/drivers/block/rsxx/cregs.c 2013-05-01 18:59:57.596197150 -0500

drivers/block/rsxx/cregs.c +0 -0
@@ -431,6 +431,15 @@ static int __issue_creg_rw(struct rsxx_c
        *hw_stat = completion.creg_status;

drivers/block/rsxx/cregs.c static int __issue_creg_rw(struct rsxx_c · line 441

Quoted 10 lines
drivers/block/rsxx/cregs.c +8 -0
 
        if (completion.st) {
+               /*
+                * This read is needed to verify that there has not been any
+                * extreme errors that might have occurred, i.e. EEH. The
+                * function iowrite32 will not detect EEH errors, so it is
+                * necessary that we recover if such an error is the reason
+                * for the timeout.
+                */
+               ioread32(card->regmap + SCRATCH);

This is just a dummy read, right? Perhaps you may add this word to the explanation.

--
With Best Regards,
Andy Shevchenko