diff options
-rw-r--r-- | sys/scsi/scsi_base.c | 4 | ||||
-rw-r--r-- | sys/scsi/scsiconf.h | 11 | ||||
-rw-r--r-- | sys/scsi/sd.c | 8 | ||||
-rw-r--r-- | sys/scsi/st.c | 6 |
4 files changed, 10 insertions, 19 deletions
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c index 36a98dbe9d1..2929500b2e4 100644 --- a/sys/scsi/scsi_base.c +++ b/sys/scsi/scsi_base.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_base.c,v 1.59 2004/05/13 01:56:09 krw Exp $ */ +/* $OpenBSD: scsi_base.c,v 1.60 2004/05/17 23:57:51 krw Exp $ */ /* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */ /* @@ -700,7 +700,7 @@ scsi_interpret_sense(xs) if (sc_link->device->err_handler) { SC_DEBUG(sc_link, SDEV_DB2, ("calling private err_handler()\n")); error = (*sc_link->device->err_handler) (xs); - if (error != SCSIRET_CONTINUE) + if (error != EJUSTRETURN) return error; /* error >= 0 better ? */ } /* otherwise use the default */ diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h index b046e2c7157..dcb3eca85f2 100644 --- a/sys/scsi/scsiconf.h +++ b/sys/scsi/scsiconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: scsiconf.h,v 1.44 2004/05/09 05:33:59 krw Exp $ */ +/* $OpenBSD: scsiconf.h,v 1.45 2004/05/17 23:57:51 krw Exp $ */ /* $NetBSD: scsiconf.h,v 1.35 1997/04/02 02:29:38 mycroft Exp $ */ /* @@ -133,15 +133,6 @@ struct scsi_adapter { #define ESCAPE_NOT_SUPPORTED 3 /* - * Device Specific Sense Handlers return either an errno - * or one of these three items. - */ - -#define SCSIRET_NOERROR 0 /* No Error */ -#define SCSIRET_RETRY -1 /* Retry the command that got this sense */ -#define SCSIRET_CONTINUE -2 /* Continue with standard sense processing */ - -/* * These entry points are called by the low-end drivers to get services from * whatever high-end drivers they are attached to. Each device type has one * of these statically allocated. diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index 84ab20eca02..f55fa734777 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.68 2004/05/09 04:01:59 krw Exp $ */ +/* $OpenBSD: sd.c,v 1.69 2004/05/17 23:57:51 krw Exp $ */ /* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */ /*- @@ -1099,7 +1099,7 @@ sd_interpret_sense(xs) struct scsi_link *sc_link = xs->sc_link; struct scsi_sense_data *sense = &xs->sense; struct sd_softc *sd = sc_link->device_softc; - int retval = SCSIRET_CONTINUE; + int retval = EJUSTRETURN; /* * If the device is not open yet, let the generic code handle it. @@ -1126,7 +1126,7 @@ sd_interpret_sense(xs) * I really need a sdrestart function I can call here. */ delay(1000000 * 5); /* 5 seconds */ - retval = SCSIRET_RETRY; + retval = ERESTART; } else if (sense->add_sense_code_qual == 0x2) { if (sd->sc_link->flags & SDEV_REMOVABLE) { printf( @@ -1144,7 +1144,7 @@ sd_interpret_sense(xs) sd->sc_dev.dv_xname, retval); retval = EIO; } else { - retval = SCSIRET_RETRY; + retval = ERESTART; } } } diff --git a/sys/scsi/st.c b/sys/scsi/st.c index b9069628c2c..c073dc56308 100644 --- a/sys/scsi/st.c +++ b/sys/scsi/st.c @@ -1,4 +1,4 @@ -/* $OpenBSD: st.c,v 1.37 2004/05/17 12:37:13 aoyama Exp $ */ +/* $OpenBSD: st.c,v 1.38 2004/05/17 23:57:51 krw Exp $ */ /* $NetBSD: st.c,v 1.71 1997/02/21 23:03:49 thorpej Exp $ */ /* @@ -1822,7 +1822,7 @@ st_interpret_sense(xs) else info = xs->datalen; /* bad choice if fixed blocks */ if ((sense->error_code & SSD_ERRCODE) != 0x70) - return SCSIRET_CONTINUE; /* let the generic code handle it */ + return EJUSTRETURN; /* let the generic code handle it */ if (st->flags & ST_FIXEDBLOCKS) { xs->resid = info * st->blksize; if (sense->flags & SSD_EOM) { @@ -1927,7 +1927,7 @@ st_interpret_sense(xs) return 0; } } - return SCSIRET_CONTINUE; + return EJUSTRETURN; } /* |