Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Apply back changes that were reverted on Jul 24 and Jul ...
details: https://anonhg.NetBSD.org/src/rev/0126d048c4e4
branches: trunk
changeset: 780624:0126d048c4e4
user: bouyer <bouyer%NetBSD.org@localhost>
date: Tue Jul 31 15:50:31 2012 +0000
description:
Apply back changes that were reverted on Jul 24 and Jul 26 (general ata/wdc
cleanup and SATA PMP support), now that I'm back to fix the fallouts.
diffstat:
sys/arch/acorn32/eb7500atx/rside.c | 6 +-
sys/arch/acorn32/mainbus/wdc_pioc.c | 6 +-
sys/arch/acorn32/podulebus/icside.c | 6 +-
sys/arch/acorn32/podulebus/rapide.c | 6 +-
sys/arch/acorn32/podulebus/simide.c | 6 +-
sys/arch/amiga/dev/efa.c | 6 +-
sys/arch/amiga/dev/wdc_amiga.c | 6 +-
sys/arch/amiga/dev/wdc_buddha.c | 4 +-
sys/arch/arm/gemini/obio_wdc.c | 6 +-
sys/arch/atari/dev/wdc_mb.c | 6 +-
sys/arch/evbarm/iq31244/wdc_obio.c | 6 +-
sys/arch/evbarm/tsarm/wdc_ts.c | 6 +-
sys/arch/evbppc/mpc85xx/wdc_obio.c | 4 +-
sys/arch/i386/pci/gcscide.c | 12 +-
sys/arch/i386/pnpbios/pciide_pnpbios.c | 8 +-
sys/arch/landisk/dev/wdc_obio.c | 6 +-
sys/arch/mac68k/obio/wdc_obio.c | 6 +-
sys/arch/macppc/dev/kauai.c | 17 +-
sys/arch/macppc/dev/wdc_obio.c | 16 +-
sys/arch/mips/adm5120/dev/wdc_extio.c | 6 +-
sys/arch/mmeye/dev/wdc_mainbus.c | 6 +-
sys/arch/prep/pnpbus/wdc_pnpbus.c | 6 +-
sys/conf/files | 7 +-
sys/dev/ata/ata.c | 285 +++++++++++++++++++++---------
sys/dev/ata/ata_wdc.c | 24 +-
sys/dev/ata/atavar.h | 45 ++--
sys/dev/ata/files.ata | 5 +-
sys/dev/ata/sata_subr.c | 55 +++++-
sys/dev/ata/satapmpreg.h | 7 +-
sys/dev/ata/satavar.h | 3 +-
sys/dev/ata/wd.c | 40 ++-
sys/dev/ic/ahcisata_core.c | 311 +++++++++++++++++++++++++-------
sys/dev/ic/ahcisatavar.h | 3 +-
sys/dev/ic/mvsata.c | 86 ++++----
sys/dev/ic/ninjaata32.c | 14 +-
sys/dev/ic/siisata.c | 164 ++++++++--------
sys/dev/ic/wdc.c | 152 ++++++++-------
sys/dev/ic/wdc_upc.c | 6 +-
sys/dev/ic/wdcvar.h | 10 +-
sys/dev/isa/wdc_isa.c | 6 +-
sys/dev/isapnp/wdc_isapnp.c | 6 +-
sys/dev/mca/ed_mca.c | 8 +-
sys/dev/ofisa/wdc_ofisa.c | 6 +-
sys/dev/pci/acardide.c | 19 +-
sys/dev/pci/aceride.c | 17 +-
sys/dev/pci/artsata.c | 6 +-
sys/dev/pci/cmdide.c | 24 +-
sys/dev/pci/cypide.c | 10 +-
sys/dev/pci/geodeide.c | 13 +-
sys/dev/pci/hptide.c | 15 +-
sys/dev/pci/iteide.c | 15 +-
sys/dev/pci/ixpide.c | 13 +-
sys/dev/pci/jmide.c | 13 +-
sys/dev/pci/nside.c | 9 +-
sys/dev/pci/optiide.c | 11 +-
sys/dev/pci/pciide_common.c | 35 +-
sys/dev/pci/pciidevar.h | 4 +-
sys/dev/pci/pdcide.c | 63 +++---
sys/dev/pci/pdcsata.c | 14 +-
sys/dev/pci/piixide.c | 36 ++-
sys/dev/pci/rccide.c | 15 +-
sys/dev/pci/rdcide.c | 13 +-
sys/dev/pci/satalink.c | 29 +-
sys/dev/pci/schide.c | 15 +-
sys/dev/pci/siside.c | 24 +-
sys/dev/pci/slide.c | 15 +-
sys/dev/pci/stpcide.c | 13 +-
sys/dev/pci/svwsata.c | 5 +-
sys/dev/pci/toshide.c | 13 +-
sys/dev/pci/viaide.c | 26 +-
sys/dev/pcmcia/wdc_pcmcia.c | 10 +-
sys/dev/podulebus/dtide.c | 6 +-
sys/dev/podulebus/hcide.c | 6 +-
sys/dev/scsipi/atapi_wdc.c | 28 +-
sys/dev/usb/umass_isdata.c | 11 +-
75 files changed, 1172 insertions(+), 774 deletions(-)
diffs (truncated from 5948 to 300 lines):
diff -r f0c12330d38f -r 0126d048c4e4 sys/arch/acorn32/eb7500atx/rside.c
--- a/sys/arch/acorn32/eb7500atx/rside.c Tue Jul 31 15:47:58 2012 +0000
+++ b/sys/arch/acorn32/eb7500atx/rside.c Tue Jul 31 15:50:31 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rside.c,v 1.13 2012/07/26 20:49:44 jakllsch Exp $ */
+/* $NetBSD: rside.c,v 1.14 2012/07/31 15:50:31 bouyer Exp $ */
/*
* Copyright (c) 2004 Christopher Gilbert
@@ -56,7 +56,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rside.c,v 1.13 2012/07/26 20:49:44 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rside.c,v 1.14 2012/07/31 15:50:31 bouyer Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -190,6 +190,7 @@
sc->sc_wdcdev.sc_atac.atac_pio_cap = 0;
sc->sc_wdcdev.sc_atac.atac_channels = sc->sc_chanarray;
sc->sc_wdcdev.sc_atac.atac_nchannels = 2;
+ sc->sc_wdcdev.wdc_maxdrives = 2;
for (channel = 0 ; channel < 2; channel++) {
scp = &sc->rside_channels[channel];
sc->sc_chanarray[channel] = &scp->rc_channel;
@@ -199,7 +200,6 @@
cp->ch_channel = channel;
cp->ch_atac = &sc->sc_wdcdev.sc_atac;
cp->ch_queue = &scp->rc_chqueue;
- cp->ch_ndrive = 2;
wdr->cmd_iot = wdr->ctl_iot = &sc->sc_tag;
if (bus_space_map(wdr->cmd_iot,
rside_info[channel].drive_registers,
diff -r f0c12330d38f -r 0126d048c4e4 sys/arch/acorn32/mainbus/wdc_pioc.c
--- a/sys/arch/acorn32/mainbus/wdc_pioc.c Tue Jul 31 15:47:58 2012 +0000
+++ b/sys/arch/acorn32/mainbus/wdc_pioc.c Tue Jul 31 15:50:31 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wdc_pioc.c,v 1.27 2012/07/26 20:49:44 jakllsch Exp $ */
+/* $NetBSD: wdc_pioc.c,v 1.28 2012/07/31 15:50:31 bouyer Exp $ */
/*
* Copyright (c) 1997-1998 Mark Brinicombe.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wdc_pioc.c,v 1.27 2012/07/26 20:49:44 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc_pioc.c,v 1.28 2012/07/31 15:50:31 bouyer Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -185,9 +185,9 @@
sc->sc_wdcdev.sc_atac.atac_channels = sc->sc_chanlist;
sc->sc_channel.ch_atac = &sc->sc_wdcdev.sc_atac;
sc->sc_wdcdev.sc_atac.atac_nchannels = 1;
+ sc->sc_wdcdev.wdc_maxdrives = 2;
sc->sc_channel.ch_channel = 0;
sc->sc_channel.ch_queue = &sc->sc_chqueue;
- sc->sc_channel.ch_ndrive = 2;
wdc_init_shadow_regs(&sc->sc_channel);
diff -r f0c12330d38f -r 0126d048c4e4 sys/arch/acorn32/podulebus/icside.c
--- a/sys/arch/acorn32/podulebus/icside.c Tue Jul 31 15:47:58 2012 +0000
+++ b/sys/arch/acorn32/podulebus/icside.c Tue Jul 31 15:50:31 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: icside.c,v 1.31 2012/07/26 20:49:45 jakllsch Exp $ */
+/* $NetBSD: icside.c,v 1.32 2012/07/31 15:50:31 bouyer Exp $ */
/*
* Copyright (c) 1997-1998 Mark Brinicombe
@@ -42,7 +42,7 @@
#include <sys/param.h>
-__KERNEL_RCSID(0, "$NetBSD: icside.c,v 1.31 2012/07/26 20:49:45 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: icside.c,v 1.32 2012/07/31 15:50:31 bouyer Exp $");
#include <sys/systm.h>
#include <sys/conf.h>
@@ -259,6 +259,7 @@
sc->sc_wdcdev.sc_atac.atac_nchannels = ide->channels;
sc->sc_wdcdev.sc_atac.atac_cap |= ATAC_CAP_DATA16;
sc->sc_wdcdev.sc_atac.atac_pio_cap = 0;
+ sc->sc_wdcdev.wdc_maxdrives = 2;
sc->sc_pa = pa;
for (channel = 0; channel < ide->channels; ++channel) {
@@ -270,7 +271,6 @@
cp->ch_channel = channel;
cp->ch_atac = &sc->sc_wdcdev.sc_atac;
cp->ch_queue = &icp->ic_chqueue;
- cp->ch_ndrive = 2;
wdr->cmd_iot = &sc->sc_tag;
wdr->ctl_iot = &sc->sc_tag;
if (ide->modspace)
diff -r f0c12330d38f -r 0126d048c4e4 sys/arch/acorn32/podulebus/rapide.c
--- a/sys/arch/acorn32/podulebus/rapide.c Tue Jul 31 15:47:58 2012 +0000
+++ b/sys/arch/acorn32/podulebus/rapide.c Tue Jul 31 15:50:31 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rapide.c,v 1.29 2012/07/26 20:49:45 jakllsch Exp $ */
+/* $NetBSD: rapide.c,v 1.30 2012/07/31 15:50:31 bouyer Exp $ */
/*
* Copyright (c) 1997-1998 Mark Brinicombe
@@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rapide.c,v 1.29 2012/07/26 20:49:45 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rapide.c,v 1.30 2012/07/31 15:50:31 bouyer Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -250,6 +250,7 @@
sc->sc_wdcdev.sc_atac.atac_pio_cap = 0;
sc->sc_wdcdev.sc_atac.atac_channels = sc->sc_chanarray;
sc->sc_wdcdev.sc_atac.atac_nchannels = 2;
+ sc->sc_wdcdev.wdc_maxdrives = 2;
for (channel = 0 ; channel < 2; channel++) {
rcp = &sc->rapide_channels[channel];
sc->sc_chanarray[channel] = &rcp->rc_channel;
@@ -259,7 +260,6 @@
cp->ch_channel = channel;
cp->ch_atac = &sc->sc_wdcdev.sc_atac;
cp->ch_queue = &rcp->rc_chqueue;
- cp->ch_ndrive = 2;
wdr->cmd_iot = iot;
wdr->ctl_iot = iot;
wdr->data32iot = iot;
diff -r f0c12330d38f -r 0126d048c4e4 sys/arch/acorn32/podulebus/simide.c
--- a/sys/arch/acorn32/podulebus/simide.c Tue Jul 31 15:47:58 2012 +0000
+++ b/sys/arch/acorn32/podulebus/simide.c Tue Jul 31 15:50:31 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: simide.c,v 1.28 2012/07/26 20:49:45 jakllsch Exp $ */
+/* $NetBSD: simide.c,v 1.29 2012/07/31 15:50:31 bouyer Exp $ */
/*
* Copyright (c) 1997-1998 Mark Brinicombe
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: simide.c,v 1.28 2012/07/26 20:49:45 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: simide.c,v 1.29 2012/07/31 15:50:31 bouyer Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -249,6 +249,7 @@
sc->sc_wdcdev.sc_atac.atac_pio_cap = 0;
sc->sc_wdcdev.sc_atac.atac_channels = sc->sc_chanarray;
sc->sc_wdcdev.sc_atac.atac_nchannels = 2;
+ sc->sc_wdcdev.wdc_maxdrives = 2;
for (channel = 0 ; channel < 2; channel++) {
scp = &sc->simide_channels[channel];
sc->sc_chanarray[channel] = &scp->sc_channel;
@@ -258,7 +259,6 @@
cp->ch_channel = channel;
cp->ch_atac = &sc->sc_wdcdev.sc_atac;
cp->ch_queue = &scp->sc_chqueue;
- cp->ch_ndrive = 2;
wdr->cmd_iot = wdr->ctl_iot = &sc->sc_tag;
iobase = pa->pa_podule->mod_base;
if (bus_space_map(wdr->cmd_iot, iobase +
diff -r f0c12330d38f -r 0126d048c4e4 sys/arch/amiga/dev/efa.c
--- a/sys/arch/amiga/dev/efa.c Tue Jul 31 15:47:58 2012 +0000
+++ b/sys/arch/amiga/dev/efa.c Tue Jul 31 15:50:31 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: efa.c,v 1.10 2012/07/26 20:49:45 jakllsch Exp $ */
+/* $NetBSD: efa.c,v 1.11 2012/07/31 15:50:31 bouyer Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -159,6 +159,7 @@
sc->sc_wdcdev.sc_atac.atac_dev = self;
sc->sc_wdcdev.sc_atac.atac_channels = sc->sc_chanlist;
sc->sc_wdcdev.sc_atac.atac_cap = ATAC_CAP_DATA16;
+ sc->sc_wdcdev.wdc_maxdrives = 2;
if (sc->sc_32bit_io)
sc->sc_wdcdev.sc_atac.atac_cap |= ATAC_CAP_DATA32;
@@ -206,7 +207,6 @@
sc->sc_ports[chnum].chan.ch_channel = chnum;
sc->sc_ports[chnum].chan.ch_atac = &sc->sc_wdcdev.sc_atac;
sc->sc_ports[chnum].chan.ch_queue = &sc->sc_ports[chnum].queue;
- sc->sc_ports[chnum].chan.ch_ndrive = 2;
if (!sc->sc_32bit_io)
efa_select_regset(sc, chnum, 0); /* Start in PIO0. */
@@ -485,7 +485,7 @@
for (drive = 0; drive < 2; drive++) {
drvp = &chp->ch_drive[drive];
- if ((drvp->drive_flags & DRIVE) == 0)
+ if (drvp->drive_type == ATA_DRIVET_NONE)
continue; /* nothing to see here */
if (drvp->PIO_cap < mode)
diff -r f0c12330d38f -r 0126d048c4e4 sys/arch/amiga/dev/wdc_amiga.c
--- a/sys/arch/amiga/dev/wdc_amiga.c Tue Jul 31 15:47:58 2012 +0000
+++ b/sys/arch/amiga/dev/wdc_amiga.c Tue Jul 31 15:50:31 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wdc_amiga.c,v 1.35 2012/07/26 20:49:45 jakllsch Exp $ */
+/* $NetBSD: wdc_amiga.c,v 1.36 2012/07/31 15:50:31 bouyer Exp $ */
/*-
* Copyright (c) 2000, 2003 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wdc_amiga.c,v 1.35 2012/07/26 20:49:45 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc_amiga.c,v 1.36 2012/07/31 15:50:31 bouyer Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -134,10 +134,10 @@
sc->sc_chanlist[0] = &sc->sc_channel;
sc->sc_wdcdev.sc_atac.atac_channels = sc->sc_chanlist;
sc->sc_wdcdev.sc_atac.atac_nchannels = 1;
+ sc->sc_wdcdev.wdc_maxdrives = 2;
sc->sc_channel.ch_channel = 0;
sc->sc_channel.ch_atac = &sc->sc_wdcdev.sc_atac;
sc->sc_channel.ch_queue = &sc->sc_chqueue;
- sc->sc_channel.ch_ndrive = 2;
wdc_init_shadow_regs(&sc->sc_channel);
diff -r f0c12330d38f -r 0126d048c4e4 sys/arch/amiga/dev/wdc_buddha.c
--- a/sys/arch/amiga/dev/wdc_buddha.c Tue Jul 31 15:47:58 2012 +0000
+++ b/sys/arch/amiga/dev/wdc_buddha.c Tue Jul 31 15:50:31 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wdc_buddha.c,v 1.7 2012/07/26 20:49:45 jakllsch Exp $ */
+/* $NetBSD: wdc_buddha.c,v 1.8 2012/07/31 15:50:31 bouyer Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -114,6 +114,7 @@
sc->sc_wdcdev.sc_atac.atac_pio_cap = 0;
sc->sc_wdcdev.sc_atac.atac_channels = sc->wdc_chanarray;
sc->sc_wdcdev.sc_atac.atac_nchannels = nchannels;
+ sc->sc_wdcdev.wdc_maxdrives = 2;
wdc_allocate_regs(&sc->sc_wdcdev);
@@ -134,7 +135,6 @@
"can't allocate memory for command queue\n");
return;
}
- cp->ch_ndrive = 2;
/*
* XXX According to the Buddha docs, we should use a method
diff -r f0c12330d38f -r 0126d048c4e4 sys/arch/arm/gemini/obio_wdc.c
--- a/sys/arch/arm/gemini/obio_wdc.c Tue Jul 31 15:47:58 2012 +0000
+++ b/sys/arch/arm/gemini/obio_wdc.c Tue Jul 31 15:50:31 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: obio_wdc.c,v 1.5 2012/07/26 20:49:45 jakllsch Exp $ */
+/* $NetBSD: obio_wdc.c,v 1.6 2012/07/31 15:50:31 bouyer Exp $ */
/* adapted from iq31244/wdc_obio.c:
* NetBSD: wdc_obio.c,v 1.5 2008/04/28 20:23:16 martin Exp
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: obio_wdc.c,v 1.5 2012/07/26 20:49:45 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: obio_wdc.c,v 1.6 2012/07/31 15:50:31 bouyer Exp $");
#include "locators.h"
@@ -138,10 +138,10 @@
sc->wdc_chanlist[0] = &sc->ata_channel;
sc->sc_wdcdev.sc_atac.atac_channels = sc->wdc_chanlist;
sc->sc_wdcdev.sc_atac.atac_nchannels = 1;
+ sc->sc_wdcdev.wdc_maxdrives = 2;
sc->ata_channel.ch_channel = 0;
sc->ata_channel.ch_atac = &sc->sc_wdcdev.sc_atac;
sc->ata_channel.ch_queue = &sc->wdc_chqueue;
- sc->ata_channel.ch_ndrive = 2;
wdc_init_shadow_regs(&sc->ata_channel);
aprint_normal("\n");
diff -r f0c12330d38f -r 0126d048c4e4 sys/arch/atari/dev/wdc_mb.c
--- a/sys/arch/atari/dev/wdc_mb.c Tue Jul 31 15:47:58 2012 +0000
+++ b/sys/arch/atari/dev/wdc_mb.c Tue Jul 31 15:50:31 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wdc_mb.c,v 1.37 2012/07/26 20:49:45 jakllsch Exp $ */
+/* $NetBSD: wdc_mb.c,v 1.38 2012/07/31 15:50:32 bouyer Exp $ */
/*-
* Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wdc_mb.c,v 1.37 2012/07/26 20:49:45 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc_mb.c,v 1.38 2012/07/31 15:50:32 bouyer Exp $");
Home |
Main Index |
Thread Index |
Old Index