diff options
| author | Martin K. Petersen <martin.petersen@oracle.com> | 2013-04-24 21:19:47 -0400 |
|---|---|---|
| committer | James Bottomley <JBottomley@Parallels.com> | 2013-06-24 16:00:10 -0400 |
| commit | 56f2a8016e0ab54de8daaac3df4712cad0fcef2e (patch) | |
| tree | 5464d103f595effb8c784d22e8f77a0243a75b41 | |
| parent | c3a634bf78242177fba9c85deb709e7b63ed0ef1 (diff) | |
[SCSI] Workaround for disks that report bad optimal transfer length
Not all disks fill out the VPD pages correctly. Add a blacklist flag
that allows us ignore the SBC-3 VPD pages for a given device. The
BLIST_SKIP_VPD_PAGES flag triggers our existing skip_vpd_pages
scsi_device parameter to bypass VPD scanning.
Also blacklist the offending Seagate drive model.
Reported-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| -rw-r--r-- | drivers/scsi/scsi_devinfo.c | 1 | ||||
| -rw-r--r-- | drivers/scsi/scsi_scan.c | 3 | ||||
| -rw-r--r-- | include/scsi/scsi_devinfo.h | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c index 43fca9170bf2..f969aca0b54e 100644 --- a/drivers/scsi/scsi_devinfo.c +++ b/drivers/scsi/scsi_devinfo.c | |||
| @@ -228,6 +228,7 @@ static struct { | |||
| 228 | {"SanDisk", "ImageMate CF-SD1", NULL, BLIST_FORCELUN}, | 228 | {"SanDisk", "ImageMate CF-SD1", NULL, BLIST_FORCELUN}, |
| 229 | {"SEAGATE", "ST34555N", "0930", BLIST_NOTQ}, /* Chokes on tagged INQUIRY */ | 229 | {"SEAGATE", "ST34555N", "0930", BLIST_NOTQ}, /* Chokes on tagged INQUIRY */ |
| 230 | {"SEAGATE", "ST3390N", "9546", BLIST_NOTQ}, | 230 | {"SEAGATE", "ST3390N", "9546", BLIST_NOTQ}, |
| 231 | {"SEAGATE", "ST900MM0006", NULL, BLIST_SKIP_VPD_PAGES}, | ||
| 231 | {"SGI", "RAID3", "*", BLIST_SPARSELUN}, | 232 | {"SGI", "RAID3", "*", BLIST_SPARSELUN}, |
| 232 | {"SGI", "RAID5", "*", BLIST_SPARSELUN}, | 233 | {"SGI", "RAID5", "*", BLIST_SPARSELUN}, |
| 233 | {"SGI", "TP9100", "*", BLIST_REPORTLUN2}, | 234 | {"SGI", "TP9100", "*", BLIST_REPORTLUN2}, |
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 852915a08465..307a81137607 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c | |||
| @@ -926,6 +926,9 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result, | |||
| 926 | 926 | ||
| 927 | sdev->eh_timeout = SCSI_DEFAULT_EH_TIMEOUT; | 927 | sdev->eh_timeout = SCSI_DEFAULT_EH_TIMEOUT; |
| 928 | 928 | ||
| 929 | if (*bflags & BLIST_SKIP_VPD_PAGES) | ||
| 930 | sdev->skip_vpd_pages = 1; | ||
| 931 | |||
| 929 | transport_configure_device(&sdev->sdev_gendev); | 932 | transport_configure_device(&sdev->sdev_gendev); |
| 930 | 933 | ||
| 931 | if (sdev->host->hostt->slave_configure) { | 934 | if (sdev->host->hostt->slave_configure) { |
diff --git a/include/scsi/scsi_devinfo.h b/include/scsi/scsi_devinfo.h index cc1f3e786ad7..447d2d7466fc 100644 --- a/include/scsi/scsi_devinfo.h +++ b/include/scsi/scsi_devinfo.h | |||
| @@ -31,4 +31,5 @@ | |||
| 31 | #define BLIST_MAX_512 0x800000 /* maximum 512 sector cdb length */ | 31 | #define BLIST_MAX_512 0x800000 /* maximum 512 sector cdb length */ |
| 32 | #define BLIST_ATTACH_PQ3 0x1000000 /* Scan: Attach to PQ3 devices */ | 32 | #define BLIST_ATTACH_PQ3 0x1000000 /* Scan: Attach to PQ3 devices */ |
| 33 | #define BLIST_NO_DIF 0x2000000 /* Disable T10 PI (DIF) */ | 33 | #define BLIST_NO_DIF 0x2000000 /* Disable T10 PI (DIF) */ |
| 34 | #define BLIST_SKIP_VPD_PAGES 0x4000000 /* Ignore SBC-3 VPD pages */ | ||
| 34 | #endif | 35 | #endif |
