Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/thorpej_scsipi]: src/sys/dev/scsipi Better handling of errors for reques...
details: https://anonhg.NetBSD.org/src/rev/000ea25a0e1c
branches: thorpej_scsipi
changeset: 477422:000ea25a0e1c
user: bouyer <bouyer%NetBSD.org@localhost>
date: Wed Mar 28 09:39:40 2001 +0000
description:
Better handling of errors for request sense commands.
diffstat:
sys/dev/scsipi/scsipi_base.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diffs (38 lines):
diff -r f4173dfe2150 -r 000ea25a0e1c sys/dev/scsipi/scsipi_base.c
--- a/sys/dev/scsipi/scsipi_base.c Tue Mar 27 16:13:28 2001 +0000
+++ b/sys/dev/scsipi/scsipi_base.c Wed Mar 28 09:39:40 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scsipi_base.c,v 1.26.2.11 2001/03/27 13:03:04 bouyer Exp $ */
+/* $NetBSD: scsipi_base.c,v 1.26.2.12 2001/03/28 09:39:40 bouyer Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -1207,11 +1207,11 @@
/* request sense for a request sense ? */
if (xs->xs_control & XS_CTL_REQSENSE) {
scsipi_printaddr(periph);
- printf("request sense for request sense\n");
+ /* XXX maybe we should reset the device ? */
/* we've been frozen because xs->error != XS_NOERROR */
scsipi_periph_thaw(periph, 1);
splx(s);
- return EIO;
+ return EINVAL;
}
scsipi_request_sense(xs);
}
@@ -1424,6 +1424,14 @@
/* REQUEST_SENSE interrupted by bus reset. */
xs->error = XS_RESET;
return;
+ case EIO:
+ /* request sense coudn't be performed */
+ /*
+ * XXX this isn't quite rigth but we don't have anything
+ * better for now
+ */
+ xs->error = XS_DRIVER_STUFFUP;
+ return;
default:
/* Notify that request sense failed. */
xs->error = XS_DRIVER_STUFFUP;
Home |
Main Index |
Thread Index |
Old Index