From owner-svn-src-head@FreeBSD.ORG Tue Oct 16 08:40:10 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 501ADE70; Tue, 16 Oct 2012 08:40:10 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 36B068FC16; Tue, 16 Oct 2012 08:40:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9G8eAjc094072; Tue, 16 Oct 2012 08:40:10 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9G8e9K7094068; Tue, 16 Oct 2012 08:40:09 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210160840.q9G8e9K7094068@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 16 Oct 2012 08:40:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241603 - head/sys/dev/aha X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Oct 2012 08:40:10 -0000 Author: glebius Date: Tue Oct 16 08:40:09 2012 New Revision: 241603 URL: http://svn.freebsd.org/changeset/base/241603 Log: Fix build of aha(4). Submitted by: delphij Modified: head/sys/dev/aha/aha.c head/sys/dev/aha/aha_isa.c head/sys/dev/aha/ahareg.h Modified: head/sys/dev/aha/aha.c ============================================================================== --- head/sys/dev/aha/aha.c Tue Oct 16 02:52:30 2012 (r241602) +++ head/sys/dev/aha/aha.c Tue Oct 16 08:40:09 2012 (r241603) @@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -68,6 +69,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -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 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 */ Modified: head/sys/dev/aha/aha_isa.c ============================================================================== --- head/sys/dev/aha/aha_isa.c Tue Oct 16 02:52:30 2012 (r241602) +++ head/sys/dev/aha/aha_isa.c Tue Oct 16 08:40:09 2012 (r241603) @@ -126,7 +126,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 */ @@ -321,9 +321,9 @@ aha_isa_identify(driver_t *driver, devic * 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 */ @@ -335,8 +335,8 @@ aha_isa_identify(driver_t *driver, devic * Could query the board and set IRQ/DRQ, but probe does * that. */ - not_this_one:; - bus_release_resource(parent, SYS_RES_IOPORT, rid, aha->port); + not_this_one: + bus_release_resource(parent, SYS_RES_IOPORT, rid, aha.port); aha_free(&aha); } } Modified: head/sys/dev/aha/ahareg.h ============================================================================== --- head/sys/dev/aha/ahareg.h Tue Oct 16 02:52:30 2012 (r241602) +++ head/sys/dev/aha/ahareg.h Tue Oct 16 08:40:09 2012 (r241603) @@ -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 */