From 7b1a699610125741fad060fe671f1cc9908a6416 Mon Sep 17 00:00:00 2001 From: mjacob Date: Sat, 7 Feb 2004 03:39:42 +0000 Subject: If we're defined to have a default role for target mode, make it just ISP_ROLE_TARGET- not both. MFC after: 1 week --- sys/dev/isp/isp_pci.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'sys/dev') 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 -- cgit v1.1