Date: Mon, 15 Oct 2012 17:59:39 -0700 From: Xin Li <delphij@delphij.net> To: FreeBSD Tinderbox <tinderbox@freebsd.org> Cc: amd64@freebsd.org, current@freebsd.org Subject: Re: [head tinderbox] failure on amd64/amd64 Message-ID: <507CB17B.60102@delphij.net> In-Reply-To: <201210160049.q9G0nbDo019533@freebsd-current.sentex.ca> References: <201210160049.q9G0nbDo019533@freebsd-current.sentex.ca>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------070007050109070401070508 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 The attached patch will hopefully fix the build... Cheers, - -- Xin LI <delphij@delphij.net> https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJQfLF7AAoJEG80Jeu8UPuzblMH+wUf3f24s3Uer0+R50evGz/g 49rC9XmDT4v4CYWV80nUmIzy21ZeuSkKOXOoDjxyknKTz510PtC4PwE4ETNWdE39 vTwSF5lpGfjsDO0mF/uERvJl2EblgDmgaUO9lz4OTbcIX2dA0EIwBTjpQ2hICt6H ogrqNskoGhNj6b35PW/7901pN9jtrTqViOfvVEy63XgSwBlSdceK3hu398vbWPJw YB7fBXmnrrtj/Zl93eIOytnfBuD3Cx7RLvl4Q/bRQv5EWD9jb0vY0RvIQ/05Jzbd qiaSrjx9z821jDxpRMegOZbPU0CGxsZwqS79IJkE9nY+bA42n6RpE7V9PhZuYAE= =sgg+ -----END PGP SIGNATURE----- --------------070007050109070401070508 Content-Type: text/plain; charset=UTF-8; name="aha.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="aha.diff" Index: sys/dev/aha/aha.c =================================================================== --- sys/dev/aha/aha.c (revision 241599) +++ sys/dev/aha/aha.c (working copy) @@ -62,6 +62,8 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> #include <sys/bus.h> +#include <sys/conf.h> +#include <sys/rman.h> #include <sys/systm.h> #include <sys/malloc.h> #include <sys/kernel.h> @@ -173,8 +175,7 @@ static void ahatimeout(void *arg); /* Exported functions */ void -aha_alloc(struct aha_softc *aha, int unit, bus_space_tag_t tag, - bus_space_handle_t bsh) +aha_alloc(struct aha_softc *aha) { SLIST_INIT(&aha->free_aha_ccbs); @@ -1107,7 +1108,7 @@ ahaexecuteccb(void *arg, bus_dma_segment_t *dm_seg device_printf(aha->dev, "Encountered busy mailbox with %d out of %d " "commands active!!!", aha->active_ccbs, aha->max_ccbs); - callout_stop(&aacb->timer); + callout_stop(&accb->timer); if (nseg != 0) bus_dmamap_unload(aha->buffer_dmat, accb->dmamap); ahafreeccb(aha, accb); @@ -1833,7 +1834,7 @@ ahatimeout(void *arg) * later which will attempt a bus reset. */ accb->flags |= ACCB_DEVICE_RESET; - callout_reset(&aacb->timer, 2 * hz, ahatimeout, accb); + callout_reset(&accb->timer, 2 * hz, ahatimeout, accb); aha->recovery_accb->hccb.opcode = INITIATOR_BUS_DEV_RESET; /* No Data Transfer */ Index: sys/dev/aha/aha_isa.c =================================================================== --- sys/dev/aha/aha_isa.c (revision 241599) +++ sys/dev/aha/aha_isa.c (working copy) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include <sys/kernel.h> #include <sys/lock.h> #include <sys/mutex.h> +#include <sys/rman.h> #include <machine/bus.h> #include <machine/resource.h> @@ -126,7 +127,7 @@ aha_isa_probe(device_t dev) if (aha->port == NULL) return (ENXIO); - port_start = rman_get_start(port_res); + port_start = rman_get_start(aha->port); aha_alloc(aha); /* See if there is really a card present */ @@ -261,7 +262,7 @@ aha_isa_attach(device_t dev) } error = bus_setup_intr(dev, aha->irq, INTR_TYPE_CAM|INTR_ENTROPY| - INTR_MPSAFE, NULL, aha_intr, aha, &aha->ih); + INTR_MPSAFE, NULL, aha_intr, aha, &(aha->ih)); if (error) { device_printf(dev, "Unable to register interrupt handler\n"); aha_detach(aha); @@ -321,9 +322,9 @@ aha_isa_identify(driver_t *driver, device_t parent * XXX kldload/kldunload. */ rid = 0; - aha->port = bus_alloc_resource(parent, SYS_RES_IOPORT, &rid, + aha.port = bus_alloc_resource(parent, SYS_RES_IOPORT, &rid, ioport, ioport, AHA_NREGS, RF_ACTIVE); - if (aha->port == NULL) + if (aha.port == NULL) continue; aha_alloc(&aha); /* See if there is really a card present */ @@ -336,7 +337,7 @@ aha_isa_identify(driver_t *driver, device_t parent * that. */ not_this_one:; - bus_release_resource(parent, SYS_RES_IOPORT, rid, aha->port); + bus_release_resource(parent, SYS_RES_IOPORT, rid, aha.port); aha_free(&aha); } } Index: sys/dev/aha/ahareg.h =================================================================== --- sys/dev/aha/ahareg.h (revision 241599) +++ sys/dev/aha/ahareg.h (working copy) @@ -370,12 +370,12 @@ struct aha_softc { int irqrid; int portrid; int drqrid; - void **ih; + void *ih; device_t dev; struct mtx lock; }; -void aha_alloc(struct aha_softc *, int, bus_space_tag_t, bus_space_handle_t); +void aha_alloc(struct aha_softc *); int aha_attach(struct aha_softc *); int aha_cmd(struct aha_softc *, aha_op_t, uint8_t *, u_int, uint8_t *, u_int, u_int); @@ -389,11 +389,11 @@ int aha_probe(struct aha_softc *); #define DEFAULT_CMD_TIMEOUT 10000 /* 1 sec */ -#define aha_inb(aha, port) \ - bus_read_1((aha)->port, port) +#define aha_inb(aha, reg) \ + bus_read_1((aha)->port, reg) -#define aha_outb(aha, port, value) \ - bus_write_1((aha)->port, port, value) +#define aha_outb(aha, reg, value) \ + bus_write_1((aha)->port, reg, value) #define ADP0100_PNP 0x00019004 /* ADP0100 */ #define AHA1540_PNP 0x40159004 /* ADP1540 */ --------------070007050109070401070508--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?507CB17B.60102>