[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>
This commit is contained in:
Al Viro
2006-02-23 02:03:16 +01:00
committed by James Bottomley
parent fc25307d06
commit 6d73c8514d
2 changed files with 17 additions and 2 deletions

View File

@@ -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;