Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Revert, with intention of restoring in a less invasive w...



details:   https://anonhg.NetBSD.org/src/rev/a44ce7b7f306
branches:  trunk
changeset: 780477:a44ce7b7f306
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Thu Jul 26 20:49:44 2012 +0000

description:
Revert, with intention of restoring in a less invasive way, the SATA Port
Multiplier code.

ok christos@

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            |    6 +-
 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            |   11 +-
 sys/arch/macppc/dev/wdc_obio.c         |   10 +-
 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                      |  253 +++++++--------------------
 sys/dev/ata/ata_wdc.c                  |   12 +-
 sys/dev/ata/atavar.h                   |   50 ++--
 sys/dev/ata/files.ata                  |    5 +-
 sys/dev/ata/sata_subr.c                |   55 +-----
 sys/dev/ata/satapmp_subr.c             |  278 ------------------------------
 sys/dev/ata/satapmpreg.h               |    7 +-
 sys/dev/ata/satapmpvar.h               |   35 ---
 sys/dev/ata/satavar.h                  |    3 +-
 sys/dev/ata/wd.c                       |   32 +--
 sys/dev/ic/ahcisata_core.c             |  299 +++++++-------------------------
 sys/dev/ic/ahcisatavar.h               |    3 +-
 sys/dev/ic/mvsata.c                    |   48 ++--
 sys/dev/ic/ninjaata32.c                |   12 +-
 sys/dev/ic/siisata.c                   |  152 ++++++++--------
 sys/dev/ic/wdc.c                       |  116 ++++++------
 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/ofisa/wdc_ofisa.c              |    6 +-
 sys/dev/pci/acardide.c                 |    7 +-
 sys/dev/pci/aceride.c                  |    7 +-
 sys/dev/pci/artsata.c                  |    6 +-
 sys/dev/pci/cmdide.c                   |   12 +-
 sys/dev/pci/cypide.c                   |    8 +-
 sys/dev/pci/geodeide.c                 |    7 +-
 sys/dev/pci/hptide.c                   |    9 +-
 sys/dev/pci/iteide.c                   |    7 +-
 sys/dev/pci/ixpide.c                   |    7 +-
 sys/dev/pci/jmide.c                    |    7 +-
 sys/dev/pci/nside.c                    |    7 +-
 sys/dev/pci/optiide.c                  |    7 +-
 sys/dev/pci/pciide_common.c            |   21 +-
 sys/dev/pci/pciidevar.h                |    4 +-
 sys/dev/pci/pdcide.c                   |   19 +-
 sys/dev/pci/pdcsata.c                  |   10 +-
 sys/dev/pci/piixide.c                  |   10 +-
 sys/dev/pci/rccide.c                   |    7 +-
 sys/dev/pci/rdcide.c                   |    9 +-
 sys/dev/pci/satalink.c                 |   23 +-
 sys/dev/pci/schide.c                   |    7 +-
 sys/dev/pci/siside.c                   |   10 +-
 sys/dev/pci/slide.c                    |    7 +-
 sys/dev/pci/stpcide.c                  |    7 +-
 sys/dev/pci/svwsata.c                  |    5 +-
 sys/dev/pci/toshide.c                  |    7 +-
 sys/dev/pci/viaide.c                   |   14 +-
 sys/dev/pcmcia/wdc_pcmcia.c            |    6 +-
 sys/dev/podulebus/dtide.c              |    6 +-
 sys/dev/podulebus/hcide.c              |    6 +-
 sys/dev/scsipi/atapi_wdc.c             |   14 +-
 sys/dev/usb/umass_isdata.c             |   11 +-
 76 files changed, 562 insertions(+), 1272 deletions(-)

diffs (truncated from 4957 to 300 lines):

diff -r f318b03c6822 -r a44ce7b7f306 sys/arch/acorn32/eb7500atx/rside.c
--- a/sys/arch/acorn32/eb7500atx/rside.c        Thu Jul 26 20:26:01 2012 +0000
+++ b/sys/arch/acorn32/eb7500atx/rside.c        Thu Jul 26 20:49:44 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rside.c,v 1.12 2012/07/02 18:15:44 bouyer Exp $        */
+/*     $NetBSD: rside.c,v 1.13 2012/07/26 20:49:44 jakllsch Exp $      */
 
 /*
  * Copyright (c) 2004 Christopher Gilbert
@@ -56,7 +56,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rside.c,v 1.12 2012/07/02 18:15:44 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rside.c,v 1.13 2012/07/26 20:49:44 jakllsch Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -190,7 +190,6 @@
        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;
@@ -200,6 +199,7 @@
                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 f318b03c6822 -r a44ce7b7f306 sys/arch/acorn32/mainbus/wdc_pioc.c
--- a/sys/arch/acorn32/mainbus/wdc_pioc.c       Thu Jul 26 20:26:01 2012 +0000
+++ b/sys/arch/acorn32/mainbus/wdc_pioc.c       Thu Jul 26 20:49:44 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wdc_pioc.c,v 1.26 2012/07/02 18:15:44 bouyer Exp $     */
+/*     $NetBSD: wdc_pioc.c,v 1.27 2012/07/26 20:49:44 jakllsch Exp $   */
 
 /*
  * Copyright (c) 1997-1998 Mark Brinicombe.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wdc_pioc.c,v 1.26 2012/07/02 18:15:44 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc_pioc.c,v 1.27 2012/07/26 20:49:44 jakllsch 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 f318b03c6822 -r a44ce7b7f306 sys/arch/acorn32/podulebus/icside.c
--- a/sys/arch/acorn32/podulebus/icside.c       Thu Jul 26 20:26:01 2012 +0000
+++ b/sys/arch/acorn32/podulebus/icside.c       Thu Jul 26 20:49:44 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: icside.c,v 1.30 2012/07/02 18:15:44 bouyer Exp $       */
+/*     $NetBSD: icside.c,v 1.31 2012/07/26 20:49:45 jakllsch Exp $     */
 
 /*
  * Copyright (c) 1997-1998 Mark Brinicombe
@@ -42,7 +42,7 @@
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: icside.c,v 1.30 2012/07/02 18:15:44 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: icside.c,v 1.31 2012/07/26 20:49:45 jakllsch Exp $");
 
 #include <sys/systm.h>
 #include <sys/conf.h>
@@ -259,7 +259,6 @@
        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) {
@@ -271,6 +270,7 @@
                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 f318b03c6822 -r a44ce7b7f306 sys/arch/acorn32/podulebus/rapide.c
--- a/sys/arch/acorn32/podulebus/rapide.c       Thu Jul 26 20:26:01 2012 +0000
+++ b/sys/arch/acorn32/podulebus/rapide.c       Thu Jul 26 20:49:44 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rapide.c,v 1.28 2012/07/02 18:15:44 bouyer Exp $       */
+/*     $NetBSD: rapide.c,v 1.29 2012/07/26 20:49:45 jakllsch Exp $     */
 
 /*
  * Copyright (c) 1997-1998 Mark Brinicombe
@@ -68,7 +68,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rapide.c,v 1.28 2012/07/02 18:15:44 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rapide.c,v 1.29 2012/07/26 20:49:45 jakllsch Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -250,7 +250,6 @@
        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;
@@ -260,6 +259,7 @@
                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 f318b03c6822 -r a44ce7b7f306 sys/arch/acorn32/podulebus/simide.c
--- a/sys/arch/acorn32/podulebus/simide.c       Thu Jul 26 20:26:01 2012 +0000
+++ b/sys/arch/acorn32/podulebus/simide.c       Thu Jul 26 20:49:44 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: simide.c,v 1.27 2012/07/02 18:15:44 bouyer Exp $       */
+/*     $NetBSD: simide.c,v 1.28 2012/07/26 20:49:45 jakllsch Exp $     */
 
 /*
  * Copyright (c) 1997-1998 Mark Brinicombe
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: simide.c,v 1.27 2012/07/02 18:15:44 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: simide.c,v 1.28 2012/07/26 20:49:45 jakllsch Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -249,7 +249,6 @@
        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;
@@ -259,6 +258,7 @@
                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 f318b03c6822 -r a44ce7b7f306 sys/arch/amiga/dev/efa.c
--- a/sys/arch/amiga/dev/efa.c  Thu Jul 26 20:26:01 2012 +0000
+++ b/sys/arch/amiga/dev/efa.c  Thu Jul 26 20:49:44 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: efa.c,v 1.9 2012/07/24 14:04:28 jakllsch Exp $ */
+/*     $NetBSD: efa.c,v 1.10 2012/07/26 20:49:45 jakllsch Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -159,7 +159,6 @@
        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;
@@ -207,6 +206,7 @@
        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_type == DRIVET_NONE)
+               if ((drvp->drive_flags & DRIVE) == 0)
                        continue; /* nothing to see here */
 
                if (drvp->PIO_cap < mode)
diff -r f318b03c6822 -r a44ce7b7f306 sys/arch/amiga/dev/wdc_amiga.c
--- a/sys/arch/amiga/dev/wdc_amiga.c    Thu Jul 26 20:26:01 2012 +0000
+++ b/sys/arch/amiga/dev/wdc_amiga.c    Thu Jul 26 20:49:44 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wdc_amiga.c,v 1.34 2012/07/02 18:15:44 bouyer Exp $ */
+/*     $NetBSD: wdc_amiga.c,v 1.35 2012/07/26 20:49:45 jakllsch 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.34 2012/07/02 18:15:44 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc_amiga.c,v 1.35 2012/07/26 20:49:45 jakllsch 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 f318b03c6822 -r a44ce7b7f306 sys/arch/amiga/dev/wdc_buddha.c
--- a/sys/arch/amiga/dev/wdc_buddha.c   Thu Jul 26 20:26:01 2012 +0000
+++ b/sys/arch/amiga/dev/wdc_buddha.c   Thu Jul 26 20:49:44 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wdc_buddha.c,v 1.6 2012/07/02 18:15:44 bouyer Exp $    */
+/*     $NetBSD: wdc_buddha.c,v 1.7 2012/07/26 20:49:45 jakllsch Exp $  */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -114,7 +114,6 @@
        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);
 
@@ -135,6 +134,7 @@
                            "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 f318b03c6822 -r a44ce7b7f306 sys/arch/arm/gemini/obio_wdc.c
--- a/sys/arch/arm/gemini/obio_wdc.c    Thu Jul 26 20:26:01 2012 +0000
+++ b/sys/arch/arm/gemini/obio_wdc.c    Thu Jul 26 20:49:44 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: obio_wdc.c,v 1.4 2012/07/02 18:15:44 bouyer Exp $      */
+/*     $NetBSD: obio_wdc.c,v 1.5 2012/07/26 20:49:45 jakllsch 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.4 2012/07/02 18:15:44 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: obio_wdc.c,v 1.5 2012/07/26 20:49:45 jakllsch 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 f318b03c6822 -r a44ce7b7f306 sys/arch/atari/dev/wdc_mb.c
--- a/sys/arch/atari/dev/wdc_mb.c       Thu Jul 26 20:26:01 2012 +0000
+++ b/sys/arch/atari/dev/wdc_mb.c       Thu Jul 26 20:49:44 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wdc_mb.c,v 1.36 2012/07/02 18:15:44 bouyer Exp $       */
+/*     $NetBSD: wdc_mb.c,v 1.37 2012/07/26 20:49:45 jakllsch 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.36 2012/07/02 18:15:44 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc_mb.c,v 1.37 2012/07/26 20:49:45 jakllsch Exp $");
 



Home | Main Index | Thread Index | Old Index