summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbouyer <bouyer@NetBSD.org>1998-10-13 09:33:59 +0000
committerbouyer <bouyer@NetBSD.org>1998-10-13 09:33:59 +0000
commitff0134b99fa5ee9c5cc4601eaeb2f83d18672deb (patch)
tree66077c267083f3ca3eb5be8b035bf5e070d8e09d
parentda5d0a6f1749ce7aaa0fd27149dacee075dbb85a (diff)
Properly separate DEBUF_XFERS and DEBUG_FUNCS: DEBUF_XFERS is for data
transfers (may be called often), where DEBUG_FUNCS is for setup functions (not used for normal contitions).
-rw-r--r--sys/dev/ata/ata_wdc.c10
-rw-r--r--sys/dev/ata/wd.c16
-rw-r--r--sys/dev/ic/wdc.c9
-rw-r--r--sys/dev/scsipi/atapi_wdc.c15
4 files changed, 27 insertions, 23 deletions
diff --git a/sys/dev/ata/ata_wdc.c b/sys/dev/ata/ata_wdc.c
index 5821aab7941..063eb98d958 100644
--- a/sys/dev/ata/ata_wdc.c
+++ b/sys/dev/ata/ata_wdc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ata_wdc.c,v 1.3 1998/10/13 05:39:01 thorpej Exp $ */
+/* $NetBSD: ata_wdc.c,v 1.4 1998/10/13 09:33:59 bouyer Exp $ */
/*
* Copyright (c) 1998 Manuel Bouyer.
@@ -167,7 +167,7 @@ wdc_ata_bio_start(chp, xfer)
WDCDEBUG_PRINT(("wdc_ata_bio_start %s:%d:%d\n",
chp->wdc->sc_dev.dv_xname, chp->channel, xfer->drive),
- DEBUG_FUNCS | DEBUG_XFERS);
+ DEBUG_XFERS);
/* Do control operations specially. */
if (drvp->state < READY) {
@@ -534,7 +534,7 @@ wdc_ata_bio_done(chp, xfer)
int drive = xfer->drive;
WDCDEBUG_PRINT(("wdc_ata_bio_done: flags 0x%x\n", (u_int)xfer->c_flags),
- DEBUG_FUNCS);
+ DEBUG_XFERS);
/* feed back residual bcount to our caller */
ata_bio->bcount = xfer->c_bcount;
@@ -544,11 +544,11 @@ wdc_ata_bio_done(chp, xfer)
ata_bio->flags |= ATA_ITSDONE;
if (need_done) {
- WDCDEBUG_PRINT(("wdc_ata_done: wddone\n"), DEBUG_FUNCS);
+ WDCDEBUG_PRINT(("wdc_ata_done: wddone\n"), DEBUG_XFERS);
wddone(chp->ch_drive[drive].drv_softc);
}
WDCDEBUG_PRINT(("wdcstart from wdc_ata_done, flags 0x%x\n",
- chp->ch_flags), DEBUG_FUNCS);
+ chp->ch_flags), DEBUG_XFERS);
wdcstart(chp->wdc, chp->channel);
}
diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c
index 8188c434faa..ddda9451853 100644
--- a/sys/dev/ata/wd.c
+++ b/sys/dev/ata/wd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wd.c,v 1.181 1998/10/12 16:09:16 bouyer Exp $ */
+/* $NetBSD: wd.c,v 1.182 1998/10/13 09:34:00 bouyer Exp $ */
/*
* Copyright (c) 1998 Manuel Bouyer. All rights reserved.
@@ -333,7 +333,7 @@ wdstrategy(bp)
struct wd_softc *wd = wd_cd.cd_devs[WDUNIT(bp->b_dev)];
int s;
WDCDEBUG_PRINT(("wdstrategy (%s)\n", wd->sc_dev.dv_xname),
- DEBUG_FUNCS | DEBUG_XFERS);
+ DEBUG_XFERS);
/* Valid request? */
if (bp->b_blkno < 0 ||
@@ -386,7 +386,7 @@ wdstart(arg)
struct buf *dp, *bp=0;
WDCDEBUG_PRINT(("wdstart %s\n", wd->sc_dev.dv_xname),
- DEBUG_FUNCS | DEBUG_XFERS);
+ DEBUG_XFERS);
while (wd->openings > 0) {
/* Is there a buf for us ? */
@@ -459,7 +459,7 @@ wddone(v)
struct buf *bp = wd->sc_bp;
char buf[256], *errbuf = buf;
WDCDEBUG_PRINT(("wddone %s\n", wd->sc_dev.dv_xname),
- DEBUG_FUNCS | DEBUG_XFERS);
+ DEBUG_XFERS);
bp->b_resid = wd->sc_wdc_bio.bcount;
errbuf[0] = '\0';
@@ -514,7 +514,7 @@ wdrestart(v)
struct buf *bp = wd->sc_bp;
int s;
WDCDEBUG_PRINT(("wdrestart %s\n", wd->sc_dev.dv_xname),
- DEBUG_FUNCS | DEBUG_XFERS);
+ DEBUG_XFERS);
s = splbio();
__wdstart(v, bp);
@@ -528,7 +528,7 @@ wdread(dev, uio, flags)
int flags;
{
- WDCDEBUG_PRINT(("wdread\n"), DEBUG_FUNCS | DEBUG_XFERS);
+ WDCDEBUG_PRINT(("wdread\n"), DEBUG_XFERS);
return (physio(wdstrategy, NULL, dev, B_READ, minphys, uio));
}
@@ -539,7 +539,7 @@ wdwrite(dev, uio, flags)
int flags;
{
- WDCDEBUG_PRINT(("wdwrite\n"), DEBUG_FUNCS | DEBUG_XFERS);
+ WDCDEBUG_PRINT(("wdwrite\n"), DEBUG_XFERS);
return (physio(wdstrategy, NULL, dev, B_WRITE, minphys, uio));
}
@@ -1105,7 +1105,7 @@ bad144intern(wd)
struct disklabel *lp = wd->sc_dk.dk_label;
int i = 0;
- WDCDEBUG_PRINT(("bad144intern\n"), DEBUG_FUNCS | DEBUG_XFERS);
+ WDCDEBUG_PRINT(("bad144intern\n"), DEBUG_XFERS);
for (; i < NBT_BAD; i++) {
if (bt->bt_bad[i].bt_cyl == 0xffff)
diff --git a/sys/dev/ic/wdc.c b/sys/dev/ic/wdc.c
index 0333a204c5c..5b1a2ad2681 100644
--- a/sys/dev/ic/wdc.c
+++ b/sys/dev/ic/wdc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wdc.c,v 1.32 1998/10/13 08:59:45 bouyer Exp $ */
+/* $NetBSD: wdc.c,v 1.33 1998/10/13 09:34:01 bouyer Exp $ */
/*
@@ -714,9 +714,11 @@ wdc_probe_caps(drvp)
}
}
+#if 0
/* An ATAPI device is at last PIO mode 3 */
if (drvp->drive_flags & DRIVE_ATAPI)
drvp->PIO_mode = 3;
+#endif
/*
* It's not in the specs, but it seems that some drive
@@ -1029,7 +1031,8 @@ wdc_exec_xfer(chp, xfer)
struct channel_softc *chp;
struct wdc_xfer *xfer;
{
- WDCDEBUG_PRINT(("wdc_exec_xfer %p\n", xfer), DEBUG_FUNCS);
+ WDCDEBUG_PRINT(("wdc_exec_xfer %p channel %d drive %d\n", xfer,
+ chp->channel, xfer->drive), DEBUG_XFERS);
/* complete xfer setup */
xfer->channel = chp->channel;
@@ -1046,7 +1049,7 @@ wdc_exec_xfer(chp, xfer)
/* insert at the end of command list */
TAILQ_INSERT_TAIL(&chp->ch_queue->sc_xfer,xfer , c_xferchain);
WDCDEBUG_PRINT(("wdcstart from wdc_exec_xfer, flags 0x%x\n",
- chp->ch_flags), DEBUG_FUNCS);
+ chp->ch_flags), DEBUG_XFERS);
wdcstart(chp->wdc, chp->channel);
xfer->c_flags |= C_NEEDDONE; /* we can now call upper level done() */
}
diff --git a/sys/dev/scsipi/atapi_wdc.c b/sys/dev/scsipi/atapi_wdc.c
index 691899899d3..5257c2b5706 100644
--- a/sys/dev/scsipi/atapi_wdc.c
+++ b/sys/dev/scsipi/atapi_wdc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: atapi_wdc.c,v 1.3 1998/10/13 08:59:46 bouyer Exp $ */
+/* $NetBSD: atapi_wdc.c,v 1.4 1998/10/13 09:34:01 bouyer Exp $ */
/*
* Copyright (c) 1998 Manuel Bouyer.
@@ -193,7 +193,7 @@ wdc_atapi_send_cmd(sc_xfer)
int drive = sc_xfer->sc_link->scsipi_atapi.drive;
int s, ret;
- WDCDEBUG_PRINT(("wdc_atapi_send_cmd\n"), DEBUG_FUNCS);
+ WDCDEBUG_PRINT(("wdc_atapi_send_cmd\n"), DEBUG_XFERS);
xfer = wdc_get_xfer(flags & SCSI_NOSLEEP ? WDC_NOSLEEP : WDC_CANSLEEP);
if (xfer == NULL) {
@@ -233,7 +233,7 @@ wdc_atapi_start(chp, xfer)
struct ata_drive_datas *drvp = &chp->ch_drive[xfer->drive];
WDCDEBUG_PRINT(("wdc_atapi_start, scsi flags 0x%x \n",sc_xfer->flags),
- DEBUG_FUNCS);
+ DEBUG_XFERS);
/* Do control operations specially. */
if (drvp->state < READY) {
if (drvp->state != PIOMODE) {
@@ -591,9 +591,10 @@ wdc_atapi_ctrl(chp, xfer)
struct ata_drive_datas *drvp = &chp->ch_drive[xfer->drive];
char *errstring = NULL;
- WDCDEBUG_PRINT(("wdc_atapi_ctrl state %d\n", drvp->state), DEBUG_INTR);
/* Ack interrupt done in wait_for_unbusy */
again:
+ WDCDEBUG_PRINT(("wdc_atapi_ctrl state %d\n", drvp->state),
+ DEBUG_INTR | DEBUG_FUNCS);
bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_sdh,
WDSD_IBM | (xfer->drive << 4));
switch (drvp->state) {
@@ -679,18 +680,18 @@ wdc_atapi_done(chp, xfer)
int need_done = xfer->c_flags & C_NEEDDONE;
WDCDEBUG_PRINT(("wdc_atapi_done: flags 0x%x\n", (u_int)xfer->c_flags),
- DEBUG_FUNCS);
+ DEBUG_XFERS);
sc_xfer->resid = xfer->c_bcount;
/* remove this command from xfer queue */
xfer->c_skip = 0;
wdc_free_xfer(chp, xfer);
sc_xfer->flags |= ITSDONE;
if (need_done) {
- WDCDEBUG_PRINT(("wdc_atapi_done: scsipi_done\n"), DEBUG_FUNCS);
+ WDCDEBUG_PRINT(("wdc_atapi_done: scsipi_done\n"), DEBUG_XFERS);
scsipi_done(sc_xfer);
}
WDCDEBUG_PRINT(("wdcstart from wdc_atapi_done, flags 0x%x\n",
- chp->ch_flags), DEBUG_FUNCS);
+ chp->ch_flags), DEBUG_XFERS);
wdcstart(wdc, chp->channel);
}