aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/isp/isp_target.c
diff options
context:
space:
mode:
authorMatt Jacob <mjacob@FreeBSD.org>2004-01-29 06:36:30 +0000
committerMatt Jacob <mjacob@FreeBSD.org>2004-01-29 06:36:30 +0000
commiteedb2dfec35689e2fda9422ffa0217dc0077cfd1 (patch)
tree9b7615603a32d12902a87f0fc5658d424624fbbf /sys/dev/isp/isp_target.c
parente2402a9b9b4aa3aa51ca00f803ea9be7b3f20acf (diff)
downloadsrc-eedb2dfec35689e2fda9422ffa0217dc0077cfd1.tar.gz
src-eedb2dfec35689e2fda9422ffa0217dc0077cfd1.zip
Fix a bug where we never managed to include the sense data we wanted to send.
Notes
Notes: svn path=/head/; revision=125189
Diffstat (limited to 'sys/dev/isp/isp_target.c')
-rw-r--r--sys/dev/isp/isp_target.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/isp/isp_target.c b/sys/dev/isp/isp_target.c
index 33e826223a3a..03e71eebc77e 100644
--- a/sys/dev/isp/isp_target.c
+++ b/sys/dev/isp/isp_target.c
@@ -447,7 +447,7 @@ isp_endcmd(struct ispsoftc *isp, void *arg, u_int32_t code, u_int16_t hdl)
cto->ct_lun = aep->at_lun;
}
cto->ct_rxid = aep->at_rxid;
- cto->rsp.m1.ct_scsi_status = sts & 0xff;
+ cto->rsp.m1.ct_scsi_status = sts;
cto->ct_flags = CT2_SENDSTATUS | CT2_NO_DATA | CT2_FLAG_MODE1;
if (hdl == 0) {
cto->ct_flags |= CT2_CCINCR;
@@ -456,7 +456,7 @@ isp_endcmd(struct ispsoftc *isp, void *arg, u_int32_t code, u_int16_t hdl)
cto->ct_resid = aep->at_datalen;
cto->rsp.m1.ct_scsi_status |= CT2_DATA_UNDER;
}
- if ((sts & 0xff) == SCSI_CHECK && (sts & ECMD_SVALID)) {
+ if (sts == SCSI_CHECK && (code & ECMD_SVALID)) {
cto->rsp.m1.ct_resp[0] = 0xf0;
cto->rsp.m1.ct_resp[2] = (code >> 12) & 0xf;
cto->rsp.m1.ct_resp[7] = 8;