diff options
author | Justin T. Gibbs <gibbs@FreeBSD.org> | 1998-09-16 17:11:59 +0000 |
---|---|---|
committer | Justin T. Gibbs <gibbs@FreeBSD.org> | 1998-09-16 17:11:59 +0000 |
commit | 348811e078fe0b280c49726dbcc26c0b65368a81 (patch) | |
tree | ed346ff16e0272ffc2fd8a6226039d341ee8ee6c /sys/pci/ncr.c | |
parent | a185f9b1c3ccea561ee438ce2c927937f21ba838 (diff) | |
download | src-348811e078fe0b280c49726dbcc26c0b65368a81.tar.gz src-348811e078fe0b280c49726dbcc26c0b65368a81.zip |
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.
Notes
Notes:
svn path=/head/; revision=39366
Diffstat (limited to 'sys/pci/ncr.c')
-rw-r--r-- | sys/pci/ncr.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/sys/pci/ncr.c b/sys/pci/ncr.c index 3cb9842554b7..988cec09562b 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; - }; + } } /*========================================================== |