Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev Clean-up of use of "precomp". It is used as "featur...
details: https://anonhg.NetBSD.org/src/rev/77bfc5ff6478
branches: trunk
changeset: 566981:77bfc5ff6478
user: thorpej <thorpej%NetBSD.org@localhost>
date: Thu May 27 02:23:12 2004 +0000
description:
Clean-up of use of "precomp". It is used as "features" everywhere, so
rename the fields in wdc_command as appropriate.
diffstat:
sys/dev/ata/ata.c | 6 +++---
sys/dev/ata/atavar.h | 4 ++--
sys/dev/ata/wd.c | 12 ++++++------
sys/dev/ic/wdc.c | 18 +++++++++---------
4 files changed, 20 insertions(+), 20 deletions(-)
diffs (158 lines):
diff -r d63b5d62e00b -r 77bfc5ff6478 sys/dev/ata/ata.c
--- a/sys/dev/ata/ata.c Thu May 27 02:09:26 2004 +0000
+++ b/sys/dev/ata/ata.c Thu May 27 02:23:12 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ata.c,v 1.28 2004/04/13 19:51:06 bouyer Exp $ */
+/* $NetBSD: ata.c,v 1.29 2004/05/27 02:23:12 thorpej Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.28 2004/04/13 19:51:06 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.29 2004/05/27 02:23:12 thorpej Exp $");
#ifndef WDCDEBUG
#define WDCDEBUG
@@ -447,7 +447,7 @@
wdc_c.r_command = SET_FEATURES;
wdc_c.r_st_bmask = 0;
wdc_c.r_st_pmask = 0;
- wdc_c.r_precomp = WDSF_SET_MODE;
+ wdc_c.r_features = WDSF_SET_MODE;
wdc_c.r_count = mode;
wdc_c.flags = flags;
wdc_c.timeout = 1000; /* 1s */
diff -r d63b5d62e00b -r 77bfc5ff6478 sys/dev/ata/atavar.h
--- a/sys/dev/ata/atavar.h Thu May 27 02:09:26 2004 +0000
+++ b/sys/dev/ata/atavar.h Thu May 27 02:23:12 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: atavar.h,v 1.41 2004/04/14 05:26:29 minoura Exp $ */
+/* $NetBSD: atavar.h,v 1.42 2004/05/27 02:23:12 thorpej Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer.
@@ -216,7 +216,7 @@
u_int16_t r_cyl;
u_int8_t r_sector;
u_int8_t r_count;
- u_int8_t r_precomp;
+ u_int8_t r_features;
u_int8_t r_st_bmask; /* status register mask to wait for before
command */
u_int8_t r_st_pmask; /* status register mask to wait for after
diff -r d63b5d62e00b -r 77bfc5ff6478 sys/dev/ata/wd.c
--- a/sys/dev/ata/wd.c Thu May 27 02:09:26 2004 +0000
+++ b/sys/dev/ata/wd.c Thu May 27 02:23:12 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wd.c,v 1.276 2004/05/21 20:35:53 bouyer Exp $ */
+/* $NetBSD: wd.c,v 1.277 2004/05/27 02:23:12 thorpej Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.276 2004/05/21 20:35:53 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.277 2004/05/27 02:23:12 thorpej Exp $");
#ifndef WDCDEBUG
#define WDCDEBUG
@@ -1628,9 +1628,9 @@
wdc_c.timeout = 30000; /* 30s timeout */
wdc_c.flags = AT_WAIT;
if (bits & DKCACHE_WRITE)
- wdc_c.r_precomp = WDSF_WRITE_CACHE_EN;
+ wdc_c.r_features = WDSF_WRITE_CACHE_EN;
else
- wdc_c.r_precomp = WDSF_WRITE_CACHE_DS;
+ wdc_c.r_features = WDSF_WRITE_CACHE_DS;
if (wd->atabus->ata_exec_command(wd->drvp, &wdc_c) != WDC_COMPLETE) {
printf("%s: wd_setcache command not complete\n",
wd->sc_dev.dv_xname);
@@ -1833,7 +1833,7 @@
wdc_c.r_cyl = wi->wi_atareq.cylinder;
wdc_c.r_sector = wi->wi_atareq.sec_num;
wdc_c.r_count = wi->wi_atareq.sec_count;
- wdc_c.r_precomp = wi->wi_atareq.features;
+ wdc_c.r_features = wi->wi_atareq.features;
wdc_c.r_st_bmask = WDCS_DRDY;
wdc_c.r_st_pmask = WDCS_DRDY;
wdc_c.data = wi->wi_bp.b_data;
@@ -1860,7 +1860,7 @@
wi->wi_atareq.cylinder = wdc_c.r_cyl;
wi->wi_atareq.sec_num = wdc_c.r_sector;
wi->wi_atareq.sec_count = wdc_c.r_count;
- wi->wi_atareq.features = wdc_c.r_precomp;
+ wi->wi_atareq.features = wdc_c.r_features;
wi->wi_atareq.error = wdc_c.r_error;
}
}
diff -r d63b5d62e00b -r 77bfc5ff6478 sys/dev/ic/wdc.c
--- a/sys/dev/ic/wdc.c Thu May 27 02:09:26 2004 +0000
+++ b/sys/dev/ic/wdc.c Thu May 27 02:23:12 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wdc.c,v 1.177 2004/05/27 02:09:26 thorpej Exp $ */
+/* $NetBSD: wdc.c,v 1.178 2004/05/27 02:23:12 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.177 2004/05/27 02:09:26 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.178 2004/05/27 02:23:12 thorpej Exp $");
#ifndef WDCDEBUG
#define WDCDEBUG
@@ -1666,7 +1666,7 @@
WDCTL_4BIT | WDCTL_IDS);
}
wdccommand(chp, drive, wdc_c->r_command, wdc_c->r_cyl, wdc_c->r_head,
- wdc_c->r_sector, wdc_c->r_count, wdc_c->r_precomp);
+ wdc_c->r_sector, wdc_c->r_count, wdc_c->r_features);
if ((wdc_c->flags & AT_POLL) == 0) {
chp->ch_flags |= WDCF_IRQ_WAIT; /* wait for interrupt */
@@ -1815,8 +1815,8 @@
chp->cmd_iohs[wd_seccnt], 0);
wdc_c->r_error = bus_space_read_1(chp->cmd_iot,
chp->cmd_iohs[wd_error], 0);
- wdc_c->r_precomp = bus_space_read_1(chp->cmd_iot,
- chp->cmd_iohs[wd_precomp], 0);
+ wdc_c->r_features = bus_space_read_1(chp->cmd_iot,
+ chp->cmd_iohs[wd_features], 0);
}
if (wdc_c->flags & AT_POLL) {
@@ -1841,14 +1841,14 @@
void
wdccommand(struct wdc_channel *chp, u_int8_t drive, u_int8_t command,
u_int16_t cylin, u_int8_t head, u_int8_t sector, u_int8_t count,
- u_int8_t precomp)
+ u_int8_t features)
{
struct wdc_softc *wdc = chp->ch_wdc;
WDCDEBUG_PRINT(("wdccommand %s:%d:%d: command=0x%x cylin=%d head=%d "
- "sector=%d count=%d precomp=%d\n", wdc->sc_dev.dv_xname,
+ "sector=%d count=%d features=%d\n", wdc->sc_dev.dv_xname,
chp->ch_channel, drive, command, cylin, head, sector, count,
- precomp), DEBUG_FUNCS);
+ features), DEBUG_FUNCS);
if (wdc->cap & WDC_CAPABILITY_SELECT)
wdc->select(chp,drive);
@@ -1858,7 +1858,7 @@
WDSD_IBM | (drive << 4) | head);
/* Load parameters into the wd_features register. */
bus_space_write_1(chp->cmd_iot, chp->cmd_iohs[wd_features], 0,
- precomp);
+ features);
bus_space_write_1(chp->cmd_iot, chp->cmd_iohs[wd_cyl_lo], 0, cylin);
bus_space_write_1(chp->cmd_iot, chp->cmd_iohs[wd_cyl_hi],
0, cylin >> 8);
Home |
Main Index |
Thread Index |
Old Index