Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Nov 2009 15:18:05 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r199836 - stable/7/sys/dev/hptrr
Message-ID:  <200911261518.nAQFI5lD085890@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Thu Nov 26 15:18:05 2009
New Revision: 199836
URL: http://svn.freebsd.org/changeset/base/199836

Log:
  MFC r199043:
  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:
  stable/7/sys/dev/hptrr/hptrr_osm_bsd.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/hptrr/hptrr_osm_bsd.c
==============================================================================
--- stable/7/sys/dev/hptrr/hptrr_osm_bsd.c	Thu Nov 26 15:16:03 2009	(r199835)
+++ stable/7/sys/dev/hptrr/hptrr_osm_bsd.c	Thu Nov 26 15:18:05 2009	(r199836)
@@ -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) &&



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911261518.nAQFI5lD085890>