Commit 3f0ded07 authored by Jeff Garzik's avatar Jeff Garzik Committed by Jeff Garzik

[PATCH] scsi_debug mode sense bug

This is for 2.5, but should go back to 2.4 I suppose.

MODE_SENSE_10 alloc_len LSB is in cdb byte 8, not byte 6, AFAIK...
parent a5efd873
......@@ -687,7 +687,7 @@ static int resp_mode_sense(unsigned char * cmd, int target,
pcontrol = (cmd[2] & 0xc0) >> 6;
pcode = cmd[2] & 0x3f;
msense_6 = (MODE_SENSE == cmd[0]);
alloc_len = msense_6 ? cmd[4] : ((cmd[7] << 8) | cmd[6]);
alloc_len = msense_6 ? cmd[4] : ((cmd[7] << 8) | cmd[8]);
/* printk(KERN_INFO "msense: dbd=%d pcontrol=%d pcode=%d "
"msense_6=%d alloc_len=%d\n", dbd, pcontrol, pcode, "
"msense_6, alloc_len); */
......
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