From eedb2dfec35689e2fda9422ffa0217dc0077cfd1 Mon Sep 17 00:00:00 2001 From: Matt Jacob Date: Thu, 29 Jan 2004 06:36:30 +0000 Subject: [PATCH] Fix a bug where we never managed to include the sense data we wanted to send. --- sys/dev/isp/isp_target.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/isp/isp_target.c b/sys/dev/isp/isp_target.c index 33e826223a3..03e71eebc77 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;