diff options
Diffstat (limited to 'sys/scsi/sd.c')
-rw-r--r-- | sys/scsi/sd.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index 542364e06e0..d085f1b5418 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.200 2010/07/01 03:01:37 matthew Exp $ */ +/* $OpenBSD: sd.c,v 1.201 2010/07/01 05:11:18 krw Exp $ */ /* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */ /*- @@ -113,13 +113,6 @@ struct cfdriver sd_cd = { struct dkdriver sddkdriver = { sdstrategy }; -struct scsi_device sd_switch = { - sd_interpret_sense, /* check out error handler first */ - NULL, /* have a queue, served by this */ - NULL, /* have no async handler */ - NULL, /* have no done handler */ -}; - const struct scsi_inquiry_pattern sd_patterns[] = { {T_DIRECT, T_FIXED, "", "", ""}, @@ -174,7 +167,7 @@ sdattach(struct device *parent, struct device *self, void *aux) * Store information needed to contact our base driver */ sc->sc_link = sc_link; - sc_link->device = &sd_switch; + sc_link->interpret_sense = sd_interpret_sense; sc_link->device_softc = sc; /* @@ -770,7 +763,10 @@ sd_buf_done(struct scsi_xfer *xs) case XS_SENSE: case XS_SHORTSENSE: - error = scsi_interpret_sense(xs); +#ifdef SCSIDEBUG + scsi_sense_print_debug(xs); +#endif + error = sd_interpret_sense(xs); if (error == 0) { bp->b_error = 0; bp->b_resid = xs->resid; @@ -1209,7 +1205,7 @@ sd_interpret_sense(struct scsi_xfer *xs) (serr != SSD_ERRCODE_CURRENT && serr != SSD_ERRCODE_DEFERRED) || ((sense->flags & SSD_KEY) != SKEY_NOT_READY) || (sense->extra_len < 6)) - return (EJUSTRETURN); + return (scsi_interpret_sense(xs)); switch (ASC_ASCQ(sense)) { case SENSE_NOT_READY_BECOMING_READY: @@ -1229,7 +1225,7 @@ sd_interpret_sense(struct scsi_xfer *xs) break; default: - retval = EJUSTRETURN; + retval = scsi_interpret_sense(xs); break; } |