summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Dempsky <matthew@cvs.openbsd.org>2011-07-09 04:37:54 +0000
committerMatthew Dempsky <matthew@cvs.openbsd.org>2011-07-09 04:37:54 +0000
commit6d7b6543682b14526884408a8a87d198ac7aa572 (patch)
tree27c016e033a3ea91fd45f442ca90e26034f3e7b9
parent1df723bb72783f9b7137f873600153a068351f9f (diff)
Switch umass(4) to use a single target scsibus with
SCSI_NO_ADAPTER_TARGET instead of a two target bus with a reserved "host" target. ok krw@
-rw-r--r--sys/dev/usb/umass_scsi.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/dev/usb/umass_scsi.c b/sys/dev/usb/umass_scsi.c
index 921015f439e..83adb2e768b 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.36 2011/07/08 22:09:27 matthew Exp $ */
+/* $OpenBSD: umass_scsi.c,v 1.37 2011/07/09 04:37:53 matthew Exp $ */
/* $NetBSD: umass_scsipi.c,v 1.9 2003/02/16 23:14:08 augustss Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -62,8 +62,7 @@ struct umass_scsi_softc {
};
-#define UMASS_SCSIID_HOST 0x00
-#define UMASS_SCSIID_DEVICE 0x01
+#define UMASS_SCSIID_DEVICE 0x00
int umass_scsi_probe(struct scsi_link *);
void umass_scsi_cmd(struct scsi_xfer *);
@@ -91,13 +90,13 @@ umass_scsi_attach(struct umass_softc *sc)
struct umass_scsi_softc *scbus;
scbus = umass_scsi_setup(sc);
- scbus->sc_link.adapter_target = UMASS_SCSIID_HOST;
+ scbus->sc_link.adapter_target = SCSI_NO_ADAPTER_TARGET;
scbus->sc_link.flags &= ~SDEV_ATAPI;
scbus->sc_link.flags |= SDEV_UMASS;
bzero(&saa, sizeof(saa));
saa.saa_sc_link = &scbus->sc_link;
- saa.saa_targets = 2;
+ saa.saa_targets = 1;
saa.saa_luns = sc->maxlun + 1;
DPRINTF(UDMASS_USB, ("%s: umass_attach_bus: SCSI\n"
@@ -120,13 +119,13 @@ umass_atapi_attach(struct umass_softc *sc)
struct umass_scsi_softc *scbus;
scbus = umass_scsi_setup(sc);
- scbus->sc_link.adapter_target = UMASS_SCSIID_HOST;
+ scbus->sc_link.adapter_target = SCSI_NO_ADAPTER_TARGET;
scbus->sc_link.openings = 1;
scbus->sc_link.flags |= SDEV_ATAPI;
bzero(&saa, sizeof(saa));
saa.saa_sc_link = &scbus->sc_link;
- saa.saa_targets = 2;
+ saa.saa_targets = 1;
saa.saa_luns = 1;
DPRINTF(UDMASS_USB, ("%s: umass_attach_bus: ATAPI\n"