summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAlexander Yurchenko <grange@cvs.openbsd.org>2004-01-15 21:37:58 +0000
committerAlexander Yurchenko <grange@cvs.openbsd.org>2004-01-15 21:37:58 +0000
commit1c12a1051231f5a5fae5b3344999a0a4ae3c3487 (patch)
treefd7a28824b288fba31d829f54acbf759dc465391 /sys
parentdf7cd3d7a8335a14ab5b13e51bccdd7747c862bc (diff)
ansi and some spaces; no f/c
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ata/ata.c16
-rw-r--r--sys/dev/ata/ata_wdc.c42
-rw-r--r--sys/dev/ata/wd.c108
3 files changed, 43 insertions, 123 deletions
diff --git a/sys/dev/ata/ata.c b/sys/dev/ata/ata.c
index ad9fe8c9b28..679ceeaadfa 100644
--- a/sys/dev/ata/ata.c
+++ b/sys/dev/ata/ata.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ata.c,v 1.23 2003/11/17 22:44:55 grange Exp $ */
+/* $OpenBSD: ata.c,v 1.24 2004/01/15 21:37:57 grange Exp $ */
/* $NetBSD: ata.c,v 1.9 1999/04/15 09:41:09 bouyer Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved.
@@ -61,10 +61,8 @@ extern int wdcdebug_mask; /* init'ed in wdc.c */
/* Get the disk's parameters */
int
-ata_get_params(drvp, flags, prms)
- struct ata_drive_datas *drvp;
- u_int8_t flags;
- struct ataparams *prms;
+ata_get_params(struct ata_drive_datas *drvp, u_int8_t flags,
+ struct ataparams *prms)
{
char tb[ATAPARAMS_SIZE];
struct wdc_command wdc_c;
@@ -156,10 +154,7 @@ ata_get_params(drvp, flags, prms)
}
int
-ata_set_mode(drvp, mode, flags)
- struct ata_drive_datas *drvp;
- u_int8_t mode;
- u_int8_t flags;
+ata_set_mode(struct ata_drive_datas *drvp, u_int8_t mode, u_int8_t flags)
{
struct wdc_command wdc_c;
@@ -188,8 +183,7 @@ ata_set_mode(drvp, mode, flags)
}
void
-ata_dmaerr(drvp)
- struct ata_drive_datas *drvp;
+ata_dmaerr(struct ata_drive_datas *drvp)
{
/*
* Downgrade decision: if we get NERRS_MAX in NXFER.
diff --git a/sys/dev/ata/ata_wdc.c b/sys/dev/ata/ata_wdc.c
index 9ea56043b7a..6c6382a75f6 100644
--- a/sys/dev/ata/ata_wdc.c
+++ b/sys/dev/ata/ata_wdc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ata_wdc.c,v 1.24 2003/10/17 08:14:09 grange Exp $ */
+/* $OpenBSD: ata_wdc.c,v 1.25 2004/01/15 21:37:57 grange Exp $ */
/* $NetBSD: ata_wdc.c,v 1.21 1999/08/09 09:43:11 bouyer Exp $ */
/*
@@ -116,10 +116,10 @@ struct cfdriver wdc_cd = {
};
#endif
-void wdc_ata_bio_start(struct channel_softc *,struct wdc_xfer *);
-void _wdc_ata_bio_start(struct channel_softc *,struct wdc_xfer *);
+void wdc_ata_bio_start(struct channel_softc *, struct wdc_xfer *);
+void _wdc_ata_bio_start(struct channel_softc *, struct wdc_xfer *);
int wdc_ata_bio_intr(struct channel_softc *, struct wdc_xfer *, int);
-void wdc_ata_bio_kill_xfer(struct channel_softc *,struct wdc_xfer *);
+void wdc_ata_bio_kill_xfer(struct channel_softc *, struct wdc_xfer *);
void wdc_ata_bio_done(struct channel_softc *, struct wdc_xfer *);
int wdc_ata_ctrl_intr(struct channel_softc *, struct wdc_xfer *, int);
int wdc_ata_err(struct ata_drive_datas *, struct ata_bio *);
@@ -132,9 +132,7 @@ int wdc_ata_err(struct ata_drive_datas *, struct ata_bio *);
* WDC_TRY_AGAIN. Must be called at splbio().
*/
int
-wdc_ata_bio(drvp, ata_bio)
- struct ata_drive_datas *drvp;
- struct ata_bio *ata_bio;
+wdc_ata_bio(struct ata_drive_datas *drvp, struct ata_bio *ata_bio)
{
struct wdc_xfer *xfer;
struct channel_softc *chp = drvp->chnl_softc;
@@ -160,9 +158,7 @@ wdc_ata_bio(drvp, ata_bio)
}
void
-wdc_ata_bio_start(chp, xfer)
- struct channel_softc *chp;
- struct wdc_xfer *xfer;
+wdc_ata_bio_start(struct channel_softc *chp, struct wdc_xfer *xfer)
{
struct ata_bio *ata_bio = xfer->cmd;
WDCDEBUG_PRINT(("wdc_ata_bio_start %s:%d:%d\n",
@@ -176,9 +172,7 @@ wdc_ata_bio_start(chp, xfer)
}
void
-_wdc_ata_bio_start(chp, xfer)
- struct channel_softc *chp;
- struct wdc_xfer *xfer;
+_wdc_ata_bio_start(struct channel_softc *chp, struct wdc_xfer *xfer)
{
struct ata_bio *ata_bio = xfer->cmd;
struct ata_drive_datas *drvp = &chp->ch_drive[xfer->drive];
@@ -403,10 +397,7 @@ timeout:
}
int
-wdc_ata_bio_intr(chp, xfer, irq)
- struct channel_softc *chp;
- struct wdc_xfer *xfer;
- int irq;
+wdc_ata_bio_intr(struct channel_softc *chp, struct wdc_xfer *xfer, int irq)
{
struct ata_bio *ata_bio = xfer->cmd;
struct ata_drive_datas *drvp = &chp->ch_drive[xfer->drive];
@@ -518,9 +509,7 @@ timeout:
}
void
-wdc_ata_bio_kill_xfer(chp, xfer)
- struct channel_softc *chp;
- struct wdc_xfer *xfer;
+wdc_ata_bio_kill_xfer(struct channel_softc *chp, struct wdc_xfer *xfer)
{
struct ata_bio *ata_bio = xfer->cmd;
@@ -538,9 +527,7 @@ wdc_ata_bio_kill_xfer(chp, xfer)
}
void
-wdc_ata_bio_done(chp, xfer)
- struct channel_softc *chp;
- struct wdc_xfer *xfer;
+wdc_ata_bio_done(struct channel_softc *chp, struct wdc_xfer *xfer)
{
struct ata_bio *ata_bio = xfer->cmd;
@@ -571,10 +558,7 @@ wdc_ata_bio_done(chp, xfer)
* Implement operations needed before read/write.
*/
int
-wdc_ata_ctrl_intr(chp, xfer, irq)
- struct channel_softc *chp;
- struct wdc_xfer *xfer;
- int irq;
+wdc_ata_ctrl_intr(struct channel_softc *chp, struct wdc_xfer *xfer, int irq)
{
struct ata_bio *ata_bio = xfer->cmd;
struct ata_drive_datas *drvp = &chp->ch_drive[xfer->drive];
@@ -734,9 +718,7 @@ error:
}
int
-wdc_ata_err(drvp, ata_bio)
- struct ata_drive_datas *drvp;
- struct ata_bio *ata_bio;
+wdc_ata_err(struct ata_drive_datas *drvp, struct ata_bio *ata_bio)
{
struct channel_softc *chp = drvp->chnl_softc;
ata_bio->error = 0;
diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c
index ff55a40beda..76d0c38caf2 100644
--- a/sys/dev/ata/wd.c
+++ b/sys/dev/ata/wd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wd.c,v 1.34 2003/10/21 09:57:04 jmc Exp $ */
+/* $OpenBSD: wd.c,v 1.35 2004/01/15 21:37:57 grange Exp $ */
/* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */
/*
@@ -224,14 +224,7 @@ void bad144intern(struct wd_softc *);
int
-wdprobe(parent, match_, aux)
- struct device *parent;
-#ifndef __OpenBSD__
- struct cfdata *match;
-#else
- void *match_;
-#endif
- void *aux;
+wdprobe(struct device *parent, void *match_, void *aux)
{
struct ata_atapi_attach *aa_link = aux;
struct cfdata *match = match_;
@@ -263,9 +256,7 @@ wdprobe(parent, match_, aux)
}
void
-wdattach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+wdattach(struct device *parent, struct device *self, void *aux)
{
struct wd_softc *wd = (void *)self;
struct ata_atapi_attach *aa_link= aux;
@@ -395,9 +386,7 @@ wdattach(parent, self, aux)
}
int
-wdactivate(self, act)
- struct device *self;
- enum devact act;
+wdactivate(struct device *self, enum devact act)
{
int rv = 0;
@@ -414,11 +403,8 @@ wdactivate(self, act)
return (rv);
}
-
int
-wddetach(self, flags)
- struct device *self;
- int flags;
+wddetach(struct device *self, int flags)
{
struct wd_softc *sc = (struct wd_softc *)self;
struct buf *bp;
@@ -456,8 +442,7 @@ wddetach(self, flags)
}
void
-wdzeroref(self)
- struct device *self;
+wdzeroref(struct device *self)
{
struct wd_softc *sc = (struct wd_softc *)self;
@@ -470,8 +455,7 @@ wdzeroref(self)
* transfer. Does not wait for the transfer to complete.
*/
void
-wdstrategy(bp)
- struct buf *bp;
+wdstrategy(struct buf *bp)
{
struct wd_softc *wd;
int s;
@@ -534,8 +518,7 @@ done:
* Queue a drive for I/O.
*/
void
-wdstart(arg)
- void *arg;
+wdstart(void *arg)
{
struct wd_softc *wd = arg;
struct buf *bp = NULL;
@@ -559,9 +542,7 @@ wdstart(arg)
}
void
-__wdstart(wd, bp)
- struct wd_softc *wd;
- struct buf *bp;
+__wdstart(struct wd_softc *wd, struct buf *bp)
{
daddr_t p_offset;
daddr_t nblks;
@@ -620,8 +601,7 @@ __wdstart(wd, bp)
}
void
-wddone(v)
- void *v;
+wddone(void *v)
{
struct wd_softc *wd = v;
struct buf *bp = wd->sc_bp;
@@ -681,8 +661,7 @@ noerror: if ((wd->sc_wdc_bio.flags & ATA_CORR) || wd->retries > 0)
}
void
-wdrestart(v)
- void *v;
+wdrestart(void *v)
{
struct wd_softc *wd = v;
struct buf *bp = wd->sc_bp;
@@ -696,10 +675,7 @@ wdrestart(v)
}
int
-wdread(dev, uio, flags)
- dev_t dev;
- struct uio *uio;
- int flags;
+wdread(dev_t dev, struct uio *uio, int flags)
{
WDCDEBUG_PRINT(("wdread\n"), DEBUG_XFERS);
@@ -707,10 +683,7 @@ wdread(dev, uio, flags)
}
int
-wdwrite(dev, uio, flags)
- dev_t dev;
- struct uio *uio;
- int flags;
+wdwrite(dev_t dev, struct uio *uio, int flags)
{
WDCDEBUG_PRINT(("wdwrite\n"), DEBUG_XFERS);
@@ -718,10 +691,7 @@ wdwrite(dev, uio, flags)
}
int
-wdopen(dev, flag, fmt, p)
- dev_t dev;
- int flag, fmt;
- struct proc *p;
+wdopen(dev_t dev, int flag, int fmt, struct proc *p)
{
struct wd_softc *wd;
int unit, part;
@@ -811,10 +781,7 @@ bad4:
}
int
-wdclose(dev, flag, fmt, p)
- dev_t dev;
- int flag, fmt;
- struct proc *p;
+wdclose(dev_t dev, int flag, int fmt, struct proc *p)
{
struct wd_softc *wd;
int part = WDPART(dev);
@@ -840,7 +807,7 @@ wdclose(dev, flag, fmt, p)
wd->sc_dk.dk_copenmask | wd->sc_dk.dk_bopenmask;
if (wd->sc_dk.dk_openmask == 0) {
- wd_flushcache(wd,0);
+ wd_flushcache(wd, 0);
/* XXXX Must wait for I/O to complete! */
#ifndef __OpenBSD__
wdc_ata_delref(wd->drvp);
@@ -855,9 +822,7 @@ wdclose(dev, flag, fmt, p)
}
void
-wdgetdefaultlabel(wd, lp)
- struct wd_softc *wd;
- struct disklabel *lp;
+wdgetdefaultlabel(struct wd_softc *wd, struct disklabel *lp)
{
WDCDEBUG_PRINT(("wdgetdefaultlabel\n"), DEBUG_FUNCS);
bzero(lp, sizeof(struct disklabel));
@@ -896,12 +861,8 @@ wdgetdefaultlabel(wd, lp)
* Fabricate a default disk label, and try to read the correct one.
*/
void
-wdgetdisklabel(dev, wd, lp, clp, spoofonly)
- dev_t dev;
- struct wd_softc *wd;
- struct disklabel *lp;
- struct cpu_disklabel *clp;
- int spoofonly;
+wdgetdisklabel(dev_t dev, struct wd_softc *wd, struct disklabel *lp,
+ struct cpu_disklabel *clp, int spoofonly)
{
char *errstring;
@@ -943,12 +904,7 @@ wdgetdisklabel(dev, wd, lp, clp, spoofonly)
}
int
-wdioctl(dev, xfer, addr, flag, p)
- dev_t dev;
- u_long xfer;
- caddr_t addr;
- int flag;
- struct proc *p;
+wdioctl(dev_t dev, u_long xfer, caddr_t addr, int flag, struct proc *p)
{
struct wd_softc *wd;
int error = 0;
@@ -1095,8 +1051,7 @@ wdformat(struct buf *bp)
#endif
int
-wdsize(dev)
- dev_t dev;
+wdsize(dev_t dev)
{
struct wd_softc *wd;
int part, omask;
@@ -1135,11 +1090,7 @@ static int wddumpmulti = 1;
* Dump core after a system crash.
*/
int
-wddump(dev, blkno, va, size)
- dev_t dev;
- daddr_t blkno;
- caddr_t va;
- size_t size;
+wddump(dev_t dev, daddr_t blkno, caddr_t va, size_t size)
{
struct wd_softc *wd; /* disk unit to do the I/O */
struct disklabel *lp; /* disk's disklabel */
@@ -1267,8 +1218,7 @@ again:
* Internalize the bad sector table.
*/
void
-bad144intern(wd)
- struct wd_softc *wd;
+bad144intern(struct wd_softc *wd)
{
struct dkbad *bt = &DKBAD(wd->sc_dk.dk_cpulabel);
struct disklabel *lp = wd->sc_dk.dk_label;
@@ -1290,10 +1240,7 @@ bad144intern(wd)
#endif
int
-wd_get_params(wd, flags, params)
- struct wd_softc *wd;
- u_int8_t flags;
- struct ataparams *params;
+wd_get_params(struct wd_softc *wd, u_int8_t flags, struct ataparams *params)
{
switch (ata_get_params(wd->drvp, flags, params)) {
case CMD_AGAIN:
@@ -1323,9 +1270,7 @@ wd_get_params(wd, flags, params)
}
void
-wd_flushcache(wd, flags)
- struct wd_softc *wd;
- int flags;
+wd_flushcache(struct wd_softc *wd, int flags)
{
struct wdc_command wdc_c;
@@ -1361,8 +1306,7 @@ wd_flushcache(wd, flags)
}
void
-wd_shutdown(arg)
- void *arg;
+wd_shutdown(void *arg)
{
struct wd_softc *wd = arg;
wd_flushcache(wd, AT_POLL);