Use b_actb, not b_actl.
This commit is contained in:
parent
7e9018aaeb
commit
70a4b20dfa
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)ct.c 7.3 (Berkeley) 5/4/91
|
||||
* $Id: ct.c,v 1.4 1994/02/06 01:32:31 mycroft Exp $
|
||||
* $Id: ct.c,v 1.5 1994/02/06 07:31:06 mycroft Exp $
|
||||
*/
|
||||
|
||||
#include "ct.h"
|
||||
|
@ -138,7 +138,10 @@ ctinit(hd)
|
|||
register struct hp_device *hd;
|
||||
{
|
||||
register struct ct_softc *sc = &ct_softc[hd->hp_unit];
|
||||
register struct buf *bp;
|
||||
|
||||
for (bp = cttab; bp < &cttab[NCT]; bp++)
|
||||
bp->b_actb = &bp->b_actf;
|
||||
sc->sc_hd = hd;
|
||||
sc->sc_punit = ctpunit(hd->hp_flags);
|
||||
if (ctident(sc, hd) < 0)
|
||||
|
@ -389,13 +392,11 @@ ctstrategy(bp)
|
|||
|
||||
unit = UNIT(bp->b_dev);
|
||||
dp = &cttab[unit];
|
||||
bp->av_forw = NULL;
|
||||
bp->b_actf = NULL;
|
||||
s = splbio();
|
||||
if (dp->b_actf == NULL)
|
||||
dp->b_actf = bp;
|
||||
else
|
||||
dp->b_actl->av_forw = bp;
|
||||
dp->b_actl = bp;
|
||||
bp->b_actb = dp->b_actb;
|
||||
*dp->b_actb = bp;
|
||||
dp->b_actb = &bp->b_actf;
|
||||
if (dp->b_active == 0) {
|
||||
dp->b_active = 1;
|
||||
ctustart(unit);
|
||||
|
@ -420,7 +421,7 @@ ctstart(unit)
|
|||
register int unit;
|
||||
{
|
||||
register struct ct_softc *sc = &ct_softc[unit];
|
||||
register struct buf *bp;
|
||||
register struct buf *bp, *dp;
|
||||
register int i;
|
||||
|
||||
bp = cttab[unit].b_actf;
|
||||
|
@ -505,8 +506,12 @@ mustio:
|
|||
bp->b_resid = bp->b_bcount;
|
||||
iodone(bp);
|
||||
hpibfree(&sc->sc_dq);
|
||||
cttab[unit].b_actf = bp = bp->av_forw;
|
||||
if (bp == NULL) {
|
||||
if (dp = bp->b_actf)
|
||||
dp->b_actb = bp->b_actb;
|
||||
else
|
||||
cttab[unit].b_actb = bp->b_actb;
|
||||
*bp->b_actb = dp;
|
||||
if ((bp = dp) == NULL) {
|
||||
cttab[unit].b_active = 0;
|
||||
return;
|
||||
}
|
||||
|
@ -627,7 +632,7 @@ ctintr(unit)
|
|||
register int unit;
|
||||
{
|
||||
register struct ct_softc *sc = &ct_softc[unit];
|
||||
register struct buf *bp;
|
||||
register struct buf *bp, *dp;
|
||||
u_char stat;
|
||||
|
||||
bp = cttab[unit].b_actf;
|
||||
|
@ -757,7 +762,11 @@ done:
|
|||
if (ctdebug & CDB_FILES)
|
||||
printf("ctintr: after flags %x\n", sc->sc_flags);
|
||||
#endif
|
||||
cttab[unit].b_actf = bp->av_forw;
|
||||
if (dp = bp->b_actf)
|
||||
dp->b_actb = bp->b_actb;
|
||||
else
|
||||
cttab[unit].b_actb = bp->b_actb;
|
||||
*bp->b_actb = dp;
|
||||
iodone(bp);
|
||||
hpibfree(&sc->sc_dq);
|
||||
if (cttab[unit].b_actf == NULL) {
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*
|
||||
* from: Utah Hdr: st.c 1.8 90/10/14
|
||||
* from: @(#)st.c 7.3 (Berkeley) 5/4/91
|
||||
* $Id: st.c,v 1.4 1994/01/11 17:19:42 mycroft Exp $
|
||||
* $Id: st.c,v 1.5 1994/02/06 07:24:58 mycroft Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -227,7 +227,10 @@ stinit(hd)
|
|||
register struct hp_device *hd;
|
||||
{
|
||||
register struct st_softc *sc = &st_softc[hd->hp_unit];
|
||||
register struct buf *bp;
|
||||
|
||||
for (bp = sttab; bp < &sttab[NST]; bp++)
|
||||
bp->b_actb = &bp->b_actf;
|
||||
sc->sc_hd = hd;
|
||||
sc->sc_punit = stpunit(hd->hp_flags);
|
||||
sc->sc_type = stident(sc, hd);
|
||||
|
@ -696,13 +699,11 @@ ststrategy(bp)
|
|||
|
||||
unit = UNIT(bp->b_dev);
|
||||
dp = &sttab[unit];
|
||||
bp->av_forw = NULL;
|
||||
bp->b_actf = NULL;
|
||||
s = splbio();
|
||||
if (dp->b_actf == NULL)
|
||||
dp->b_actf = bp;
|
||||
else
|
||||
dp->b_actl->av_forw = bp;
|
||||
dp->b_actl = bp;
|
||||
bp->b_actb = dp->b_actb;
|
||||
*dp->b_actb = bp;
|
||||
dp->b_actb = &bp->b_actf;
|
||||
if (dp->b_active == 0) {
|
||||
dp->b_active = 1;
|
||||
stustart(unit);
|
||||
|
@ -812,8 +813,14 @@ stfinish(unit, sc, bp)
|
|||
struct st_softc *sc;
|
||||
struct buf *bp;
|
||||
{
|
||||
register struct buf *dp;
|
||||
|
||||
sttab[unit].b_errcnt = 0;
|
||||
sttab[unit].b_actf = bp->b_actf;
|
||||
if (dp = bp->b_actf)
|
||||
dp->b_actb = bp->b_actb;
|
||||
else
|
||||
sttab[unit].b_actb = bp->b_actb;
|
||||
*bp->b_actb = dp;
|
||||
iodone(bp);
|
||||
scsifree(&sc->sc_dq);
|
||||
if (sttab[unit].b_actf)
|
||||
|
|
Loading…
Reference in New Issue