Fix the (unported) resource shortage case- I'd done a xpt_freeze_simq

but had never done a CAM_RELEASE_SIMQ to restart the queues.
This commit is contained in:
Matt Jacob 1998-09-16 19:52:22 +00:00
parent 63ab6f1c55
commit 00f50ce889
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=39378
2 changed files with 15 additions and 4 deletions

View File

@ -1,5 +1,5 @@
/* $FreeBSD$ */
/* $Id: isp_freebsd.c,v 1.3 1998/09/15 08:42:55 gibbs Exp $ */
/* $Id: isp_freebsd.c,v 1.4 1998/09/16 16:42:40 mjacob Exp $ */
/*
* Platform (FreeBSD) dependent common attachment code for Qlogic adapters.
*
@ -213,10 +213,15 @@ isp_action(sim, ccb)
ccb->ccb_h.status |= CAM_SIM_QUEUED;
break;
case CMD_EAGAIN:
#if 0
printf("%s: EAGAINed %d.%d\n", isp->isp_name,
ccb->ccb_h.target_id, ccb->ccb_h.target_lun);
printf("%s: %d EAGAIN\n", __FILE__, __LINE__);
xpt_freeze_simq(sim, 1);
#endif
if (isp->isp_osinfo.simqfrozen == 0) {
xpt_freeze_simq(sim, 1);
isp->isp_osinfo.simqfrozen = 1;
}
ccb->ccb_h.status &= ~CAM_STATUS_MASK;
ccb->ccb_h.status |= CAM_REQUEUE_REQ;
xpt_done(ccb);
@ -248,7 +253,8 @@ isp_action(sim, ccb)
case XPT_RESET_DEV: /* BDR the specified SCSI device */
tgt = ccb->ccb_h.target_id;
s = splcam();
error = isp_control(isp, ISPCTL_RESET_DEV, (void *)(intptr_t) tgt);
error =
isp_control(isp, ISPCTL_RESET_DEV, (void *)(intptr_t) tgt);
(void) splx(s);
if (error) {
ccb->ccb_h.status = CAM_REQ_CMP_ERR;

View File

@ -1,5 +1,5 @@
/* $FreeBSD$ */
/* $Id: isp_freebsd_cam.h,v 1.2 1998/09/15 09:59:37 gibbs Exp $ */
/* $Id: isp_freebsd_cam.h,v 1.3 1998/09/16 16:42:40 mjacob Exp $ */
/*
* Qlogic ISP SCSI Host Adapter FreeBSD Wrapper Definitions (CAM version)
*---------------------------------------
@ -70,6 +70,7 @@ struct isposinfo {
struct cam_sim *sim;
struct cam_path *path;
struct callout_handle watchid;
volatile char simqfrozen;
};
#define isp_sim isp_osinfo.sim
@ -165,6 +166,10 @@ struct isposinfo {
(sccb)->ccb_h.status |= CAM_DEV_QFRZN; \
} \
} \
if ((XS_ISP((sccb)))->isp_osinfo.simqfrozen) { \
(sccb)->ccb_h.status |= CAM_RELEASE_SIMQ; \
(XS_ISP((sccb)))->isp_osinfo.simqfrozen = 0; \
} \
(sccb)->ccb_h.status &= ~CAM_SIM_QUEUED; \
xpt_done((union ccb *)(sccb))