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.
This commit is contained in:
Justin T. Gibbs 1998-09-16 17:11:59 +00:00
parent a185f9b1c3
commit 348811e078
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=39366

View File

@ -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;
};
}
}
/*==========================================================