From: brad Date: Thu, 28 Aug 2008 15:19:03 +0000 (+0000) Subject: Do not try to attach to rev 2 BCM4311/BCM4312 chipsets as they X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=6ef2fa6be1b9f93c5a0c7e795cba97441b382b7b;p=openbsd Do not try to attach to rev 2 BCM4311/BCM4312 chipsets as they require v4 firmware and the driver currently uses v3 firmware. ok mglocker@ --- diff --git a/sys/dev/pci/if_bwi_pci.c b/sys/dev/pci/if_bwi_pci.c index 7346df6c09e..209c899320f 100644 --- a/sys/dev/pci/if_bwi_pci.c +++ b/sys/dev/pci/if_bwi_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bwi_pci.c,v 1.7 2008/05/23 08:49:27 brad Exp $ */ +/* $OpenBSD: if_bwi_pci.c,v 1.8 2008/08/28 15:19:03 brad Exp $ */ /* * Copyright (c) 2007 Marcus Glocker @@ -93,6 +93,18 @@ const struct pci_matchid bwi_pci_devices[] = { int bwi_pci_match(struct device *parent, void *match, void *aux) { + struct pci_attach_args *pa = aux; + + /* + * The second revision of the BCM4311/BCM4312 + * chips require v4 firmware. + */ + if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_BROADCOM && + (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BROADCOM_BCM4311 || + PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BROADCOM_BCM4312) && + PCI_REVISION(pa->pa_class) == 0x02) + return (0); + return (pci_matchbyid((struct pci_attach_args *)aux, bwi_pci_devices, sizeof(bwi_pci_devices) / sizeof(bwi_pci_devices[0]))); }