Commit ecac3922 authored by Alan Stern's avatar Alan Stern Committed by James Bottomley

[PATCH] Retry supposedly "unrecoverable" hardware errors

This is an updated and unmangled version of the patch sent in by Martin
Peschke.  Apparently some drives report Hardware Error sense for
problems which do improve after retrying, so the patch retries these
supposedly "unrecoverable" errors for such devices.

In addition to the IBM ESS drive it adds a blacklist entry for the drive
inside the MPIO HS200 Gigabox.
Signed-off-by: default avatarMartin Peschke <mpeschke@de.ibm.com>
Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent cb406274
...@@ -159,6 +159,7 @@ static struct { ...@@ -159,6 +159,7 @@ static struct {
{"HP", "C3323-300", "4269", BLIST_NOTQ}, {"HP", "C3323-300", "4269", BLIST_NOTQ},
{"IBM", "AuSaV1S2", NULL, BLIST_FORCELUN}, {"IBM", "AuSaV1S2", NULL, BLIST_FORCELUN},
{"IBM", "ProFibre 4000R", "*", BLIST_SPARSELUN | BLIST_LARGELUN}, {"IBM", "ProFibre 4000R", "*", BLIST_SPARSELUN | BLIST_LARGELUN},
{"IBM", "2105", NULL, BLIST_RETRY_HWERROR},
{"iomega", "jaz 1GB", "J.86", BLIST_NOTQ | BLIST_NOLUN}, {"iomega", "jaz 1GB", "J.86", BLIST_NOTQ | BLIST_NOLUN},
{"IOMEGA", "Io20S *F", NULL, BLIST_KEY}, {"IOMEGA", "Io20S *F", NULL, BLIST_KEY},
{"INSITE", "Floptical F*8I", NULL, BLIST_KEY}, {"INSITE", "Floptical F*8I", NULL, BLIST_KEY},
...@@ -192,6 +193,7 @@ static struct { ...@@ -192,6 +193,7 @@ static struct {
{"SMSC", "USB 2 HS-CF", NULL, BLIST_SPARSELUN | BLIST_INQUIRY_36}, {"SMSC", "USB 2 HS-CF", NULL, BLIST_SPARSELUN | BLIST_INQUIRY_36},
{"SONY", "CD-ROM CDU-8001", NULL, BLIST_BORKEN}, {"SONY", "CD-ROM CDU-8001", NULL, BLIST_BORKEN},
{"SONY", "TSL", NULL, BLIST_FORCELUN}, /* DDS3 & DDS4 autoloaders */ {"SONY", "TSL", NULL, BLIST_FORCELUN}, /* DDS3 & DDS4 autoloaders */
{"ST650211", "CF", NULL, BLIST_RETRY_HWERROR},
{"SUN", "T300", "*", BLIST_SPARSELUN}, {"SUN", "T300", "*", BLIST_SPARSELUN},
{"SUN", "T4", "*", BLIST_SPARSELUN}, {"SUN", "T4", "*", BLIST_SPARSELUN},
{"TEXEL", "CD-ROM", "1.06", BLIST_BORKEN}, {"TEXEL", "CD-ROM", "1.06", BLIST_BORKEN},
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <scsi/scsi_host.h> #include <scsi/scsi_host.h>
#include <scsi/scsi_ioctl.h> #include <scsi/scsi_ioctl.h>
#include <scsi/scsi_request.h> #include <scsi/scsi_request.h>
#include <scsi/scsi_devinfo.h>
#include "scsi_priv.h" #include "scsi_priv.h"
#include "scsi_logging.h" #include "scsi_logging.h"
...@@ -350,10 +351,18 @@ static int scsi_check_sense(struct scsi_cmnd *scmd) ...@@ -350,10 +351,18 @@ static int scsi_check_sense(struct scsi_cmnd *scmd)
case MEDIUM_ERROR: case MEDIUM_ERROR:
return NEEDS_RETRY; 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 ILLEGAL_REQUEST:
case BLANK_CHECK: case BLANK_CHECK:
case DATA_PROTECT: case DATA_PROTECT:
case HARDWARE_ERROR:
default: default:
return SUCCESS; return SUCCESS;
} }
......
...@@ -27,4 +27,5 @@ ...@@ -27,4 +27,5 @@
#define BLIST_NOT_LOCKABLE 0x80000 /* don't use PREVENT-ALLOW commands */ #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_NO_ULD_ATTACH 0x100000 /* device is actually for RAID config */
#define BLIST_SELECT_NO_ATN 0x200000 /* select without ATN */ #define BLIST_SELECT_NO_ATN 0x200000 /* select without ATN */
#define BLIST_RETRY_HWERROR 0x400000 /* retry HARDWARE_ERROR */
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment