From 3f7d3c1e3c97a88049a4597be0f7fa8bcfbc08f8 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Wed, 13 Apr 2005 16:35:15 +0000 Subject: [PATCH] Since cbb implements the pcib_ interface, it must also implement the pcib_route_interrupt interface. Since there's only one interrupt pin in the CardBus form factor, everybody gets to share it. Implement cbb_route_interrupt to return the interrupt we have. Suggested by: bms --- sys/dev/pccbb/pccbb_pci.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/dev/pccbb/pccbb_pci.c b/sys/dev/pccbb/pccbb_pci.c index 61c27f5a825..6ad20bed177 100644 --- a/sys/dev/pccbb/pccbb_pci.c +++ b/sys/dev/pccbb/pccbb_pci.c @@ -603,6 +603,14 @@ cbb_chipinit(struct cbb_softc *sc) pci_write_config(sc->dev, CBBR_IOLIMIT1, 0, 4); } +static int +cbb_route_interrupt(device_t pcib, device_t dev, int pin) +{ + struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(pcib); + + return (rman_get_start(sc->irq_res)); +} + static device_method_t cbb_methods[] = { /* Device interface */ DEVMETHOD(device_probe, cbb_pci_probe), @@ -638,6 +646,8 @@ static device_method_t cbb_methods[] = { DEVMETHOD(pcib_maxslots, cbb_maxslots), DEVMETHOD(pcib_read_config, cbb_read_config), DEVMETHOD(pcib_write_config, cbb_write_config), + DEVMETHOD(pcib_route_interrupt, cbb_route_interrupt), + {0,0} };