linux/drivers/ssb
matthieu castet ea4bbfd004 MIPS: BC47xx: Fix SSB irq setup
The current ssb irq setup in ssb_mipscore_init has the problem that it
configures some device on some irq without checking that the irq is not
taken by an other device.

For example in my case PCI host is on irq 0 and IPSEC on irq 3.
The current code:
  - store in dev->irq that IPSEC irq is 3 + 2
  - do a set_irq 0->3 on PCI host

But now IPSEC irq is not routed anymore to the mips code and dev->irq is
wrong.  This causes a problem described in [1].

This patch tries to solve the problem by making set_irq configure the
device we want to take the irq on the shared irq0. The previous example
becomes:
  - store in dev->irq that IPSEC irq is 3 + 2
  - do a set_irq 0->3 on PCI host:
  - irq 3 is already taken by IPSEC. do a set_irq 3->0 on IPSEC

I also added some code to print the irq configuration after irq setup to
allow easier debugging. And I add extra checking in ssb_mips_irq to report
device without irq or device with not routed irq.

[1] http://www.danm.de/files/src/bcm5365p/REPORTED_DEVICES

Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Acked-by : Michael Buesch <mb@bu3sch.de>
Tested-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-07-03 15:45:27 +01:00
..
b43_pci_bridge.c b43: Add BCM4307 PCI-ID 2009-03-27 20:13:20 -04:00
driver_chipcommon_pmu.c ssb: Add PMU support 2009-02-09 15:03:49 -05:00
driver_chipcommon.c ssb: Add PMU support 2009-02-09 15:03:49 -05:00
driver_extif.c ssb: Make the GPIO API reentrancy safe 2008-02-20 20:11:49 -05:00
driver_gige.c ssb: Add Gigabit Ethernet driver 2008-03-06 17:09:43 -05:00
driver_mipscore.c MIPS: BC47xx: Fix SSB irq setup 2009-07-03 15:45:27 +01:00
driver_pcicore.c ssb-pcicore: Fix IRQ-vector init on embedded devices 2008-07-07 15:31:40 -04:00
embedded.c SSB: BCM47xx: Export ssb_watchdog_timer_set 2009-06-08 16:57:50 +01:00
Kconfig ssb: remove EXPERIMENTAL dependencies. 2009-03-27 20:13:04 -04:00
main.c ssb: struct device - replace bus_id with dev_name(), dev_set_name() 2008-11-21 11:06:03 -05:00
Makefile ssb: Add PMU support 2009-02-09 15:03:49 -05:00
pci.c ssb: Add SPROM fallback support 2009-03-05 14:39:32 -05:00
pcihost_wrapper.c ssb: struct device - replace bus_id with dev_name(), dev_set_name() 2008-11-21 11:06:03 -05:00
pcmcia.c pcmcia: deprecate CS_NO_MORE_ITEMS 2008-08-23 02:29:54 +02:00
scan.c ssb: Fix probing of PCI cores if PCI and PCIE core is available 2008-01-08 23:30:10 -08:00
sprom.c ssb: Add SPROM fallback support 2009-03-05 14:39:32 -05:00
ssb_private.h ssb: Add SPROM fallback support 2009-03-05 14:39:32 -05:00