svn commit: r199043 - in head: share/man/man4 sys/dev/hptrr
Alexander Motin
mav at FreeBSD.org
Sun Nov 8 11:33:51 UTC 2009
Author: mav
Date: Sun Nov 8 11:33:51 2009
New Revision: 199043
URL: http://svn.freebsd.org/changeset/base/199043
Log:
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
Modified:
head/share/man/man4/hptrr.4
head/sys/dev/hptrr/hptrr_osm_bsd.c
Modified: head/share/man/man4/hptrr.4
==============================================================================
--- head/share/man/man4/hptrr.4 Sun Nov 8 11:32:39 2009 (r199042)
+++ head/share/man/man4/hptrr.4 Sun Nov 8 11:33:51 2009 (r199043)
@@ -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
.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
Modified: head/sys/dev/hptrr/hptrr_osm_bsd.c
==============================================================================
--- head/sys/dev/hptrr/hptrr_osm_bsd.c Sun Nov 8 11:32:39 2009 (r199042)
+++ head/sys/dev/hptrr/hptrr_osm_bsd.c Sun Nov 8 11:33:51 2009 (r199043)
@@ -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) &&
More information about the svn-src-head
mailing list