diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/usb/files.usb | 6 | ||||
-rw-r--r-- | sys/dev/usb/umass.c | 8 | ||||
-rw-r--r-- | sys/dev/usb/umass_scsi.c | 22 | ||||
-rw-r--r-- | sys/dev/usb/usb_port.h | 4 |
4 files changed, 13 insertions, 27 deletions
diff --git a/sys/dev/usb/files.usb b/sys/dev/usb/files.usb index 9fff2e9a8ab..394d18d19d8 100644 --- a/sys/dev/usb/files.usb +++ b/sys/dev/usb/files.usb @@ -1,4 +1,4 @@ -# $OpenBSD: files.usb,v 1.97 2011/01/06 19:32:09 damien Exp $ +# $OpenBSD: files.usb,v 1.98 2011/05/24 20:27:11 matthew Exp $ # $NetBSD: files.usb,v 1.16 2000/02/14 20:29:54 augustss Exp $ # # Config file and device description for machine-independent USB code. @@ -115,11 +115,11 @@ file dev/usb/ulpt.c ulpt needs-flag # Mass storage -device umass: scsi, atapi, ata +device umass: scsi attach umass at uhub file dev/usb/umass.c umass file dev/usb/umass_quirks.c umass -file dev/usb/umass_scsi.c umass & (scsibus | atapiscsi) +file dev/usb/umass_scsi.c umass & scsibus # Misc diff --git a/sys/dev/usb/umass.c b/sys/dev/usb/umass.c index 2c1511dd4ab..e1bece5b2f5 100644 --- a/sys/dev/usb/umass.c +++ b/sys/dev/usb/umass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umass.c,v 1.60 2011/01/25 20:03:36 jakemsr Exp $ */ +/* $OpenBSD: umass.c,v 1.61 2011/05/24 20:27:11 matthew Exp $ */ /* $NetBSD: umass.c,v 1.116 2004/06/30 05:53:46 mycroft Exp $ */ /* @@ -124,8 +124,6 @@ * umass_cam_cb again to complete the CAM command. */ -#include "atapiscsi.h" - #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> @@ -597,11 +595,7 @@ umass_attach(struct device *parent, struct device *self, void *aux) case UMASS_CPROTO_UFI: case UMASS_CPROTO_ATAPI: -#if (NATAPIBUS > 0) || (NATAPISCSI > 0) error = umass_atapi_attach(sc); -#else - printf("%s: atapiscsi not configured\n", sc->sc_dev.dv_xname); -#endif break; case UMASS_CPROTO_ISD_ATA: 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; diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h index a18fb4623a4..112dda31ccc 100644 --- a/sys/dev/usb/usb_port.h +++ b/sys/dev/usb/usb_port.h @@ -1,4 +1,4 @@ -/* $OpenBSD: usb_port.h,v 1.99 2009/11/04 19:14:10 kettenis Exp $ */ +/* $OpenBSD: usb_port.h,v 1.100 2011/05/24 20:27:11 matthew Exp $ */ /* $NetBSD: usb_port.h,v 1.62 2003/02/15 18:33:30 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb_port.h,v 1.21 1999/11/17 22:33:47 n_hibma Exp $ */ @@ -42,8 +42,6 @@ #define Static -#define UMASS_ATAPISTR "atapiscsi" - /* periph_quirks */ #define PQUIRK_NOSENSE ADEV_NOSENSE /* can't REQUEST SENSE */ #define PQUIRK_ONLYBIG SDEV_ONLYBIG |