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
This commit is contained in:
Alexander Motin 2009-11-08 11:33:51 +00:00
parent 88260ae614
commit c43ee88764
2 changed files with 16 additions and 1 deletions

View File

@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd December 14, 2007
.Dd November 8, 2009
.Dt HPTRR 4
.Os
.Sh NAME
@ -46,6 +46,14 @@ module at boot time, place the following line in
.Bd -literal -offset indent
hptrr_load="YES"
.Ed
.Pp
The following tunables are settable from the loader:
.Bl -ohang
.It Va hw.hptrr.attach_generic
set to 0 to deny driver attach to chips with generic Marvell (non-HighPoint)
PCI identification. These chips are also supported by ata(4).
Some vendors are using same chips, but without providing RAID BIOS.
.El
.Sh DESCRIPTION
The
.Nm
@ -101,6 +109,7 @@ manual page for details on support.
.Pp
This driver supersedes the older rr232x driver.
.Sh SEE ALSO
.Xr ata 4 ,
.Xr cam 4 ,
.Xr hptmv 4 ,
.Xr loader 8

View File

@ -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) &&