summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sd.c
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2006-02-23 02:03:16 +0100
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-02-27 23:31:07 -0600
commit6d73c8514da241c6b1b8d710a6294786604d7142 (patch)
tree896fdd4d3f2d7094dc75a774f8ae2128d0fcb1c5 /drivers/scsi/sd.c
parentfc25307d06f524d6c04b371b236dc9e62186058c (diff)
downloadlinux-6d73c8514da241c6b1b8d710a6294786604d7142.tar.bz2
[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,
if (!scsi_status_is_good(res))
goto bad_sense;
+ if (!data.header_length) {
+ modepage = 6;
+ printk(KERN_ERR "%s: missing header in MODE_SENSE response\n",
+ diskname);
+ }
+
/* that went OK, now ask for the proper length */
len = data.length;