summaryrefslogtreecommitdiffstats
path: root/sys/pci/ncr.c
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>1998-09-16 17:11:59 +0000
committergibbs <gibbs@FreeBSD.org>1998-09-16 17:11:59 +0000
commit05e78d487f9e83fd86ea1bd6fd3f58bb3d304f9c (patch)
treeddd73dd410e2a748297d84c1c3811bf55b014af4 /sys/pci/ncr.c
parentd85d94f4f7d8c0a61ea37d7b98e11acbb4ac1a47 (diff)
downloadFreeBSD-src-05e78d487f9e83fd86ea1bd6fd3f58bb3d304f9c.zip
FreeBSD-src-05e78d487f9e83fd86ea1bd6fd3f58bb3d304f9c.tar.gz
Fix a bug in ncr_freeze_devq() which is called when we see a queue
full condition or other error which requires us to purge the controller's start queue of transactions for a particular device. We were relying on the NCR CCB's program address to cause the script engine to skip to the next entry in the queue even though the CCB is freed (and its program address switched to the idle loop) by this action. We now set the address in the start queue to be the "skip" function directly.
Diffstat (limited to 'sys/pci/ncr.c')
-rw-r--r--sys/pci/ncr.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/sys/pci/ncr.c b/sys/pci/ncr.c
index 3cb9842..988cec0 100644
--- a/sys/pci/ncr.c
+++ b/sys/pci/ncr.c
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: ncr.c,v 1.124 1998/09/15 10:06:22 gibbs Exp $
+** $Id: ncr.c,v 1.125 1998/09/15 22:05:38 gibbs Exp $
**
** Device driver for the NCR 53C8XX PCI-SCSI-Controller Family.
**
@@ -1288,7 +1288,7 @@ static void ncr_attach (pcici_t tag, int unit);
static char ident[] =
- "\n$Id: ncr.c,v 1.124 1998/09/15 10:06:22 gibbs Exp $\n";
+ "\n$Id: ncr.c,v 1.125 1998/09/15 22:05:38 gibbs Exp $\n";
static const u_long ncr_version = NCR_VERSION * 11
+ (u_long) sizeof (struct ncb) * 7
@@ -4606,18 +4606,23 @@ ncr_freeze_devq (ncb_p np, struct cam_path *path)
if ((cp->phys.header.launch.l_paddr
== NCB_SCRIPT_PHYS (np, select))
&& (xpt_path_comp(path, cp->ccb->ccb_h.path) >= 0)) {
+ int i;
/* Remove from the start queue */
- cp->phys.header.launch.l_paddr =
- NCB_SCRIPT_PHYS (np, skip);
+ for (i = 0; i < MAX_START; i++) {
+ if (np->squeue[i] == CCB_PHYS(cp, phys))
+ np->squeue[i] =
+ NCB_SCRIPT_PHYS (np, skip);
+ }
cp->host_status=HS_STALL;
ncr_complete (np, cp);
}
+ break;
default:
break;
}
cp = cp->link_nccb;
- };
+ }
}
/*==========================================================
OpenPOWER on IntegriCloud