aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sd.c
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2006-02-22 20:03:16 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-02-28 00:31:07 -0500
commit6d73c8514da241c6b1b8d710a6294786604d7142 (patch)
tree896fdd4d3f2d7094dc75a774f8ae2128d0fcb1c5 /drivers/scsi/sd.c
parentfc25307d06f524d6c04b371b236dc9e62186058c (diff)
[SCSI] scsi_lib: fix recognition of cache type of Initio SBP-2 bridges
Regardless what mode page was asked for, Initio INIC-14x0 and INIC-2430 always return page 6 without mode page headers. Try to recognise this as a special case in scsi_mode_sense and setting the mode sense headers accordingly. Signed-off-by: Al Viro <viro@ftp.linux.org.uk> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r--drivers/scsi/sd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 76b4d14c0b3f..31c9685ebc5a 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -1333,6 +1333,12 @@ sd_read_cache_type(struct scsi_disk *sdkp, char *diskname,
1333 if (!scsi_status_is_good(res)) 1333 if (!scsi_status_is_good(res))
1334 goto bad_sense; 1334 goto bad_sense;
1335 1335
1336 if (!data.header_length) {
1337 modepage = 6;
1338 printk(KERN_ERR "%s: missing header in MODE_SENSE response\n",
1339 diskname);
1340 }
1341
1336 /* that went OK, now ask for the proper length */ 1342 /* that went OK, now ask for the proper length */
1337 len = data.length; 1343 len = data.length;
1338 1344