Commit 07ccd224 authored by James Bottomley's avatar James Bottomley

Merge mulgrave.(none):/home/jejb/BK/scsi-sd-cache-2.5

into mulgrave.(none):/home/jejb/BK/scsi-for-linus-2.5
parents 6a1dcf3c 2ddcc9e9
......@@ -916,6 +916,14 @@ sd_read_cache_type(Scsi_Disk *sdkp, char *diskname,
} while (the_result && retries);
if (the_result) {
if(status_byte(the_result) == CHECK_CONDITION
&& (SRpnt->sr_sense_buffer[0] & 0x70) == 0x70
&& (SRpnt->sr_sense_buffer[2] & 0x0f) == ILLEGAL_REQUEST
/* The next are ASC 0x24 ASCQ 0x00: Invalid field in CDB */
&& SRpnt->sr_sense_buffer[12] == 0x24
&& SRpnt->sr_sense_buffer[13] == 0x00) {
printk(KERN_NOTICE "SCSI device %s: cache data unavailable\n", diskname);
} else {
printk(KERN_ERR "%s : MODE SENSE failed.\n"
"%s : status = %x, message = %02x, host = %d, driver = %02x \n",
diskname, diskname,
......@@ -930,6 +938,7 @@ sd_read_cache_type(Scsi_Disk *sdkp, char *diskname,
printk(KERN_ERR "%s : sense not available. \n", diskname);
printk(KERN_ERR "%s : assuming drive cache: write through\n", diskname);
}
sdkp->WCE = 0;
sdkp->RCD = 0;
} else {
......
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