diff options
author | gibbs <gibbs@FreeBSD.org> | 1999-04-19 21:27:36 +0000 |
---|---|---|
committer | gibbs <gibbs@FreeBSD.org> | 1999-04-19 21:27:36 +0000 |
commit | deb3dc05945881a83f9063301d8bfa56720eb332 (patch) | |
tree | a635308509921893b7f28455c0116ed97c9fce69 /sys/dev/advansys/advlib.c | |
parent | 7e60d5189b854d454246cf3ca43f4eaae595acf0 (diff) | |
download | FreeBSD-src-deb3dc05945881a83f9063301d8bfa56720eb332.zip FreeBSD-src-deb3dc05945881a83f9063301d8bfa56720eb332.tar.gz |
Handle the case when auto sense retrieval fails.
Give automatic request sense operations a 5 second timeout.
Diffstat (limited to 'sys/dev/advansys/advlib.c')
-rw-r--r-- | sys/dev/advansys/advlib.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/advansys/advlib.c b/sys/dev/advansys/advlib.c index 8af5c1a..66640c8 100644 --- a/sys/dev/advansys/advlib.c +++ b/sys/dev/advansys/advlib.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: advlib.c,v 1.10 1998/12/07 21:58:15 archie Exp $ + * $Id: advlib.c,v 1.11 1999/04/11 02:55:50 eivind Exp $ */ /* * Ported from: @@ -44,6 +44,7 @@ */ #include <sys/param.h> +#include <sys/kernel.h> #include <sys/systm.h> #include <machine/bus_pio.h> @@ -1004,6 +1005,13 @@ adv_isr_chip_halted(struct adv_softc *adv) scsi_busy = adv_read_lram_8(adv, ADVV_SCSIBUSY_B); scsi_busy &= ~target_mask; adv_write_lram_8(adv, ADVV_SCSIBUSY_B, scsi_busy); + /* + * Ensure we have enough time to actually + * retrieve the sense. + */ + untimeout(adv_timeout, (caddr_t)ccb, ccb->ccb_h.timeout_ch); + ccb->ccb_h.timeout_ch = + timeout(adv_timeout, (caddr_t)ccb, 5 * hz); } else if (int_halt_code == ADV_HALT_SDTR_REJECTED) { struct ext_msg out_msg; |