summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>2004-02-07 03:39:42 +0000
committermjacob <mjacob@FreeBSD.org>2004-02-07 03:39:42 +0000
commit7b1a699610125741fad060fe671f1cc9908a6416 (patch)
treece663a3054618013a955192d6b0a8697fd253df3 /sys/dev
parent480a391ebf42a0bbbfc4101633b8e91bc451dded (diff)
downloadFreeBSD-src-7b1a699610125741fad060fe671f1cc9908a6416.zip
FreeBSD-src-7b1a699610125741fad060fe671f1cc9908a6416.tar.gz
If we're defined to have a default role for target mode, make it
just ISP_ROLE_TARGET- not both. MFC after: 1 week
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/isp/isp_pci.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/isp/isp_pci.c b/sys/dev/isp/isp_pci.c
index ad3c148..aa5d60a 100644
--- a/sys/dev/isp/isp_pci.c
+++ b/sys/dev/isp/isp_pci.c
@@ -355,7 +355,6 @@ isp_pci_attach(device_t dev)
/*
* Figure out if we're supposed to skip this one.
- * If we are, we actually go to ISP_ROLE_NONE.
*/
tval = 0;
@@ -366,14 +365,14 @@ isp_pci_attach(device_t dev)
return (0);
}
- role = 0;
+ role = -1;
if (resource_int_value(device_get_name(dev), device_get_unit(dev),
- "role", &role) == 0 &&
- ((role & ~(ISP_ROLE_INITIATOR|ISP_ROLE_TARGET)) == 0)) {
+ "role", &role) == 0 && role != -1) {
+ role &= (ISP_ROLE_INITIATOR|ISP_ROLE_TARGET);
device_printf(dev, "setting role to 0x%x\n", role);
} else {
#ifdef ISP_TARGET_MODE
- role = ISP_ROLE_INITIATOR|ISP_ROLE_TARGET;
+ role = ISP_ROLE_TARGET;
#else
role = ISP_DEFAULT_ROLES;
#endif
OpenPOWER on IntegriCloud