Change 1112791 by kenm@ken.spectrabsd8 on 2015/01/15 16:45:13

Fix SCSI status byte reporting on 4Gb and 8Gb Qlogic boards.

The newer boards don't have the response field that indicates
whether the SCSI status byte is present.  You have to just look to
see whether it is non-zero.

The code was looking to see whether the sense length was valid
before propagating the SCSI status byte (and sense information) up
the stack.  With a status like Reservation Conflict, there is no
sense information, only the SCSI status byte.  So it wasn't getting
correctly returned.

isp.c:
	In isp_intr(), if we are on a 2400 or 2500 type board and
	get a response, look at the actual contents of the
	SCSI status value and set the RQSF_GOT_STATUS flag
	accordingly so that return any SCSI status value we get.  The
	RQSF_GOT_SENSE flag will get set later on if there is
	actual sense information returned.

Submitted by:	ken
MFC after:	1 week
Sponsored by:	Spectra Logic
MFSpectraBSD:	1112791 on 2015/01/15
This commit is contained in:
Will Andrews 2015-01-21 20:22:53 +00:00
parent ede35faed2
commit b44e442e50

@ -5123,19 +5123,34 @@ isp_action(struct cam_sim *sim, union ccb *ccb)
break;
#endif
case XPT_RESET_DEV: /* BDR the specified SCSI device */
{
struct isp_fc *fc;
bus = cam_sim_bus(xpt_path_sim(ccb->ccb_h.path));
tgt = ccb->ccb_h.target_id;
tgt |= (bus << 16);
if (IS_FC(isp))
fc = ISP_FC_PC(isp, bus);
else
fc = NULL;
error = isp_control(isp, ISPCTL_RESET_DEV, bus, tgt);
if (error) {
ccb->ccb_h.status = CAM_REQ_CMP_ERR;
} else {
/*
* If we have a FC device, reset the Command
* Reference Number, because the target will expect
* that we re-start the CRN at 1 after a reset.
*/
if (fc != NULL)
isp_fcp_reset_crn(fc, tgt, /*tgt_set*/ 1);
ccb->ccb_h.status = CAM_REQ_CMP;
}
xpt_done(ccb);
break;
}
case XPT_ABORT: /* Abort the specified CCB */
{
union ccb *accb = ccb->cab.abort_ccb;