aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Jacob <mjacob@FreeBSD.org>2006-08-21 00:46:10 +0000
committerMatt Jacob <mjacob@FreeBSD.org>2006-08-21 00:46:10 +0000
commit2298c14c62d456b6f5a628777c1a5a25670969fa (patch)
treead792ef6fcbcac3f44fdb8edbdff8de3a91843fe
parent4f9d17d8ab4523e695e51629b7edb69147fe0a08 (diff)
Notes
-rw-r--r--sys/dev/isp/isp_ioctl.h3
-rw-r--r--sys/dev/isp/isp_pci.c6
2 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/isp/isp_ioctl.h b/sys/dev/isp/isp_ioctl.h
index 75ca4064cd4e..4171466e29d2 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 52dab042b3d7..2132b4ee50f6 100644
--- a/sys/dev/isp/isp_pci.c
+++ b/sys/dev/isp/isp_pci.c
@@ -509,6 +509,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