PERFORCE change 95143 for review

John-Mark Gurney jmg at FreeBSD.org
Thu Apr 13 05:22:00 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=95143

Change 95143 by jmg at jmg_arlene on 2006/04/13 05:21:39

	make sure pciintr is an array index..

Affected files ...

.. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/hv_pci.c#39 edit

Differences ...

==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/hv_pci.c#39 (text+ko) ====

@@ -440,6 +440,7 @@
 	KASSERT(pciintr >= 1 && pciintr <= 4,
 	    ("interrupt out of range"));
 	rid = pciintr;
+	pciintr--;
 	if (sc->hs_intr[pciintr] == NULL) {
 		if ((sc->hs_intr[pciintr] = bus_alloc_resource_any(dev,
 		    SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE)) == NULL) {
@@ -477,6 +478,7 @@
 
 	sc = device_get_softc(dev);
 	pciintr = rman_get_start(vec);
+	pciintr--;
 
 	error = bus_teardown_intr(dev, sc->hs_intr[pciintr], cookie);
 	if (error)


More information about the p4-projects mailing list