diff options
author | Matthew Dempsky <matthew@cvs.openbsd.org> | 2011-05-24 20:27:12 +0000 |
---|---|---|
committer | Matthew Dempsky <matthew@cvs.openbsd.org> | 2011-05-24 20:27:12 +0000 |
commit | 74ab674d435acdab3c4aa84f2cb2e4cd6b2d6f6b (patch) | |
tree | 64afc765c3480299856522cd5b0b04e415ecb4bd /sys/dev/usb/umass_scsi.c | |
parent | 84cded86709d8bc018a9101ce6a067d69b5aa936 (diff) |
On OpenBSD, we've always attached scsibus(4) to umass(4), even for
ATAPI devices. atapiscsi(4) is only for handling ATAPI devices on an
ATA bus, so umass(4) shouldn't care about it.
ok krw@, dlg@; no objections from deraadt@
Diffstat (limited to 'sys/dev/usb/umass_scsi.c')
-rw-r--r-- | sys/dev/usb/umass_scsi.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/sys/dev/usb/umass_scsi.c b/sys/dev/usb/umass_scsi.c index 3c87178a28d..f82bdc52c52 100644 --- a/sys/dev/usb/umass_scsi.c +++ b/sys/dev/usb/umass_scsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umass_scsi.c,v 1.34 2011/04/19 23:21:15 matthew Exp $ */ +/* $OpenBSD: umass_scsi.c,v 1.35 2011/05/24 20:27:11 matthew Exp $ */ /* $NetBSD: umass_scsipi.c,v 1.9 2003/02/16 23:14:08 augustss Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -30,8 +30,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "atapiscsi.h" - #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> @@ -57,7 +55,6 @@ struct umass_scsi_softc { struct umassbus_softc base; struct scsi_link sc_link; - struct scsi_adapter sc_adapter; struct scsi_iopool sc_iopool; int sc_open; @@ -68,12 +65,16 @@ struct umass_scsi_softc { #define UMASS_SCSIID_HOST 0x00 #define UMASS_SCSIID_DEVICE 0x01 -#define UMASS_ATAPI_DRIVE 0 - int umass_scsi_probe(struct scsi_link *); void umass_scsi_cmd(struct scsi_xfer *); void umass_scsi_minphys(struct buf *, struct scsi_link *); +struct scsi_adapter umass_scsi_switch = { + umass_scsi_cmd, + umass_scsi_minphys, + umass_scsi_probe +}; + void umass_scsi_cb(struct umass_softc *sc, void *priv, int residue, int status); void umass_scsi_sense_cb(struct umass_softc *sc, void *priv, int residue, @@ -111,7 +112,6 @@ umass_scsi_attach(struct umass_softc *sc) return (0); } -#if NATAPISCSI > 0 int umass_atapi_attach(struct umass_softc *sc) { @@ -139,7 +139,6 @@ umass_atapi_attach(struct umass_softc *sc) return (0); } -#endif struct umass_scsi_softc * umass_scsi_setup(struct umass_softc *sc) @@ -152,14 +151,9 @@ umass_scsi_setup(struct umass_softc *sc) scsi_iopool_init(&scbus->sc_iopool, scbus, umass_io_get, umass_io_put); - /* Fill in the adapter. */ - scbus->sc_adapter.scsi_cmd = umass_scsi_cmd; - scbus->sc_adapter.scsi_minphys = umass_scsi_minphys; - scbus->sc_adapter.dev_probe = umass_scsi_probe; - /* Fill in the link. */ scbus->sc_link.adapter_buswidth = 2; - scbus->sc_link.adapter = &scbus->sc_adapter; + scbus->sc_link.adapter = &umass_scsi_switch; scbus->sc_link.adapter_softc = sc; scbus->sc_link.openings = 1; scbus->sc_link.quirks |= SDEV_ONLYBIG | sc->sc_busquirks; |