From 9d08b0e53cfbabe07083fc29c9e45212a1570a8d Mon Sep 17 00:00:00 2001 From: Matt Jacob Date: Mon, 21 Aug 2006 00:48:37 +0000 Subject: MFC 1.120: Fix RELENG_4 code version- isp_roles wasn't getting initialized so it ended up defaulting to ISP_ROLE_NONE. My testing hadn't caught it because I was deliberatly setting role via ioctl. --- sys/dev/isp/isp_ioctl.h | 3 --- sys/dev/isp/isp_pci.c | 6 ++++++ 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'sys/dev/isp') diff --git a/sys/dev/isp/isp_ioctl.h b/sys/dev/isp/isp_ioctl.h index d1f3f6754f0c..8704d061ae16 100644 --- a/sys/dev/isp/isp_ioctl.h +++ b/sys/dev/isp/isp_ioctl.h @@ -61,9 +61,6 @@ #define ISP_ROLE_TARGET 0x1 #define ISP_ROLE_INITIATOR 0x2 #define ISP_ROLE_BOTH (ISP_ROLE_TARGET|ISP_ROLE_INITIATOR) -#ifndef ISP_DEFAULT_ROLES -#define ISP_DEFAULT_ROLES ISP_ROLE_BOTH -#endif /* * Get the current adapter role diff --git a/sys/dev/isp/isp_pci.c b/sys/dev/isp/isp_pci.c index 60d72a359b64..54602e4a6b95 100644 --- a/sys/dev/isp/isp_pci.c +++ b/sys/dev/isp/isp_pci.c @@ -484,6 +484,12 @@ isp_get_options(device_t dev, ispsoftc_t *isp) } } #endif + bitmap = 0; + if (getenv_int("role", &bitmap)) { + isp->isp_role = bitmap; + } else { + isp->isp_role = ISP_DEFAULT_ROLES; + } } static void -- cgit v1.3