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,20 +916,29 @@ sd_read_cache_type(Scsi_Disk *sdkp, char *diskname, ...@@ -916,20 +916,29 @@ sd_read_cache_type(Scsi_Disk *sdkp, char *diskname,
} while (the_result && retries); } while (the_result && retries);
if (the_result) { if (the_result) {
printk(KERN_ERR "%s : MODE SENSE failed.\n" if(status_byte(the_result) == CHECK_CONDITION
"%s : status = %x, message = %02x, host = %d, driver = %02x \n", && (SRpnt->sr_sense_buffer[0] & 0x70) == 0x70
diskname, diskname, && (SRpnt->sr_sense_buffer[2] & 0x0f) == ILLEGAL_REQUEST
status_byte(the_result), /* The next are ASC 0x24 ASCQ 0x00: Invalid field in CDB */
msg_byte(the_result), && SRpnt->sr_sense_buffer[12] == 0x24
host_byte(the_result), && SRpnt->sr_sense_buffer[13] == 0x00) {
driver_byte(the_result) printk(KERN_NOTICE "SCSI device %s: cache data unavailable\n", diskname);
); } else {
if (driver_byte(the_result) & DRIVER_SENSE) printk(KERN_ERR "%s : MODE SENSE failed.\n"
print_req_sense("sd", SRpnt); "%s : status = %x, message = %02x, host = %d, driver = %02x \n",
else diskname, diskname,
printk(KERN_ERR "%s : sense not available. \n", diskname); status_byte(the_result),
msg_byte(the_result),
printk(KERN_ERR "%s : assuming drive cache: write through\n", diskname); host_byte(the_result),
driver_byte(the_result)
);
if (driver_byte(the_result) & DRIVER_SENSE)
print_req_sense("sd", SRpnt);
else
printk(KERN_ERR "%s : sense not available. \n", diskname);
printk(KERN_ERR "%s : assuming drive cache: write through\n", diskname);
}
sdkp->WCE = 0; sdkp->WCE = 0;
sdkp->RCD = 0; sdkp->RCD = 0;
} else { } 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