aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/sbp2.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-02-08 14:09:00 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2006-02-18 15:54:13 -0500
commite30809fde59d591809f00caa1a4c960cca5916af (patch)
tree370d85a6158e45db26edf233404ac70d290c618b /drivers/ieee1394/sbp2.c
parentef20c8c197df9b8d5bd4af0679123826da028861 (diff)
[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>
Diffstat (limited to 'drivers/ieee1394/sbp2.c')
-rw-r--r--drivers/ieee1394/sbp2.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
index 18d7eda38851..c2c776fbda01 100644
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -2082,9 +2082,7 @@ static void sbp2_check_sbp2_response(struct scsi_id_instance_data *scsi_id,
2082 2082
2083 SBP2_DEBUG("sbp2_check_sbp2_response"); 2083 SBP2_DEBUG("sbp2_check_sbp2_response");
2084 2084
2085 switch (SCpnt->cmnd[0]) { 2085 if (SCpnt->cmnd[0] == INQUIRY && (SCpnt->cmnd[1] & 3) == 0) {
2086
2087 case INQUIRY:
2088 /* 2086 /*
2089 * Make sure data length is ok. Minimum length is 36 bytes 2087 * Make sure data length is ok. Minimum length is 36 bytes
2090 */ 2088 */
@@ -2097,13 +2095,7 @@ static void sbp2_check_sbp2_response(struct scsi_id_instance_data *scsi_id,
2097 */ 2095 */
2098 scsi_buf[2] |= 2; 2096 scsi_buf[2] |= 2;
2099 scsi_buf[3] = (scsi_buf[3] & 0xf0) | 2; 2097 scsi_buf[3] = (scsi_buf[3] & 0xf0) | 2;
2100
2101 break;
2102
2103 default:
2104 break;
2105 } 2098 }
2106 return;
2107} 2099}
2108 2100
2109/* 2101/*