PERFORCE change 122200 for review
Sepherosa Ziehau
sephe at FreeBSD.org
Sat Jun 23 12:02:56 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=122200
Change 122200 by sephe at 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;
}
More information about the p4-projects
mailing list