On Tue, 29 Mar 2016 19:41:30 +0200
Lukas Wunner <lu...@wunner.de> wrote:

> +static void quirk_apple_b43_reset(struct pci_dev *dev)
> +{
> +     void __iomem *mmio;
> +
> +     if (!dmi_match(DMI_BOARD_VENDOR, "Apple Inc.") || !dev->bus->self ||
> +         pci_pcie_type(dev->bus->self) != PCI_EXP_TYPE_ROOT_PORT)
> +             return;
> +
> +     mmio = pci_iomap(dev, 0, 0);
> +     if (!mmio) {
> +             pr_err("b43 quirk: Cannot iomap device, IRQ storm ahead\n");
> +             return;
> +     }
> +     iowrite32(BCMA_RESET_CTL_RESET,
> +               mmio + (1 * BCMA_CORE_SIZE) + BCMA_RESET_CTL);
> +     pci_iounmap(dev, mmio);
> +}
> +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM, 0x4331, 
> quirk_apple_b43_reset);

Looks good, as long as the wireless core is always guaranteed to be
the second core on that PCI device.

-- 
Michael

Attachment: pgpLR5GrwILVl.pgp
Description: OpenPGP digital signature

_______________________________________________
b43-dev mailing list
b43-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/b43-dev

Reply via email to