diff options
| author | tsutsui <tsutsui@NetBSD.org> | 2006-03-14 15:24:30 +0000 |
|---|---|---|
| committer | tsutsui <tsutsui@NetBSD.org> | 2006-03-14 15:24:30 +0000 |
| commit | 4b0dbc6b503a6dac869183d3d1ed8d09afe8d342 (patch) | |
| tree | 3e582473e20b46ee2f977f068f805dc4248dc607 /sys/dev | |
| parent | 3b7a4338dbbd62efff6bb06a0b44ed5b23d16a12 (diff) | |
TAB/space cleanup.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ic/aic7xxx.c | 18 | ||||
| -rw-r--r-- | sys/dev/ic/aic7xxx_cam.h | 4 | ||||
| -rw-r--r-- | sys/dev/ic/aic7xxx_inline.h | 22 | ||||
| -rw-r--r-- | sys/dev/ic/aic7xxx_osm.c | 70 | ||||
| -rw-r--r-- | sys/dev/ic/aic7xxx_osm.h | 6 | ||||
| -rw-r--r-- | sys/dev/ic/aic7xxxvar.h | 14 |
6 files changed, 67 insertions, 67 deletions
diff --git a/sys/dev/ic/aic7xxx.c b/sys/dev/ic/aic7xxx.c index 0668936bc9a..b21d6e2ac2b 100644 --- a/sys/dev/ic/aic7xxx.c +++ b/sys/dev/ic/aic7xxx.c @@ -1,4 +1,4 @@ -/* $NetBSD: aic7xxx.c,v 1.118 2006/02/25 00:58:35 wiz Exp $ */ +/* $NetBSD: aic7xxx.c,v 1.119 2006/03/14 15:24:30 tsutsui Exp $ */ /* * Core routines and tables shareable across OS platforms. @@ -39,7 +39,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: aic7xxx.c,v 1.118 2006/02/25 00:58:35 wiz Exp $ + * $Id: aic7xxx.c,v 1.119 2006/03/14 15:24:30 tsutsui Exp $ * * //depot/aic7xxx/aic7xxx/aic7xxx.c#112 $ * @@ -50,7 +50,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: aic7xxx.c,v 1.118 2006/02/25 00:58:35 wiz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aic7xxx.c,v 1.119 2006/03/14 15:24:30 tsutsui Exp $"); #include <dev/ic/aic7xxx_osm.h> #include <dev/ic/aic7xxx_inline.h> @@ -82,7 +82,7 @@ const char *ahc_chip_names[] = * Hardware error codes. */ struct ahc_hard_error_entry { - uint8_t errno; + uint8_t errno; const char *errmesg; }; @@ -829,7 +829,7 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat) printf("data overrun detected %s." " Tag == 0x%x.\n", ahc_phase_table[i].phasemsg, - scb->hscb->tag); + scb->hscb->tag); ahc_print_path(ahc, scb); printf("%s seen Data Phase. Length = %ld. NumSGs = %d.\n", ahc_inb(ahc, SEQ_FLAGS) & DPHASE ? "Have" : "Haven't", @@ -7395,19 +7395,19 @@ ahc_createdmamem(tag, size, flags, mapp, vaddr, baddr, seg, nseg, myname, what) if ((error = bus_dmamap_create(tag, size, 1, size, 0, BUS_DMA_WAITOK | flags, mapp)) != 0) { - printf("%s: failed to create DMA map for %s, error = %d\n", + printf("%s: failed to create DMA map for %s, error = %d\n", myname, what, error); goto out; - } + } level++; if ((error = bus_dmamap_load(tag, *mapp, *vaddr, size, NULL, BUS_DMA_WAITOK)) != 0) { - printf("%s: failed to load DMA map for %s, error = %d\n", + printf("%s: failed to load DMA map for %s, error = %d\n", myname, what, error); goto out; - } + } *baddr = (*mapp)->dm_segs[0].ds_addr; diff --git a/sys/dev/ic/aic7xxx_cam.h b/sys/dev/ic/aic7xxx_cam.h index 86e82553ed5..04ef43a6837 100644 --- a/sys/dev/ic/aic7xxx_cam.h +++ b/sys/dev/ic/aic7xxx_cam.h @@ -1,4 +1,4 @@ -/* $NetBSD: aic7xxx_cam.h,v 1.3 2003/04/20 11:17:20 fvdl Exp $ */ +/* $NetBSD: aic7xxx_cam.h,v 1.4 2006/03/14 15:24:30 tsutsui Exp $ */ /* * Data structures and definitions for the CAM system. @@ -105,7 +105,7 @@ typedef enum { } cam_status; typedef enum { - CAM_DIR_IN = XS_CTL_DATA_IN, + CAM_DIR_IN = XS_CTL_DATA_IN, CAM_DIR_OUT = XS_CTL_DATA_OUT, } ccb_flags; diff --git a/sys/dev/ic/aic7xxx_inline.h b/sys/dev/ic/aic7xxx_inline.h index 43ebec428cb..efd4aa5684b 100644 --- a/sys/dev/ic/aic7xxx_inline.h +++ b/sys/dev/ic/aic7xxx_inline.h @@ -1,4 +1,4 @@ -/* $NetBSD: aic7xxx_inline.h,v 1.9 2006/02/16 20:17:16 perry Exp $ */ +/* $NetBSD: aic7xxx_inline.h,v 1.10 2006/03/14 15:24:30 tsutsui Exp $ */ /* * Inline routines shareable across OS platforms. @@ -505,7 +505,7 @@ static __inline void ahc_minphys(struct buf *bp); static __inline void ahc_minphys(bp) - struct buf *bp; + struct buf *bp; { /* * Even though the card can transfer up to 16megs per command @@ -514,10 +514,10 @@ ahc_minphys(bp) * discontinuous physically, hence the "page per segment" limit * enforced here. */ - if (bp->b_bcount > AHC_MAXTRANSFER_SIZE) { - bp->b_bcount = AHC_MAXTRANSFER_SIZE; - } - minphys(bp); + if (bp->b_bcount > AHC_MAXTRANSFER_SIZE) { + bp->b_bcount = AHC_MAXTRANSFER_SIZE; + } + minphys(bp); } static __inline void @@ -599,12 +599,12 @@ ahc_intr(void *arg) */ if ((ahc->flags & (AHC_ALL_INTERRUPTS|AHC_EDGE_INTERRUPT)) == 0 && (ahc_check_cmdcmpltqueues(ahc) != 0)) - intstat = CMDCMPLT; - else { - intstat = ahc_inb(ahc, INTSTAT); - } + intstat = CMDCMPLT; + else { + intstat = ahc_inb(ahc, INTSTAT); + } - if (intstat & CMDCMPLT) { + if (intstat & CMDCMPLT) { ahc_outb(ahc, CLRINT, CLRCMDINT); /* * Ensure that the chip sees that we've cleared diff --git a/sys/dev/ic/aic7xxx_osm.c b/sys/dev/ic/aic7xxx_osm.c index b590f987f95..ad59241ef31 100644 --- a/sys/dev/ic/aic7xxx_osm.c +++ b/sys/dev/ic/aic7xxx_osm.c @@ -1,4 +1,4 @@ -/* $NetBSD: aic7xxx_osm.c,v 1.20 2005/12/05 18:29:45 bouyer Exp $ */ +/* $NetBSD: aic7xxx_osm.c,v 1.21 2006/03/14 15:24:30 tsutsui Exp $ */ /* * Bus independent FreeBSD shim for the aic7xxx based adaptec SCSI controllers @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: aic7xxx_osm.c,v 1.20 2005/12/05 18:29:45 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aic7xxx_osm.c,v 1.21 2006/03/14 15:24:30 tsutsui Exp $"); #include <dev/ic/aic7xxx_osm.h> #include <dev/ic/aic7xxx_inline.h> @@ -55,8 +55,8 @@ static int ahc_poll(struct ahc_softc *ahc, int wait); static void ahc_setup_data(struct ahc_softc *ahc, struct scsipi_xfer *xs, struct scb *scb); static void ahc_set_recoveryscb(struct ahc_softc *ahc, struct scb *scb); -static int ahc_ioctl(struct scsipi_channel *channel, u_long cmd, caddr_t addr, int flag, - struct proc *p); +static int ahc_ioctl(struct scsipi_channel *channel, u_long cmd, + caddr_t addr, int flag, struct proc *p); @@ -74,7 +74,7 @@ ahc_attach(struct ahc_softc *ahc) for (i = 0; i < AHC_NUM_TARGETS; i++) TAILQ_INIT(&ahc->untagged_queues[i]); - ahc_lock(ahc, &s); + ahc_lock(ahc, &s); ahc->sc_adapter.adapt_dev = &ahc->sc_dev; ahc->sc_adapter.adapt_nchannels = (ahc->features & AHC_TWIN) ? 2 : 1; @@ -87,11 +87,11 @@ ahc_attach(struct ahc_softc *ahc) ahc->sc_adapter.adapt_request = ahc_action; ahc->sc_channel.chan_adapter = &ahc->sc_adapter; - ahc->sc_channel.chan_bustype = &scsi_bustype; - ahc->sc_channel.chan_channel = 0; - ahc->sc_channel.chan_ntargets = (ahc->features & AHC_WIDE) ? 16 : 8; - ahc->sc_channel.chan_nluns = 8 /*AHC_NUM_LUNS*/; - ahc->sc_channel.chan_id = ahc->our_id; + ahc->sc_channel.chan_bustype = &scsi_bustype; + ahc->sc_channel.chan_channel = 0; + ahc->sc_channel.chan_ntargets = (ahc->features & AHC_WIDE) ? 16 : 8; + ahc->sc_channel.chan_nluns = 8 /*AHC_NUM_LUNS*/; + ahc->sc_channel.chan_id = ahc->our_id; ahc->sc_channel.chan_flags |= SCSIPI_CHAN_CANGROW; if (ahc->features & AHC_TWIN) { @@ -149,7 +149,7 @@ void ahc_done(struct ahc_softc *ahc, struct scb *scb) { struct scsipi_xfer *xs; - struct scsipi_periph *periph; + struct scsipi_periph *periph; u_long s; xs = scb->xs; @@ -235,9 +235,9 @@ ahc_done(struct ahc_softc *ahc, struct scb *scb) scb->flags &= ~SCB_FREEZE_QUEUE; } - ahc_lock(ahc, &s); + ahc_lock(ahc, &s); ahc_free_scb(ahc, scb); - ahc_unlock(ahc, &s); + ahc_unlock(ahc, &s); scsipi_done(xs); } @@ -280,8 +280,8 @@ ahc_action(struct scsipi_channel *chan, scsipi_adapter_req_t req, void *arg) { struct scsipi_xfer *xs; struct scsipi_periph *periph; - struct scb *scb; - struct hardware_scb *hscb; + struct scb *scb; + struct hardware_scb *hscb; u_int target_id; u_int our_id; u_long ss; @@ -290,7 +290,7 @@ ahc_action(struct scsipi_channel *chan, scsipi_adapter_req_t req, void *arg) periph = xs->xs_periph; target_id = periph->periph_target; - our_id = ahc->our_id; + our_id = ahc->our_id; SC_DEBUG(xs->xs_periph, SCSIPI_DB3, ("ahc_action\n")); @@ -332,7 +332,7 @@ ahc_action(struct scsipi_channel *chan, scsipi_adapter_req_t req, void *arg) #ifdef AHC_DEBUG printf("%s: ADAPTER_REQ_GROW_RESOURCES\n", ahc_name(ahc)); #endif - chan->chan_adapter->adapt_openings += ahc_alloc_scbs(ahc); + chan->chan_adapter->adapt_openings += ahc_alloc_scbs(ahc); if (ahc->scb_data->numscbs >= AHC_SCB_MAX_ALLOC) chan->chan_flags &= ~SCSIPI_CHAN_CANGROW; return; @@ -478,7 +478,7 @@ ahc_execute_scb(void *arg, bus_dma_segment_t *dm_segs, int nsegments) ahc = (void *)xs->xs_periph->periph_channel->chan_adapter->adapt_dev; if (nsegments != 0) { - struct ahc_dma_seg *sg; + struct ahc_dma_seg *sg; bus_dma_segment_t *end_seg; int op; @@ -555,7 +555,7 @@ ahc_execute_scb(void *arg, bus_dma_segment_t *dm_segs, int nsegments) scb->hscb->control |= ULTRAENB; if ((tstate->discenable & mask) != 0) - scb->hscb->control |= DISCENB; + scb->hscb->control |= DISCENB; if (xs->xs_tag_type) scb->hscb->control |= xs->xs_tag_type; @@ -687,7 +687,7 @@ ahc_setup_data(struct ahc_softc *ahc, struct scsipi_xfer *xs, if (xs->datalen) { int error; - error = bus_dmamap_load(ahc->parent_dmat, + error = bus_dmamap_load(ahc->parent_dmat, scb->dmamap, xs->data, xs->datalen, NULL, ((xs->xs_control & XS_CTL_NOSLEEP) ? @@ -695,17 +695,17 @@ ahc_setup_data(struct ahc_softc *ahc, struct scsipi_xfer *xs, BUS_DMA_STREAMING | ((xs->xs_control & XS_CTL_DATA_IN) ? BUS_DMA_READ : BUS_DMA_WRITE)); - if (error) { + if (error) { #ifdef AHC_DEBUG - printf("%s: in ahc_setup_data(): bus_dmamap_load() " + printf("%s: in ahc_setup_data(): bus_dmamap_load() " "= %d\n", ahc_name(ahc), error); #endif - xs->error = XS_RESOURCE_SHORTAGE; - scsipi_done(xs); - return; - } - ahc_execute_scb(scb, + xs->error = XS_RESOURCE_SHORTAGE; + scsipi_done(xs); + return; + } + ahc_execute_scb(scb, scb->dmamap->dm_segs, scb->dmamap->dm_nsegs); } else { @@ -841,7 +841,7 @@ bus_reset: ahc_print_path(ahc, scb); printf("Other SCB Timeout%s", - (scb->flags & SCB_OTHERTCL_TIMEOUT) != 0 + (scb->flags & SCB_OTHERTCL_TIMEOUT) != 0 ? " again\n" : "\n"); scb->flags |= SCB_OTHERTCL_TIMEOUT; newtimeout = MAX(active_scb->xs->timeout, @@ -886,7 +886,7 @@ bus_reset: 2 * hz, ahc_timeout, active_scb); ahc_unpause(ahc); } else { - int disconnected; + int disconnected; /* XXX Shouldn't panic. Just punt instead? */ if ((scb->flags & SCB_TARGET_SCB) != 0) @@ -998,15 +998,15 @@ void ahc_platform_set_tags(struct ahc_softc *ahc, struct ahc_devinfo *devinfo, int enable) { - struct ahc_tmode_tstate *tstate; + struct ahc_tmode_tstate *tstate; - ahc_fetch_transinfo(ahc, devinfo->channel, devinfo->our_scsiid, - devinfo->target, &tstate); + ahc_fetch_transinfo(ahc, devinfo->channel, devinfo->our_scsiid, + devinfo->target, &tstate); - if (enable) - tstate->tagenable |= devinfo->target_mask; + if (enable) + tstate->tagenable |= devinfo->target_mask; else - tstate->tagenable &= ~devinfo->target_mask; + tstate->tagenable &= ~devinfo->target_mask; } int diff --git a/sys/dev/ic/aic7xxx_osm.h b/sys/dev/ic/aic7xxx_osm.h index f9aceec999f..632f596d830 100644 --- a/sys/dev/ic/aic7xxx_osm.h +++ b/sys/dev/ic/aic7xxx_osm.h @@ -1,4 +1,4 @@ -/* $NetBSD: aic7xxx_osm.h,v 1.12 2006/02/16 20:17:16 perry Exp $ */ +/* $NetBSD: aic7xxx_osm.h,v 1.13 2006/03/14 15:30:03 tsutsui Exp $ */ /* * NetBSD platform specific driver option settings, data structures, @@ -86,7 +86,7 @@ (((sim) == ahc->platform_data->sim_b) ? ahc->platform_data->path_b \ : ahc->platform_data->path) #define BUILD_SCSIID(ahc, sim, target_id, our_id) \ - ((((target_id) << TID_SHIFT) & TID) | (our_id)) + ((((target_id) << TID_SHIFT) & TID) | (our_id)) #define SCB_GET_SIM(ahc, scb) \ (SCB_GET_CHANNEL(ahc, scb) == 'A' ? (ahc)->platform_data->sim \ @@ -218,7 +218,7 @@ ahc_timer_reset(ahc_timer_t *timer, u_int usec, ahc_callback_t *func, void *arg) static __inline void ahc_scb_timer_reset(struct scb *scb, u_int usec) { - if (!(scb->xs->xs_control & XS_CTL_POLL)) { + if (scb->xs->xs_control & XS_CTL_POLL)) { callout_reset(&scb->xs->xs_callout, (usec * hz)/1000000, ahc_timeout, scb); } diff --git a/sys/dev/ic/aic7xxxvar.h b/sys/dev/ic/aic7xxxvar.h index ce1cdbf74de..57e7667844f 100644 --- a/sys/dev/ic/aic7xxxvar.h +++ b/sys/dev/ic/aic7xxxvar.h @@ -37,7 +37,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: aic7xxxvar.h,v 1.50 2005/11/28 21:03:20 bouyer Exp $ + * $Id: aic7xxxvar.h,v 1.51 2006/03/14 15:30:03 tsutsui Exp $ * * $FreeBSD: /repoman/r/ncvs/src/sys/dev/aic7xxx/aic7xxx.h,v 1.44 2003/01/20 20:44:55 gibbs Exp $ */ @@ -171,8 +171,8 @@ struct seeprom_descriptor; ((scsiid) & OID) #define SCSIID_CHANNEL(ahc, scsiid) \ ((((ahc)->features & AHC_TWIN) != 0) \ - ? ((((scsiid) & TWIN_CHNLB) != 0) ? 'B' : 'A') \ - : 'A') + ? ((((scsiid) & TWIN_CHNLB) != 0) ? 'B' : 'A') \ + : 'A') #define SCB_IS_SCSIBUS_B(ahc, scb) \ (SCSIID_CHANNEL(ahc, (scb)->hscb->scsiid) == 'B') #define SCB_GET_OUR_ID(scb) \ @@ -190,7 +190,7 @@ struct seeprom_descriptor; #ifdef AHC_DEBUG #define SCB_IS_SILENT(scb) \ ((ahc_debug & AHC_SHOW_MASKED_ERRORS) == 0 \ - && (((scb)->flags & SCB_SILENT) != 0)) + && (((scb)->flags & SCB_SILENT) != 0)) #else #define SCB_IS_SILENT(scb) \ (((scb)->flags & SCB_SILENT) != 0) @@ -225,7 +225,7 @@ struct seeprom_descriptor; * The maximum transfer per S/G segment. * Limited by MAXPHYS or a 24-bit counter. */ -#define AHC_MAXTRANSFER_SIZE MIN(MAXPHYS,0x00ffffff) +#define AHC_MAXTRANSFER_SIZE MIN(MAXPHYS,0x00ffffff) /* * The maximum amount of SCB storage in hardware on a controller. @@ -877,8 +877,8 @@ struct ahc_syncrate { * to parity errors in each phase table. */ struct ahc_phase_table_entry { - uint8_t phase; - uint8_t mesg_out; /* Message response to parity errors */ + uint8_t phase; + uint8_t mesg_out; /* Message response to parity errors */ const char *phasemsg; }; |
