summaryrefslogtreecommitdiff
path: root/sys/dev/isp/isp_pci.c
diff options
context:
space:
mode:
authorMatt Jacob <mjacob@FreeBSD.org>2004-02-07 03:39:42 +0000
committerMatt Jacob <mjacob@FreeBSD.org>2004-02-07 03:39:42 +0000
commit87ab7d39a43064535ba59f40accffdcdccf9a298 (patch)
treece663a3054618013a955192d6b0a8697fd253df3 /sys/dev/isp/isp_pci.c
parente0d3cfb7beca04cd6e25f04d497deada0b19e474 (diff)
Notes
Diffstat (limited to 'sys/dev/isp/isp_pci.c')
-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 ad3c14831650..aa5d60a59e2d 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