diff options
Diffstat (limited to 'sys/scsi/cd.c')
-rw-r--r-- | sys/scsi/cd.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c index 47790550db6..fdcb74671c5 100644 --- a/sys/scsi/cd.c +++ b/sys/scsi/cd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd.c,v 1.174 2010/07/01 03:01:37 matthew Exp $ */ +/* $OpenBSD: cd.c,v 1.175 2010/07/01 05:11:18 krw Exp $ */ /* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */ /* @@ -163,13 +163,6 @@ struct cfdriver cd_cd = { struct dkdriver cddkdriver = { cdstrategy }; -struct scsi_device cd_switch = { - cd_interpret_sense, - NULL, /* we have a queue, which is started by this */ - NULL, /* we do not have an async handler */ - NULL, /* no per driver cddone */ -}; - const struct scsi_inquiry_pattern cd_patterns[] = { {T_CDROM, T_REMOV, "", "", ""}, @@ -216,7 +209,7 @@ cdattach(struct device *parent, struct device *self, void *aux) * Store information needed to contact our base driver */ sc->sc_link = sc_link; - sc_link->device = &cd_switch; + sc_link->interpret_sense = cd_interpret_sense; sc_link->device_softc = sc; if (sc_link->openings > CDOUTSTANDING) sc_link->openings = CDOUTSTANDING; @@ -701,7 +694,10 @@ cd_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 = cd_interpret_sense(xs); if (error == 0) { bp->b_error = 0; bp->b_resid = xs->resid; @@ -1962,7 +1958,7 @@ cd_interpret_sense(struct scsi_xfer *xs) if (((sc_link->flags & SDEV_OPEN) == 0) || (serr != SSD_ERRCODE_CURRENT && serr != SSD_ERRCODE_DEFERRED)) - return (EJUSTRETURN); /* let the generic code handle it */ + return (scsi_interpret_sense(xs)); /* * We do custom processing in cd for the unit becoming ready @@ -1992,7 +1988,7 @@ cd_interpret_sense(struct scsi_xfer *xs) default: break; } - return (EJUSTRETURN); /* use generic handler in scsi_base */ + return (scsi_interpret_sense(xs)); } #if defined(__macppc__) |