diff options
author | Alexander Yurchenko <grange@cvs.openbsd.org> | 2009-03-19 13:25:19 +0000 |
---|---|---|
committer | Alexander Yurchenko <grange@cvs.openbsd.org> | 2009-03-19 13:25:19 +0000 |
commit | 8f349de23e784b788cf0a84dcd049012afb9519d (patch) | |
tree | 2fcc0c4febf32e6a6bd2811a8f33c153b65e0766 /sys/dev/pci/ips.c | |
parent | 85d5134342566b2528c2a7487cca19a494724d32 (diff) |
Make ips_timeout to be usable not only with scsi xfers.
Diffstat (limited to 'sys/dev/pci/ips.c')
-rw-r--r-- | sys/dev/pci/ips.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/sys/dev/pci/ips.c b/sys/dev/pci/ips.c index 56e4ff73200..2d4730e794a 100644 --- a/sys/dev/pci/ips.c +++ b/sys/dev/pci/ips.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ips.c,v 1.74 2009/03/19 10:04:47 grange Exp $ */ +/* $OpenBSD: ips.c,v 1.75 2009/03/19 13:25:18 grange Exp $ */ /* * Copyright (c) 2006, 2007, 2009 Alexander Yurchenko <grange@openbsd.org> @@ -1687,21 +1687,21 @@ ips_timeout(void *arg) struct scsi_xfer *xs = ccb->c_xfer; int s; - /* - * Command never completed. Cleanup and recover. - */ s = splbio(); - sc_print_addr(xs->sc_link); - printf("timeout"); - DPRINTF(IPS_D_ERR, (", command %d", ccb->c_id)); - printf("\n"); + if (xs) + sc_print_addr(xs->sc_link); + else + printf("%s: ", sc->sc_dev.dv_xname); + printf("timeout\n"); + /* + * Command never completed. Fake hardware status byte + * to indicate timeout. + * XXX: need to remove command from controller. + */ + ccb->c_stat = IPS_STAT_TIMO; + ips_done(sc, ccb); ips_ccb_put(sc, ccb); - - xs->error = XS_TIMEOUT; - xs->flags |= ITSDONE; - scsi_done(xs); - splx(s); } |