summaryrefslogtreecommitdiffstats
path: root/sys/dev/hptrr/hptrr_osm_bsd.c
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2009-11-08 11:33:51 +0000
committermav <mav@FreeBSD.org>2009-11-08 11:33:51 +0000
commit1090fbd4180eac66144abf0a5300755b2c38927c (patch)
treef121cb86464416069817aaf9839d15e9afb07836 /sys/dev/hptrr/hptrr_osm_bsd.c
parent5f89352d0d04e59017ce5f843c8cd79a22077132 (diff)
downloadFreeBSD-src-1090fbd4180eac66144abf0a5300755b2c38927c.zip
FreeBSD-src-1090fbd4180eac66144abf0a5300755b2c38927c.tar.gz
Introduce hw.hptrr.attach_generic loader tunable to deny hptrr driver
attach chips with generic Marvell (non-HighPoint) PCI identification. These chips are also supported by ata(4). Some vendors, like Supermicro, are using same chips without providing HPT RAID BIOS. PR: kern/120842, kern/136750
Diffstat (limited to 'sys/dev/hptrr/hptrr_osm_bsd.c')
-rw-r--r--sys/dev/hptrr/hptrr_osm_bsd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/hptrr/hptrr_osm_bsd.c b/sys/dev/hptrr/hptrr_osm_bsd.c
index eae952e..78c8b60 100644
--- a/sys/dev/hptrr/hptrr_osm_bsd.c
+++ b/sys/dev/hptrr/hptrr_osm_bsd.c
@@ -34,6 +34,9 @@
#include <dev/hptrr/os_bsd.h>
#include <dev/hptrr/hptintf.h>
+static int attach_generic = 1;
+TUNABLE_INT("hw.hptrr.attach_generic", &attach_generic);
+
static int hpt_probe(device_t dev)
{
PCI_ID pci_id;
@@ -41,6 +44,9 @@ static int hpt_probe(device_t dev)
int i;
PHBA hba;
+ /* Some of supported chips are used not only by HPT. */
+ if (pci_get_vendor(dev) != 0x1103 && !attach_generic)
+ return (ENXIO);
for (him = him_list; him; him = him->next) {
for (i=0; him->get_supported_device_id(i, &pci_id); i++) {
if ((pci_get_vendor(dev) == pci_id.vid) &&
OpenPOWER on IntegriCloud