mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 12:16:20 +00:00
[PATCH] don't mangle INQUIRY if cmddt or evpd bits are set
sbp2.c mangles INQUIRY response in a way that only applies to standard inquiry data (i.e. when both cmddt and evpd bits are 0). Leave other cases alone; e.g. when asking for VPD the length of reply is in byte 3, not 4 and byte 4 is the first byte of device serial number. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
ef20c8c197
commit
e30809fde5
1 changed files with 1 additions and 9 deletions
|
@ -2082,9 +2082,7 @@ static void sbp2_check_sbp2_response(struct scsi_id_instance_data *scsi_id,
|
|||
|
||||
SBP2_DEBUG("sbp2_check_sbp2_response");
|
||||
|
||||
switch (SCpnt->cmnd[0]) {
|
||||
|
||||
case INQUIRY:
|
||||
if (SCpnt->cmnd[0] == INQUIRY && (SCpnt->cmnd[1] & 3) == 0) {
|
||||
/*
|
||||
* Make sure data length is ok. Minimum length is 36 bytes
|
||||
*/
|
||||
|
@ -2097,13 +2095,7 @@ static void sbp2_check_sbp2_response(struct scsi_id_instance_data *scsi_id,
|
|||
*/
|
||||
scsi_buf[2] |= 2;
|
||||
scsi_buf[3] = (scsi_buf[3] & 0xf0) | 2;
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue