diff --git a/sys/pci/intpm.c b/sys/pci/intpm.c index 63eb4c4..9c4ddaa 100644 --- a/sys/pci/intpm.c +++ b/sys/pci/intpm.c @@ -83,6 +83,8 @@ static int intsmb_stop_poll(struct intsmb_softc *sc); static int intsmb_free(struct intsmb_softc *sc); static void intsmb_rawintr(void *arg); +static int g_poll = 1; + static int intsmb_probe(device_t dev) { @@ -96,6 +98,9 @@ intsmb_probe(device_t dev) #endif device_set_desc(dev, "Intel PIIX4 SMBUS Interface"); break; + case 0x43851002: + device_set_desc(dev, "ATI Technologies Inc SB600 SMBus"); + break; default: return (ENXIO); } @@ -123,8 +128,12 @@ intsmb_attach(device_t dev) goto fail; } +#undef PCI_INTR_SMB_IRQ9 +#define PCI_INTR_SMB_IRQ9 2 #ifndef NO_CHANGE_PCICONF +#if 0 pci_write_config(dev, PCIR_INTLINE, 0x9, 1); +#endif pci_write_config(dev, PCI_HST_CFG_SMB, PCI_INTR_SMB_IRQ9 | PCI_INTR_SMB_ENABLE, 1); #endif @@ -134,7 +143,7 @@ intsmb_attach(device_t dev) str = "SMI"; break; case PCI_INTR_SMB_IRQ9: - str = "IRQ 9"; + str = "IRQ"; break; default: str = "BOGUS"; @@ -149,9 +158,10 @@ intsmb_attach(device_t dev) goto fail; } - /* Force IRQ 9. */ + /* Force IRQ 20. */ rid = 0; - bus_set_resource(dev, SYS_RES_IRQ, rid, 9, 1); + bus_set_resource(dev, SYS_RES_IRQ, rid, 20, 1); + sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE); if (sc->irq_res == NULL) { @@ -361,7 +371,7 @@ intsmb_start(struct intsmb_softc *sc, unsigned char cmd, int nointr) tmp |= PIIX4_SMBHSTCNT_START; /* While not in autoconfiguration enable interrupts. */ - if (!cold && !nointr) + if (!g_poll && !nointr) tmp |= PIIX4_SMBHSTCNT_INTREN; bus_write_1(sc->io_res, PIIX4_SMBHSTCNT, tmp); } @@ -434,7 +444,7 @@ intsmb_stop(struct intsmb_softc *sc) INTSMB_LOCK_ASSERT(sc); - if (cold) + if (g_poll) /* So that it can use device during device probe on SMBus. */ return (intsmb_stop_poll(sc));