diff options
author | mjacob <mjacob@FreeBSD.org> | 1998-09-16 19:52:22 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 1998-09-16 19:52:22 +0000 |
commit | 5b2097bd6c2630fb36faa412084ff0ca948ff3ee (patch) | |
tree | 8ce960f9eb1a0d2d83c484a2da160a92515d99ac /sys/dev/isp | |
parent | 339a2313636123600656ace0b5f79362e7de62d2 (diff) | |
download | FreeBSD-src-5b2097bd6c2630fb36faa412084ff0ca948ff3ee.zip FreeBSD-src-5b2097bd6c2630fb36faa412084ff0ca948ff3ee.tar.gz |
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.
Diffstat (limited to 'sys/dev/isp')
-rw-r--r-- | sys/dev/isp/isp_freebsd.c | 12 | ||||
-rw-r--r-- | sys/dev/isp/isp_freebsd_cam.h | 7 |
2 files changed, 15 insertions, 4 deletions
diff --git a/sys/dev/isp/isp_freebsd.c b/sys/dev/isp/isp_freebsd.c index d9f7ff4..a6ef17c 100644 --- a/sys/dev/isp/isp_freebsd.c +++ b/sys/dev/isp/isp_freebsd.c @@ -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; diff --git a/sys/dev/isp/isp_freebsd_cam.h b/sys/dev/isp/isp_freebsd_cam.h index d1c8684..d5629d3 100644 --- a/sys/dev/isp/isp_freebsd_cam.h +++ b/sys/dev/isp/isp_freebsd_cam.h @@ -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)) |