685dcdecfd842a720fbddf5bbe499f8db1aec79b
[openwrt/svn-archive/archive.git] / target / linux / brcm47xx / patches-3.0 / 0019-bcma-to-not-route-irqs-on-non-pci-devices.patch
1 From 1b23f310d4a7d24efe5dffbbde6b2b84252e2d7b Mon Sep 17 00:00:00 2001
2 From: Hauke Mehrtens <hauke@hauke-m.de>
3 Date: Fri, 22 Jul 2011 14:18:21 +0200
4 Subject: [PATCH 19/22] bcma: to not route irqs on non pci devices
5
6
7 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
8 ---
9 drivers/bcma/driver_pci.c | 9 ++++++++-
10 1 files changed, 8 insertions(+), 1 deletions(-)
11
12 --- a/drivers/bcma/driver_pci.c
13 +++ b/drivers/bcma/driver_pci.c
14 @@ -208,7 +208,14 @@ int bcma_core_pci_irq_ctl(struct bcma_dr
15 {
16 struct pci_dev *pdev = pc->core->bus->host_pci;
17 u32 coremask, tmp;
18 - int err;
19 + int err = 0;
20 +
21 + if (core->bus->hosttype != BCMA_HOSTTYPE_PCI) {
22 + /* This bcma device is not on a PCI host-bus. So the IRQs are
23 + * not routed through the PCI core.
24 + * So we must not enable routing through the PCI core. */
25 + goto out;
26 + }
27
28 err = pci_read_config_dword(pdev, BCMA_PCI_IRQMASK, &tmp);
29 if (err)