At least try to do something useful in the XS_BUSY case; don't cause
a panic by sleeping in an interrupt context.
This commit is contained in:
parent
6a082e4797
commit
cb5289547f
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: scsipi_base.c,v 1.35 2000/05/23 10:16:43 bouyer Exp $ */
|
/* $NetBSD: scsipi_base.c,v 1.36 2000/05/27 23:59:58 fvdl Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||||
@ -777,14 +777,14 @@ sc_err1(xs, async)
|
|||||||
if (xs->retries) {
|
if (xs->retries) {
|
||||||
if ((xs->xs_control & XS_CTL_POLL) != 0)
|
if ((xs->xs_control & XS_CTL_POLL) != 0)
|
||||||
delay(1000000);
|
delay(1000000);
|
||||||
else if ((xs->xs_control &
|
else if (!async && (xs->xs_control &
|
||||||
(XS_CTL_NOSLEEP|XS_CTL_DISCOVERY)) == 0)
|
(XS_CTL_NOSLEEP|XS_CTL_DISCOVERY)) == 0)
|
||||||
tsleep(&lbolt, PRIBIO, "scbusy", 0);
|
tsleep(&lbolt, PRIBIO, "scbusy", 0);
|
||||||
else
|
else
|
||||||
#if 0
|
#if 0
|
||||||
timeout(scsipi_requeue, xs, hz);
|
timeout(scsipi_requeue, xs, hz);
|
||||||
#else
|
#else
|
||||||
goto lose;
|
goto retry;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
case XS_TIMEOUT:
|
case XS_TIMEOUT:
|
||||||
@ -796,7 +796,6 @@ sc_err1(xs, async)
|
|||||||
return (ERESTART);
|
return (ERESTART);
|
||||||
}
|
}
|
||||||
case XS_DRIVER_STUFFUP:
|
case XS_DRIVER_STUFFUP:
|
||||||
lose:
|
|
||||||
error = EIO;
|
error = EIO;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user