diff options
author | Alexander Yurchenko <grange@cvs.openbsd.org> | 2003-09-28 21:01:44 +0000 |
---|---|---|
committer | Alexander Yurchenko <grange@cvs.openbsd.org> | 2003-09-28 21:01:44 +0000 |
commit | 096b52646de6f482a0904e2ee8cf38eb6cd24cfe (patch) | |
tree | e75f582d52821c664b1aea32e809b24beb292722 /sys/dev/ic | |
parent | cc46350b72fb3d36e4d2408ded0d48e6fb4761ea (diff) |
kill trailing spaces, no functional changes
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/wdc.c | 34 | ||||
-rw-r--r-- | sys/dev/ic/wdcevent.h | 6 | ||||
-rw-r--r-- | sys/dev/ic/wdcreg.h | 14 | ||||
-rw-r--r-- | sys/dev/ic/wdcvar.h | 18 |
4 files changed, 36 insertions, 36 deletions
diff --git a/sys/dev/ic/wdc.c b/sys/dev/ic/wdc.c index ef6e6a03384..03bdc873694 100644 --- a/sys/dev/ic/wdc.c +++ b/sys/dev/ic/wdc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wdc.c,v 1.62 2003/07/06 08:25:16 grange Exp $ */ +/* $OpenBSD: wdc.c,v 1.63 2003/09/28 21:01:43 grange Exp $ */ /* $NetBSD: wdc.c,v 1.68 1999/06/23 19:00:17 bouyer Exp $ */ @@ -102,7 +102,7 @@ struct pool wdc_xfer_pool; static void __wdcerror(struct channel_softc*, char *); static int __wdcwait_reset(struct channel_softc *, int); void __wdccommand_done(struct channel_softc *, struct wdc_xfer *); -void __wdccommand_start(struct channel_softc *, struct wdc_xfer *); +void __wdccommand_start(struct channel_softc *, struct wdc_xfer *); int __wdccommand_intr(struct channel_softc *, struct wdc_xfer *, int); int wdprint(void *, const char *); void wdc_kill_pending(struct channel_softc *); @@ -203,7 +203,7 @@ wdc_log(struct channel_softc *chp, enum wdcevent_type type, } ptr = &wdc_log_buf[wdc_head]; - *ptr++ = type & 0xff; + *ptr++ = type & 0xff; *ptr++ = ((chp->ch_log_idx & 0x7) << 5) | (size & 0x1f); idx = 0; @@ -280,7 +280,7 @@ wdc_default_read_reg(chp, reg) struct channel_softc *chp; enum wdc_regs reg; { -#ifdef DIAGNOSTIC +#ifdef DIAGNOSTIC if (reg & _WDC_WRONLY) { printf ("wdc_default_read_reg: reading from a write-only register %d\n", reg); } @@ -300,7 +300,7 @@ wdc_default_write_reg(chp, reg, val) enum wdc_regs reg; u_int8_t val; { -#ifdef DIAGNOSTIC +#ifdef DIAGNOSTIC if (reg & _WDC_RDONLY) { printf ("wdc_default_write_reg: writing to a read-only register %d\n", reg); } @@ -453,7 +453,7 @@ int wdc_floating_bus(chp, drive) struct channel_softc *chp; int drive; - + { u_int8_t cumulative_status, status; int iter; @@ -506,7 +506,7 @@ wdc_preata_drive(chp, drive) chp->channel, drive), DEBUG_PROBE); return 0; } - + CHP_WRITE_REG(chp, wdr_command, WDCC_RECAL); WDC_LOG_ATA_CMDSHORT(chp, WDCC_RECAL); if (wdcwait(chp, WDCS_DRDY | WDCS_DRQ, WDCS_DRDY, 10000) != 0) { @@ -619,7 +619,7 @@ wdcprobe(chp) if ((chp->ch_flags & WDCF_VERBOSE_PROBE) || (chp->wdc && (chp->wdc->sc_dev.dv_cfdata->cf_flags & WDC_OPTION_PROBE_VERBOSE))) - wdcdebug_mask |= DEBUG_PROBE; + wdcdebug_mask |= DEBUG_PROBE; #endif /* WDCDEBUG */ if (chp->wdc == NULL || @@ -718,7 +718,7 @@ wdcprobe(chp) #ifdef WDCDEBUG wdcdebug_mask = savedmask; #endif - return (ret_value); + return (ret_value); } /* @@ -800,7 +800,7 @@ wdcattach(chp) inited++; } TAILQ_INIT(&chp->ch_queue->sc_xfer); - + for (i = 0; i < 2; i++) { struct ata_drive_datas *drvp = &chp->ch_drive[i]; @@ -954,7 +954,7 @@ wdcrestart(v) wdcstart(chp); splx(s); } - + /* * Interrupt routine for the controller. Acknowledge the interrupt, check for @@ -969,7 +969,7 @@ wdcintr(arg) struct channel_softc *chp = arg; struct wdc_xfer *xfer; int ret; - + if ((chp->ch_flags & WDCF_IRQ_WAIT) == 0) { /* Acknowledge interrupt by reading status */ if (chp->_vtbl == 0) { @@ -1172,7 +1172,7 @@ wdctimeout(arg) !timeout_triggered(&chp->ch_timo)) { splx(s); return; - } + } if ((chp->ch_flags & WDCF_IRQ_WAIT) != 0) { __wdcerror(chp, "timeout"); printf("\ttype: %s\n", (xfer->c_flags & C_ATAPI) ? @@ -1432,7 +1432,7 @@ wdc_output_bytes(drvp, bytes, buflen) { struct channel_softc *chp = drvp->chnl_softc; unsigned int off = 0; - unsigned int len = buflen, roundlen; + unsigned int len = buflen, roundlen; if (drvp->drive_flags & DRIVE_CAP32) { roundlen = len & ~3; @@ -1507,7 +1507,7 @@ wdc_print_caps(drvp) if (drvp->drive_flags & DRIVE_UDMA) { printf(", Ultra-DMA mode %d", drvp->UDMA_cap); } - + printf("\n"); #endif /* 0 */ } @@ -1697,7 +1697,7 @@ __wdccommand_start(chp, xfer) delay(10); if (wait_for_unbusy(chp, wdc_c->timeout) != 0) goto timeout; - + if ((chp->ch_status & (WDCS_DRQ | WDCS_ERR)) == WDCS_ERR) { __wdccommand_done(chp, xfer); return; @@ -2228,7 +2228,7 @@ wdc_ioctl(drvp, xfer, addr, flag, p) atagettrace_t *agt = (atagettrace_t *)addr; unsigned int size = 0; char *log_to_copy; - + size = agt->buf_size; if (size > 65536) { size = 65536; diff --git a/sys/dev/ic/wdcevent.h b/sys/dev/ic/wdcevent.h index 5871afa1771..73edec34cb1 100644 --- a/sys/dev/ic/wdcevent.h +++ b/sys/dev/ic/wdcevent.h @@ -1,4 +1,4 @@ -/* $OpenBSD: wdcevent.h,v 1.3 2002/12/22 18:24:45 grange Exp $ */ +/* $OpenBSD: wdcevent.h,v 1.4 2003/09/28 21:01:43 grange Exp $ */ /* * Copyright (c) 2001 Constantine Sapuntzakis @@ -51,7 +51,7 @@ static __inline void WDC_LOG_STATUS(struct channel_softc *chp, u_int8_t status) { if (chp->ch_prev_log_status == status) return; - + chp->ch_prev_log_status = status; wdc_log(chp, WDCEVENT_STATUS, 1, &status); } @@ -82,7 +82,7 @@ static __inline void WDC_LOG_ATA_CMDSHORT(struct channel_softc *chp, u_int8_t cm wdc_log(chp, WDCEVENT_ATA_SHORT, 1, &cmd); } -static __inline void WDC_LOG_ATA_CMDLONG(struct channel_softc *chp, +static __inline void WDC_LOG_ATA_CMDLONG(struct channel_softc *chp, u_int8_t head, u_int8_t precomp, u_int8_t cylinhi, u_int8_t cylinlo, u_int8_t sector, u_int8_t count, u_int8_t command) { char record[8] = { head, precomp, cylinhi, cylinlo, diff --git a/sys/dev/ic/wdcreg.h b/sys/dev/ic/wdcreg.h index d7e52d8a03a..a4a46a05a61 100644 --- a/sys/dev/ic/wdcreg.h +++ b/sys/dev/ic/wdcreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: wdcreg.h,v 1.8 2003/06/02 23:28:02 millert Exp $ */ +/* $OpenBSD: wdcreg.h,v 1.9 2003/09/28 21:01:43 grange Exp $ */ /* $NetBSD: wdcreg.h,v 1.22 1999/03/07 14:02:54 bouyer Exp $ */ /*- @@ -35,9 +35,9 @@ * @(#)wdreg.h 7.1 (Berkeley) 5/9/91 */ -/* +/* * Controller register (wdr_ctlr) - */ + */ #define WDCTL_4BIT 0x08 /* use four head bits (wd1003) */ #define WDCTL_RST 0x04 /* reset the controller */ #define WDCTL_IDS 0x02 /* disable controller interrupts */ @@ -158,12 +158,12 @@ #define WDSD_LBA 0x40 /* logical block addressing */ /* Commands for ATAPI devices */ -#define ATAPI_CHECK_POWER_MODE 0xe5 +#define ATAPI_CHECK_POWER_MODE 0xe5 #define ATAPI_EXEC_DRIVE_DIAGS 0x90 #define ATAPI_IDLE_IMMEDIATE 0xe1 #define ATAPI_NOP 0x00 -#define ATAPI_PKT_CMD 0xa0 -#define ATAPI_IDENTIFY_DEVICE 0xa1 +#define ATAPI_PKT_CMD 0xa0 +#define ATAPI_IDENTIFY_DEVICE 0xa1 #define ATAPI_SOFT_RESET 0x08 #define ATAPI_DEVICE_RESET 0x08 /* ATA/ATAPI-5 name for soft reset */ #define ATAPI_SLEEP 0xe6 @@ -183,7 +183,7 @@ #define WDCI_IN 0x02 /* transfer to(1) or from(0) the host */ #define WDCI_RELEASE 0x04 /* bus released until completion */ -#define PHASE_CMDOUT (WDCS_DRQ | WDCI_CMD) +#define PHASE_CMDOUT (WDCS_DRQ | WDCI_CMD) #define PHASE_DATAIN (WDCS_DRQ | WDCI_IN) #define PHASE_DATAOUT WDCS_DRQ #define PHASE_COMPLETED (WDCI_IN | WDCI_CMD) diff --git a/sys/dev/ic/wdcvar.h b/sys/dev/ic/wdcvar.h index 1aa9561063c..ae01770b1bf 100644 --- a/sys/dev/ic/wdcvar.h +++ b/sys/dev/ic/wdcvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: wdcvar.h,v 1.27 2003/07/23 22:07:15 grange Exp $ */ +/* $OpenBSD: wdcvar.h,v 1.28 2003/09/28 21:01:43 grange Exp $ */ /* $NetBSD: wdcvar.h,v 1.17 1999/04/11 20:50:29 bouyer Exp $ */ /*- @@ -91,7 +91,7 @@ struct channel_softc { /* Per channel data */ #define _WDC_AUX 8 #define _WDC_RDONLY 16 #define _WDC_WRONLY 32 -enum wdc_regs { +enum wdc_regs { wdr_error = _WDC_RDONLY | 1, wdr_precomp = _WDC_WRONLY | 1, wdr_features = _WDC_WRONLY | 1, @@ -112,10 +112,10 @@ enum wdc_regs { struct channel_softc_vtbl { u_int8_t (*read_reg)(struct channel_softc *, enum wdc_regs reg); - void (*write_reg)(struct channel_softc *, enum wdc_regs reg, + void (*write_reg)(struct channel_softc *, enum wdc_regs reg, u_int8_t var); - - void (*read_raw_multi_2)(struct channel_softc *, + + void (*read_raw_multi_2)(struct channel_softc *, void *data, unsigned int nbytes); void (*write_raw_multi_2)(struct channel_softc *, void *data, unsigned int nbytes); @@ -202,7 +202,7 @@ struct wdc_softc { /* Per controller state */ struct atapi_return_args; struct wdc_xfer { - volatile u_int c_flags; + volatile u_int c_flags; #define C_ATAPI 0x0002 /* xfer is ATAPI request */ #define C_TIMEOU 0x0004 /* xfer processing timed out */ #define C_NEEDDONE 0x0010 /* need to call upper-level done */ @@ -234,7 +234,7 @@ struct wdc_xfer { struct atapi_return_args *); void (*c_done)(struct channel_softc *, struct wdc_xfer *, int, struct atapi_return_args *); - + /* Used for tape devices */ int transfer_len; }; @@ -257,7 +257,7 @@ void wdc_free_xfer(struct channel_softc *, struct wdc_xfer *); void wdcstart(struct channel_softc *); void wdcrestart(void *); int wdcreset(struct channel_softc *, int); -#define VERBOSE 1 +#define VERBOSE 1 #define SILENT 0 /* wdcreset will not print errors */ int wdc_wait_for_status(struct channel_softc *, int, int, int); int wdc_dmawait(struct channel_softc *, struct wdc_xfer *, int); @@ -273,7 +273,7 @@ void wdctimeout(void *arg); int wdc_addref(struct channel_softc *); void wdc_delref(struct channel_softc *); -/* +/* * ST506 spec says that if READY or SEEKCMPLT go off, then the read or write * command is aborted. */ |