summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorthorpej <thorpej@NetBSD.org>2004-01-01 20:25:22 +0000
committerthorpej <thorpej@NetBSD.org>2004-01-01 20:25:22 +0000
commit9bc0bf3f159ae8060bebe26c08137bbdd9f60eba (patch)
tree007d7778edcd567e2004977ad408db17d24efb44 /sys/dev
parent763657a529dd1818caace4e29aea8564f462aa34 (diff)
Prepend "wdc_" to wait_for_drq, wait_for_unbusy, and wait_for_ready.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ata/ata_wdc.c14
-rw-r--r--sys/dev/ic/wdc.c8
-rw-r--r--sys/dev/ic/wdcvar.h8
-rw-r--r--sys/dev/scsipi/atapi_wdc.c18
4 files changed, 24 insertions, 24 deletions
diff --git a/sys/dev/ata/ata_wdc.c b/sys/dev/ata/ata_wdc.c
index d177ceb77c4..99f4478227f 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.48 2004/01/01 17:18:54 thorpej Exp $ */
+/* $NetBSD: ata_wdc.c,v 1.49 2004/01/01 20:25:22 thorpej Exp $ */
/*
* Copyright (c) 1998, 2001, 2003 Manuel Bouyer.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ata_wdc.c,v 1.48 2004/01/01 17:18:54 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata_wdc.c,v 1.49 2004/01/01 20:25:22 thorpej Exp $");
#ifndef WDCDEBUG
#define WDCDEBUG
@@ -424,7 +424,7 @@ again:
chp->wdc->select(chp, xfer->c_drive);
bus_space_write_1(chp->cmd_iot, chp->cmd_iohs[wd_sdh],
0, WDSD_IBM | (xfer->c_drive << 4));
- switch(wait_for_ready(chp, ATA_DELAY, wait_flags)) {
+ switch(wdc_wait_for_ready(chp, ATA_DELAY, wait_flags)) {
case WDCWAIT_OK:
break;
case WDCWAIT_TOUT:
@@ -464,7 +464,7 @@ again:
chp->wdc->select(chp, xfer->c_drive);
bus_space_write_1(chp->cmd_iot, chp->cmd_iohs[wd_sdh], 0,
WDSD_IBM | (xfer->c_drive << 4));
- switch(wait_for_ready(chp, ATA_DELAY, wait_flags)) {
+ switch(wdc_wait_for_ready(chp, ATA_DELAY, wait_flags)) {
case WDCWAIT_OK:
break;
case WDCWAIT_TOUT:
@@ -499,7 +499,7 @@ again:
* we have to busy-wait here, we can't rely on running in
* thread context.
*/
- if (wait_for_drq(chp, ATA_DELAY, AT_POLL) != 0) {
+ if (wdc_wait_for_drq(chp, ATA_DELAY, AT_POLL) != 0) {
printf("%s:%d:%d: timeout waiting for DRQ, "
"st=0x%02x, err=0x%02x\n",
chp->wdc->sc_dev.dv_xname, chp->channel,
@@ -599,8 +599,8 @@ wdc_ata_bio_intr(struct channel_softc *chp, struct ata_xfer *xfer, int irq)
return 1;
}
- /* Ack interrupt done by wait_for_unbusy */
- if (wait_for_unbusy(chp, (irq == 0) ? ATA_DELAY : 0, AT_POLL) < 0) {
+ /* Ack interrupt done by wdc_wait_for_unbusy */
+ if (wdc_wait_for_unbusy(chp, (irq == 0) ? ATA_DELAY : 0, AT_POLL) < 0) {
if (irq && (xfer->c_flags & C_TIMEOU) == 0)
return 0; /* IRQ was not for us */
printf("%s:%d:%d: device timeout, c_bcount=%d, c_skip%d\n",
diff --git a/sys/dev/ic/wdc.c b/sys/dev/ic/wdc.c
index 8b10c906614..2ee38b111db 100644
--- a/sys/dev/ic/wdc.c
+++ b/sys/dev/ic/wdc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wdc.c,v 1.165 2004/01/01 17:18:53 thorpej Exp $ */
+/* $NetBSD: wdc.c,v 1.166 2004/01/01 20:25:22 thorpej Exp $ */
/*
* Copyright (c) 1998, 2001, 2003 Manuel Bouyer. All rights reserved.
@@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.165 2004/01/01 17:18:53 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.166 2004/01/01 20:25:22 thorpej Exp $");
#ifndef WDCDEBUG
#define WDCDEBUG
@@ -312,7 +312,7 @@ wdc_drvprobe(struct channel_softc *chp)
chp->ch_drive[i].drive_flags &= ~DRIVE_OLD;
continue;
}
- if (wait_for_ready(chp, 10000, 0) == WDCWAIT_TOUT) {
+ if (wdc_wait_for_ready(chp, 10000, 0) == WDCWAIT_TOUT) {
WDCDEBUG_PRINT(("%s:%d:%d: not ready\n",
chp->wdc->sc_dev.dv_xname,
chp->channel, i), DEBUG_PROBE);
@@ -322,7 +322,7 @@ wdc_drvprobe(struct channel_softc *chp)
bus_space_write_1(chp->cmd_iot,
chp->cmd_iohs[wd_command], 0, WDCC_RECAL);
delay(10); /* 400ns delay */
- if (wait_for_ready(chp, 10000, 0) == WDCWAIT_TOUT) {
+ if (wdc_wait_for_ready(chp, 10000, 0) == WDCWAIT_TOUT) {
WDCDEBUG_PRINT(("%s:%d:%d: WDCC_RECAL failed\n",
chp->wdc->sc_dev.dv_xname,
chp->channel, i), DEBUG_PROBE);
diff --git a/sys/dev/ic/wdcvar.h b/sys/dev/ic/wdcvar.h
index 78a94e26cb2..33dc35ba5f7 100644
--- a/sys/dev/ic/wdcvar.h
+++ b/sys/dev/ic/wdcvar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: wdcvar.h,v 1.50 2004/01/01 20:18:33 thorpej Exp $ */
+/* $NetBSD: wdcvar.h,v 1.51 2004/01/01 20:25:22 thorpej Exp $ */
/*-
* Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
@@ -213,11 +213,11 @@ void wdc_probe_caps(struct ata_drive_datas*);
* ST506 spec says that if READY or SEEKCMPLT go off, then the read or write
* command is aborted.
*/
-#define wait_for_drq(chp, timeout, flags) \
+#define wdc_wait_for_drq(chp, timeout, flags) \
wdcwait((chp), WDCS_DRQ, WDCS_DRQ, (timeout), (flags))
-#define wait_for_unbusy(chp, timeout, flags) \
+#define wdc_wait_for_unbusy(chp, timeout, flags) \
wdcwait((chp), 0, 0, (timeout), (flags))
-#define wait_for_ready(chp, timeout, flags) \
+#define wdc_wait_for_ready(chp, timeout, flags) \
wdcwait((chp), WDCS_DRDY, WDCS_DRDY, (timeout), (flags))
/* ATA/ATAPI specs says a device can take 31s to reset */
diff --git a/sys/dev/scsipi/atapi_wdc.c b/sys/dev/scsipi/atapi_wdc.c
index 0acd70ca93f..61593dc32d1 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.63 2004/01/01 17:18:54 thorpej Exp $ */
+/* $NetBSD: atapi_wdc.c,v 1.64 2004/01/01 20:25:22 thorpej Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: atapi_wdc.c,v 1.63 2004/01/01 17:18:54 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atapi_wdc.c,v 1.64 2004/01/01 20:25:22 thorpej Exp $");
#ifndef WDCDEBUG
#define WDCDEBUG
@@ -441,12 +441,12 @@ wdc_atapi_start(chp, xfer)
if ((drvp->drive_flags & DRIVE_MODE) == 0)
goto ready;
errstring = "unbusy";
- if (wait_for_unbusy(chp, ATAPI_DELAY, wait_flags))
+ if (wdc_wait_for_unbusy(chp, ATAPI_DELAY, wait_flags))
goto timeout;
wdccommand(chp, drvp->drive, SET_FEATURES, 0, 0, 0,
0x08 | drvp->PIO_mode, WDSF_SET_MODE);
errstring = "piomode";
- if (wait_for_unbusy(chp, ATAPI_MODE_DELAY, wait_flags))
+ if (wdc_wait_for_unbusy(chp, ATAPI_MODE_DELAY, wait_flags))
goto timeout;
if (chp->ch_status & WDCS_ERR) {
if (chp->ch_error == WDCE_ABRT) {
@@ -477,7 +477,7 @@ wdc_atapi_start(chp, xfer)
goto ready;
}
errstring = "dmamode";
- if (wait_for_unbusy(chp, ATAPI_MODE_DELAY, wait_flags))
+ if (wdc_wait_for_unbusy(chp, ATAPI_MODE_DELAY, wait_flags))
goto timeout;
if (chp->ch_status & WDCS_ERR)
goto error;
@@ -495,7 +495,7 @@ ready:
chp->wdc->select(chp, xfer->c_drive);
bus_space_write_1(chp->cmd_iot, chp->cmd_iohs[wd_sdh], 0,
WDSD_IBM | (xfer->c_drive << 4));
- switch (wait_for_unbusy(chp, ATAPI_DELAY, wait_flags) < 0) {
+ switch (wdc_wait_for_unbusy(chp, ATAPI_DELAY, wait_flags) < 0) {
case WDCWAIT_OK:
break;
case WDCWAIT_TOUT:
@@ -599,12 +599,12 @@ wdc_atapi_intr(chp, xfer, irq)
return 1;
}
- /* Ack interrupt done in wait_for_unbusy */
+ /* Ack interrupt done in wdc_wait_for_unbusy */
if (chp->wdc->cap & WDC_CAPABILITY_SELECT)
chp->wdc->select(chp, xfer->c_drive);
bus_space_write_1(chp->cmd_iot, chp->cmd_iohs[wd_sdh], 0,
WDSD_IBM | (xfer->c_drive << 4));
- if (wait_for_unbusy(chp,
+ if (wdc_wait_for_unbusy(chp,
(irq == 0) ? sc_xfer->timeout : 0, AT_POLL) == WDCWAIT_TOUT) {
if (irq && (xfer->c_flags & C_TIMEOU) == 0)
return 0; /* IRQ was not for us */
@@ -994,7 +994,7 @@ wdc_atapi_reset(chp, xfer)
wdccommandshort(chp, xfer->c_drive, ATAPI_SOFT_RESET);
drvp->state = 0;
- if (wait_for_unbusy(chp, WDC_RESET_WAIT, AT_POLL) != 0) {
+ if (wdc_wait_for_unbusy(chp, WDC_RESET_WAIT, AT_POLL) != 0) {
printf("%s:%d:%d: reset failed\n",
chp->wdc->sc_dev.dv_xname, chp->channel,
xfer->c_drive);