* [PATCH] retry HARDWARE ERROR for IBM ESS
@ 2004-11-19 17:50 Martin Peschke3
2004-11-19 19:10 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: Martin Peschke3 @ 2004-11-19 17:50 UTC (permalink / raw)
To: linux-scsi
Under certain conditions IBM's Enterprise Storage Server returns sense data
HARDWARE ERROR - INTERNAL TARGET FAILURE, while it wants the OS
to retry the very command.
Although this is apparently a firmware issue (ABORTED COMMAND would be
an appropriate choice), a Linux workaround would be needed to handle it.
It doesn't look like we'll ever get hold of a firmware fix for the model
addressed
by the patch below.
Martin
Signed-off-by: Martin Peschke <mpeschke@de.ibm.com>
--- linux-2.6/drivers/scsi/scsi_error.c 2004-11-19 18:38:45.000000000 +0000
+++ linux-2.6/drivers/scsi/scsi_error.c 2004-11-19 18:39:04.000000000 +0000
@@ -325,10 +325,16 @@
case MEDIUM_ERROR:
return NEEDS_RETRY;
+ case HARDWARE_ERROR:
+ if ((strncmp(SCpnt->device->vendor, "IBM", 3) == 0) &&
+ (strncmp(SCpnt->device->model, "2105", 4) == 0))
+ return NEEDS_RETRY;
+ else
+ return SUCCESS;
+
case ILLEGAL_REQUEST:
case BLANK_CHECK:
case DATA_PROTECT:
- case HARDWARE_ERROR:
default:
return SUCCESS;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] retry HARDWARE ERROR for IBM ESS
2004-11-19 17:50 Martin Peschke3
@ 2004-11-19 19:10 ` Christoph Hellwig
0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2004-11-19 19:10 UTC (permalink / raw)
To: Martin Peschke3; +Cc: linux-scsi
> + case HARDWARE_ERROR:
> + if ((strncmp(SCpnt->device->vendor, "IBM", 3) == 0) &&
> + (strncmp(SCpnt->device->model, "2105", 4) == 0))
> + return NEEDS_RETRY;
> + else
> + return SUCCESS;
> +
please don't hardcode models deep inside the scsu layer. Add a new
blacklist flags and set it from the table in scsi_devinfo.c
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] retry HARDWARE ERROR for IBM ESS
@ 2004-12-10 21:15 Martin Peschke3
2004-12-11 5:36 ` James Bottomley
0 siblings, 1 reply; 4+ messages in thread
From: Martin Peschke3 @ 2004-12-10 21:15 UTC (permalink / raw)
To: James.Bottomley; +Cc: linux-scsi
James,
I did not see objections to the patch below. Please apply.
Martin
Signed-off-by: Martin Peschke <mpeschke@de.ibm.com>
diff -ur scsi-rc-fixes-2.6-ref/drivers/scsi/scsi_devinfo.c scsi-rc-fixes-2.6/drivers/scsi/scsi_devinfo.c
--- scsi-rc-fixes-2.6-ref/drivers/scsi/scsi_devinfo.c 2004-12-10 21:50:00.000000000 +0000
+++ scsi-rc-fixes-2.6/drivers/scsi/scsi_devinfo.c 2004-12-10 22:03:01.000000000 +0000
@@ -159,6 +159,7 @@
{"HP", "C3323-300", "4269", BLIST_NOTQ},
{"IBM", "AuSaV1S2", NULL, BLIST_FORCELUN},
{"IBM", "ProFibre 4000R", "*", BLIST_SPARSELUN | BLIST_LARGELUN},
+ {"IBM", "2105", NULL, BLIST_RETRY_HWERROR},
{"iomega", "jaz 1GB", "J.86", BLIST_NOTQ | BLIST_NOLUN},
{"IOMEGA", "Io20S *F", NULL, BLIST_KEY},
{"INSITE", "Floptical F*8I", NULL, BLIST_KEY},
diff -ur scsi-rc-fixes-2.6-ref/drivers/scsi/scsi_error.c scsi-rc-fixes-2.6/drivers/scsi/scsi_error.c
--- scsi-rc-fixes-2.6-ref/drivers/scsi/scsi_error.c 2004-12-10 21:50:00.000000000 +0000
+++ scsi-rc-fixes-2.6/drivers/scsi/scsi_error.c 2004-12-10 22:03:03.000000000 +0000
@@ -31,6 +31,7 @@
#include <scsi/scsi_host.h>
#include <scsi/scsi_ioctl.h>
#include <scsi/scsi_request.h>
+#include <scsi/scsi_devinfo.h>
#include "scsi_priv.h"
#include "scsi_logging.h"
@@ -325,10 +326,18 @@
case MEDIUM_ERROR:
return NEEDS_RETRY;
+ case HARDWARE_ERROR:
+ if (scsi_get_device_flags(scmd->device,
+ scmd->device->vendor,
+ scmd->device->model)
+ & BLIST_RETRY_HWERROR)
+ return NEEDS_RETRY;
+ else
+ return SUCCESS;
+
case ILLEGAL_REQUEST:
case BLANK_CHECK:
case DATA_PROTECT:
- case HARDWARE_ERROR:
default:
return SUCCESS;
}
diff -ur scsi-rc-fixes-2.6-ref/include/scsi/scsi_devinfo.h scsi-rc-fixes-2.6/include/scsi/scsi_devinfo.h
--- scsi-rc-fixes-2.6-ref/include/scsi/scsi_devinfo.h 2004-12-10 21:50:32.000000000 +0000
+++ scsi-rc-fixes-2.6/include/scsi/scsi_devinfo.h 2004-12-10 22:03:04.000000000 +0000
@@ -27,4 +27,5 @@
#define BLIST_NOT_LOCKABLE 0x80000 /* don't use PREVENT-ALLOW commands */
#define BLIST_NO_ULD_ATTACH 0x100000 /* device is actually for RAID config */
#define BLIST_SELECT_NO_ATN 0x200000 /* select without ATN */
+#define BLIST_RETRY_HWERROR 0x400000 /* retry HARDWARE_ERROR */
#endif
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] retry HARDWARE ERROR for IBM ESS
2004-12-10 21:15 [PATCH] retry HARDWARE ERROR for IBM ESS Martin Peschke3
@ 2004-12-11 5:36 ` James Bottomley
0 siblings, 0 replies; 4+ messages in thread
From: James Bottomley @ 2004-12-11 5:36 UTC (permalink / raw)
To: Martin Peschke3; +Cc: SCSI Mailing List
On Fri, 2004-12-10 at 22:15 +0100, Martin Peschke3 wrote:
> I did not see objections to the patch below. Please apply.
It looks like your mailer converted tabs to spaces. Could you resend
unmangled with a nice change log?
Thanks,
James
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-12-11 5:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-10 21:15 [PATCH] retry HARDWARE ERROR for IBM ESS Martin Peschke3
2004-12-11 5:36 ` James Bottomley
-- strict thread matches above, loose matches on Subject: below --
2004-11-19 17:50 Martin Peschke3
2004-11-19 19:10 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox