Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev Instead of assume that 'features' is 0 in wdccommand...
details: https://anonhg.NetBSD.org/src/rev/57f75b842ec5
branches: trunk
changeset: 772570:57f75b842ec5
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Mon Jan 09 01:01:48 2012 +0000
description:
Instead of assume that 'features' is 0 in wdccommandext(),
pass it as an argument, as is done for wdccommand().
diffstat:
sys/dev/ata/ata_wdc.c | 8 ++++----
sys/dev/ic/mvsata.c | 6 +++---
sys/dev/ic/wdc.c | 26 +++++++++++++-------------
sys/dev/ic/wdcvar.h | 4 ++--
4 files changed, 22 insertions(+), 22 deletions(-)
diffs (149 lines):
diff -r 9d3de911bc48 -r 57f75b842ec5 sys/dev/ata/ata_wdc.c
--- a/sys/dev/ata/ata_wdc.c Sun Jan 08 22:14:55 2012 +0000
+++ b/sys/dev/ata/ata_wdc.c Mon Jan 09 01:01:48 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ata_wdc.c,v 1.95 2011/08/28 09:43:25 christos Exp $ */
+/* $NetBSD: ata_wdc.c,v 1.96 2012/01/09 01:01:48 jakllsch Exp $ */
/*
* Copyright (c) 1998, 2001, 2003 Manuel Bouyer.
@@ -54,7 +54,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ata_wdc.c,v 1.95 2011/08/28 09:43:25 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata_wdc.c,v 1.96 2012/01/09 01:01:48 jakllsch Exp $");
#include "opt_ata.h"
#include "opt_wdc.h"
@@ -446,7 +446,7 @@
}
if (ata_bio->flags & ATA_LBA48) {
wdccommandext(chp, xfer->c_drive, atacmd_to48(cmd),
- (u_int64_t)ata_bio->blkno, nblks);
+ (u_int64_t)ata_bio->blkno, nblks, 0);
} else {
wdccommand(chp, xfer->c_drive, cmd, cyl,
head, sect, nblks, 0);
@@ -520,7 +520,7 @@
}
if (ata_bio->flags & ATA_LBA48) {
wdccommandext(chp, xfer->c_drive, atacmd_to48(cmd),
- (u_int64_t) ata_bio->blkno, nblks);
+ (u_int64_t)ata_bio->blkno, nblks, 0);
} else {
wdccommand(chp, xfer->c_drive, cmd, cyl,
head, sect, nblks,
diff -r 9d3de911bc48 -r 57f75b842ec5 sys/dev/ic/mvsata.c
--- a/sys/dev/ic/mvsata.c Sun Jan 08 22:14:55 2012 +0000
+++ b/sys/dev/ic/mvsata.c Mon Jan 09 01:01:48 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mvsata.c,v 1.11 2011/09/01 14:55:58 jakllsch Exp $ */
+/* $NetBSD: mvsata.c,v 1.12 2012/01/09 01:01:49 jakllsch Exp $ */
/*
* Copyright (c) 2008 KIYOHARA Takashi
* All rights reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.11 2011/09/01 14:55:58 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.12 2012/01/09 01:01:49 jakllsch Exp $");
#include "opt_mvsata.h"
@@ -1166,7 +1166,7 @@
}
if (ata_bio->flags & ATA_LBA48)
wdccommandext(chp, xfer->c_drive, atacmd_to48(cmd),
- (u_int64_t)ata_bio->blkno, nblks);
+ (uint64_t)ata_bio->blkno, nblks, 0);
else
wdccommand(chp, xfer->c_drive, cmd, cyl,
head, sect, nblks,
diff -r 9d3de911bc48 -r 57f75b842ec5 sys/dev/ic/wdc.c
--- a/sys/dev/ic/wdc.c Sun Jan 08 22:14:55 2012 +0000
+++ b/sys/dev/ic/wdc.c Mon Jan 09 01:01:48 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wdc.c,v 1.266 2011/12/04 19:48:36 jakllsch Exp $ */
+/* $NetBSD: wdc.c,v 1.267 2012/01/09 01:01:49 jakllsch Exp $ */
/*
* Copyright (c) 1998, 2001, 2003 Manuel Bouyer. All rights reserved.
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.266 2011/12/04 19:48:36 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.267 2012/01/09 01:01:49 jakllsch Exp $");
#include "opt_ata.h"
#include "opt_wdc.h"
@@ -1714,7 +1714,7 @@
*/
void
wdccommandext(struct ata_channel *chp, u_int8_t drive, u_int8_t command,
- u_int64_t blkno, u_int16_t count)
+ u_int64_t blkno, u_int16_t count, u_int16_t features)
{
struct wdc_softc *wdc = CHAN_TO_WDC(chp);
struct wdc_regs *wdr = &wdc->regs[chp->ch_channel];
@@ -1732,8 +1732,8 @@
(drive << 4) | WDSD_LBA);
if (wdc->cap & WDC_CAPABILITY_WIDEREGS) {
- bus_space_write_2(wdr->cmd_iot, wdr->cmd_iohs[wd_features], 0,
- 0);
+ bus_space_write_2(wdr->cmd_iot, wdr->cmd_iohs[wd_features],
+ 0, features);
bus_space_write_2(wdr->cmd_iot, wdr->cmd_iohs[wd_seccnt],
0, count);
bus_space_write_2(wdr->cmd_iot, wdr->cmd_iohs[wd_lba_lo],
@@ -1744,8 +1744,8 @@
0, (((blkno >> 32) & 0xff00) | ((blkno >> 16) & 0x00ff)));
} else {
/* previous */
- bus_space_write_1(wdr->cmd_iot, wdr->cmd_iohs[wd_features], 0,
- 0);
+ bus_space_write_1(wdr->cmd_iot, wdr->cmd_iohs[wd_features],
+ 0, features >> 8);
bus_space_write_1(wdr->cmd_iot, wdr->cmd_iohs[wd_seccnt],
0, count >> 8);
bus_space_write_1(wdr->cmd_iot, wdr->cmd_iohs[wd_lba_lo],
@@ -1756,12 +1756,12 @@
0, blkno >> 40);
/* current */
- bus_space_write_1(wdr->cmd_iot, wdr->cmd_iohs[wd_features], 0,
- 0);
- bus_space_write_1(wdr->cmd_iot, wdr->cmd_iohs[wd_seccnt], 0,
- count);
- bus_space_write_1(wdr->cmd_iot, wdr->cmd_iohs[wd_lba_lo], 0,
- blkno);
+ bus_space_write_1(wdr->cmd_iot, wdr->cmd_iohs[wd_features],
+ 0, features);
+ bus_space_write_1(wdr->cmd_iot, wdr->cmd_iohs[wd_seccnt],
+ 0, count);
+ bus_space_write_1(wdr->cmd_iot, wdr->cmd_iohs[wd_lba_lo],
+ 0, blkno);
bus_space_write_1(wdr->cmd_iot, wdr->cmd_iohs[wd_lba_mi],
0, blkno >> 8);
bus_space_write_1(wdr->cmd_iot, wdr->cmd_iohs[wd_lba_hi],
diff -r 9d3de911bc48 -r 57f75b842ec5 sys/dev/ic/wdcvar.h
--- a/sys/dev/ic/wdcvar.h Sun Jan 08 22:14:55 2012 +0000
+++ b/sys/dev/ic/wdcvar.h Mon Jan 09 01:01:48 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wdcvar.h,v 1.91 2010/11/05 18:07:24 jakllsch Exp $ */
+/* $NetBSD: wdcvar.h,v 1.92 2012/01/09 01:01:49 jakllsch Exp $ */
/*-
* Copyright (c) 1998, 2003, 2004 The NetBSD Foundation, Inc.
@@ -161,7 +161,7 @@
void wdccommand(struct ata_channel *, u_int8_t, u_int8_t, u_int16_t,
u_int8_t, u_int8_t, u_int8_t, u_int8_t);
void wdccommandext(struct ata_channel *, u_int8_t, u_int8_t, u_int64_t,
- u_int16_t);
+ u_int16_t, u_int16_t);
void wdccommandshort(struct ata_channel *, int, int);
void wdctimeout(void *arg);
void wdc_reset_drive(struct ata_drive_datas *, int);
Home |
Main Index |
Thread Index |
Old Index