Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Jun 2007 12:02:54 GMT
From:      Sepherosa Ziehau <sephe@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 122200 for review
Message-ID:  <200706231202.l5NC2sv1033875@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=122200

Change 122200 by sephe@sephe_enigma:sam_wifi on 2007/06/23 12:02:41

	Filter atapci device on Intel PRO/1000 PM (a NIC).  This makes
	my installed system boot, when I plug this funny NIC in.

Affected files ...

.. //depot/projects/wifi/sys/dev/ata/ata-pci.c#17 edit

Differences ...

==== //depot/projects/wifi/sys/dev/ata/ata-pci.c#17 (text+ko) ====

@@ -56,6 +56,17 @@
 #define IOMASK                  0xfffffffc
 #define ATA_PROBE_OK            -10
 
+static const struct none_atapci {
+	uint16_t	vendor;
+	uint16_t	device;
+	uint16_t	subvendor;
+	uint16_t	subdevice;
+} none_atapci_table[] = {
+	/* Appears on Intel PRO/1000 PM */
+	{ ATA_INTEL_ID, 0x108d, ATA_INTEL_ID, 0x0000 },
+	{ 0xffff, 0, 0, 0 }
+};
+
 int
 ata_legacy(device_t dev)
 {
@@ -173,6 +184,19 @@
     /* unknown chipset, try generic DMA if it seems possible */
     if ((pci_get_class(dev) == PCIC_STORAGE) &&
 	(pci_get_subclass(dev) == PCIS_STORAGE_IDE)) {
+	uint16_t vendor, device, subvendor, subdevice;
+	const struct none_atapci *e;
+
+	vendor = pci_get_vendor(dev);
+	device = pci_get_device(dev);
+	subvendor = pci_get_subvendor(dev);
+	subdevice = pci_get_subdevice(dev);
+	for (e = none_atapci_table; e->vendor != 0xffff; ++e) {
+	    if (e->vendor == vendor && e->device == device &&
+	    	e->subvendor == subvendor && e->subdevice == subdevice)
+		return ENXIO;
+	}
+
 	if (!ata_generic_ident(dev))
 	    return ATA_PROBE_OK;
     }



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