summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Yurchenko <grange@cvs.openbsd.org>2009-02-19 16:06:57 +0000
committerAlexander Yurchenko <grange@cvs.openbsd.org>2009-02-19 16:06:57 +0000
commit171cb90bd8dba7a0a6871feca7630c2d084e0b04 (patch)
tree300de02e43899befc8692cdc7f04e0884773ea75
parentab3138f713ce1d73b40598d44b8dde1a0016a884 (diff)
Don't use scsi_xfer if we don't run a command came from the scsi layer.
-rw-r--r--sys/dev/pci/ips.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/dev/pci/ips.c b/sys/dev/pci/ips.c
index 0f2ee1f3858..2ba4188d4f5 100644
--- a/sys/dev/pci/ips.c
+++ b/sys/dev/pci/ips.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ips.c,v 1.47 2009/02/17 20:22:07 grange Exp $ */
+/* $OpenBSD: ips.c,v 1.48 2009/02/19 16:06:56 grange Exp $ */
/*
* Copyright (c) 2006, 2007, 2009 Alexander Yurchenko <grange@openbsd.org>
@@ -1002,8 +1002,10 @@ ips_cmd(struct ips_softc *sc, int code, int drive, u_int32_t lba, void *data,
splx(s);
} else {
/* Set watchdog timer */
- timeout_set(&xs->stimeout, ips_timeout, ccb);
- timeout_add_sec(&xs->stimeout, IPS_TIMEOUT);
+ if (xs != NULL) {
+ timeout_set(&xs->stimeout, ips_timeout, ccb);
+ timeout_add_sec(&xs->stimeout, IPS_TIMEOUT);
+ }
}
return (error);
@@ -1069,7 +1071,10 @@ ips_done(struct ips_softc *sc, struct ips_ccb *ccb)
}
if (ccb->c_stat) {
- sc_print_addr(xs->sc_link);
+ if (xs != NULL)
+ sc_print_addr(xs->sc_link);
+ else
+ printf("%s: ", sc->sc_dev.dv_xname);
if (ccb->c_stat == 1) {
printf("recovered error\n");
} else {