Source-Changes-HG archive

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

[src/jdolecek-ncq]: src/sys/arch use ata_queue_alloc() to dynamically allocat...



details:   https://anonhg.NetBSD.org/src/rev/f2b6f1666c68
branches:  jdolecek-ncq
changeset: 822902:f2b6f1666c68
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Mon Apr 24 08:48:45 2017 +0000

description:
use ata_queue_alloc() to dynamically allocate ata_queue for ata channel

diffstat:

 sys/arch/acorn32/eb7500atx/rside.c     |  7 +++----
 sys/arch/acorn32/podulebus/icside.c    |  7 +++----
 sys/arch/acorn32/podulebus/rapide.c    |  7 +++----
 sys/arch/acorn32/podulebus/simide.c    |  7 +++----
 sys/arch/amiga/dev/efa.c               |  4 ++--
 sys/arch/amiga/dev/efavar.h            |  3 +--
 sys/arch/amiga/dev/wdc_acafh.c         |  7 +++----
 sys/arch/amiga/dev/wdc_buddha.c        |  5 ++---
 sys/arch/amiga/dev/wdc_xsurf.c         |  5 ++---
 sys/arch/arm/allwinner/awin_wdc.c      |  3 +--
 sys/arch/atari/dev/wdc_mb.c            |  7 +++----
 sys/arch/i386/pnpbios/pciide_pnpbios.c |  7 +++----
 sys/arch/macppc/dev/kauai.c            |  7 +++----
 sys/arch/macppc/dev/wdc_obio.c         |  7 +++----
 sys/arch/mips/adm5120/dev/wdc_extio.c  |  7 +++----
 sys/arch/playstation2/dev/wdc_spd.c    |  7 +++----
 16 files changed, 41 insertions(+), 56 deletions(-)

diffs (truncated from 478 to 300 lines):

diff -r 58c671ea5a9e -r f2b6f1666c68 sys/arch/acorn32/eb7500atx/rside.c
--- a/sys/arch/acorn32/eb7500atx/rside.c        Mon Apr 24 08:29:33 2017 +0000
+++ b/sys/arch/acorn32/eb7500atx/rside.c        Mon Apr 24 08:48:45 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rside.c,v 1.14 2012/07/31 15:50:31 bouyer Exp $        */
+/*     $NetBSD: rside.c,v 1.14.28.1 2017/04/24 08:48:45 jdolecek Exp $ */
 
 /*
  * Copyright (c) 2004 Christopher Gilbert
@@ -56,7 +56,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rside.c,v 1.14 2012/07/31 15:50:31 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rside.c,v 1.14.28.1 2017/04/24 08:48:45 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -115,7 +115,6 @@
        struct bus_space        sc_tag;                 /* custom tag */
        struct rside_channel {
                struct ata_channel rc_channel;          /* generic part */
-               struct ata_queue rc_chqueue;            /* channel queue */
                irqhandler_t *rc_ih;                    /* irq handler */
        } rside_channels[2];
        struct wdc_regs sc_wdc_regs[2];
@@ -199,7 +198,7 @@
 
                cp->ch_channel = channel;
                cp->ch_atac = &sc->sc_wdcdev.sc_atac;
-               cp->ch_queue = &scp->rc_chqueue;
+               cp->ch_queue = ata_queue_alloc(1);
                wdr->cmd_iot = wdr->ctl_iot = &sc->sc_tag;
                if (bus_space_map(wdr->cmd_iot,
                    rside_info[channel].drive_registers,
diff -r 58c671ea5a9e -r f2b6f1666c68 sys/arch/acorn32/podulebus/icside.c
--- a/sys/arch/acorn32/podulebus/icside.c       Mon Apr 24 08:29:33 2017 +0000
+++ b/sys/arch/acorn32/podulebus/icside.c       Mon Apr 24 08:48:45 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: icside.c,v 1.32 2012/07/31 15:50:31 bouyer Exp $       */
+/*     $NetBSD: icside.c,v 1.32.28.1 2017/04/24 08:48:45 jdolecek Exp $        */
 
 /*
  * Copyright (c) 1997-1998 Mark Brinicombe
@@ -42,7 +42,7 @@
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: icside.c,v 1.32 2012/07/31 15:50:31 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: icside.c,v 1.32.28.1 2017/04/24 08:48:45 jdolecek Exp $");
 
 #include <sys/systm.h>
 #include <sys/conf.h>
@@ -86,7 +86,6 @@
        struct ata_channel *sc_chp[ICSIDE_MAX_CHANNELS];
        struct icside_channel {
                struct ata_channel      ic_channel;     /* generic part */
-               struct ata_queue        ic_chqueue;     /* channel queue */
                void                    *ic_ih;         /* interrupt handler */
                struct evcnt            ic_intrcnt;     /* interrupt count */
                u_int                   ic_irqaddr;     /* interrupt flag */
@@ -270,7 +269,7 @@
 
                cp->ch_channel = channel;
                cp->ch_atac = &sc->sc_wdcdev.sc_atac;
-               cp->ch_queue = &icp->ic_chqueue;
+               cp->ch_queue = ata_queue_alloc(1);
                wdr->cmd_iot = &sc->sc_tag;
                wdr->ctl_iot = &sc->sc_tag;
                if (ide->modspace)
diff -r 58c671ea5a9e -r f2b6f1666c68 sys/arch/acorn32/podulebus/rapide.c
--- a/sys/arch/acorn32/podulebus/rapide.c       Mon Apr 24 08:29:33 2017 +0000
+++ b/sys/arch/acorn32/podulebus/rapide.c       Mon Apr 24 08:48:45 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rapide.c,v 1.30 2012/07/31 15:50:31 bouyer Exp $       */
+/*     $NetBSD: rapide.c,v 1.30.28.1 2017/04/24 08:48:45 jdolecek Exp $        */
 
 /*
  * Copyright (c) 1997-1998 Mark Brinicombe
@@ -68,7 +68,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rapide.c,v 1.30 2012/07/31 15:50:31 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rapide.c,v 1.30.28.1 2017/04/24 08:48:45 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -119,7 +119,6 @@
        bus_space_handle_t      sc_ctlioh;              /* control handler */
        struct rapide_channel {
                struct ata_channel rc_channel;  /* generic part */
-               struct ata_queue rc_chqueue;            /* channel queue */
                irqhandler_t    rc_ih;                  /* interrupt handler */
                int             rc_irqmask;     /* IRQ mask for this channel */
        } rapide_channels[2];
@@ -259,7 +258,7 @@
 
                cp->ch_channel = channel;
                cp->ch_atac = &sc->sc_wdcdev.sc_atac;
-               cp->ch_queue = &rcp->rc_chqueue;
+               cp->ch_queue = ata_queue_alloc(1);
                wdr->cmd_iot = iot;
                wdr->ctl_iot = iot;
                wdr->data32iot = iot;
diff -r 58c671ea5a9e -r f2b6f1666c68 sys/arch/acorn32/podulebus/simide.c
--- a/sys/arch/acorn32/podulebus/simide.c       Mon Apr 24 08:29:33 2017 +0000
+++ b/sys/arch/acorn32/podulebus/simide.c       Mon Apr 24 08:48:45 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: simide.c,v 1.29 2012/07/31 15:50:31 bouyer Exp $       */
+/*     $NetBSD: simide.c,v 1.29.28.1 2017/04/24 08:48:45 jdolecek Exp $        */
 
 /*
  * Copyright (c) 1997-1998 Mark Brinicombe
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: simide.c,v 1.29 2012/07/31 15:50:31 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: simide.c,v 1.29.28.1 2017/04/24 08:48:45 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -89,7 +89,6 @@
        struct bus_space        sc_tag;                 /* custom tag */
        struct simide_channel {
                struct ata_channel sc_channel;  /* generic part */
-               struct ata_queue sc_chqueue;            /* channel queue */
                irqhandler_t    sc_ih;                  /* interrupt handler */
                int             sc_irqmask;     /* IRQ mask for this channel */
        } simide_channels[2];
@@ -258,7 +257,7 @@
 
                cp->ch_channel = channel;
                cp->ch_atac = &sc->sc_wdcdev.sc_atac;
-               cp->ch_queue = &scp->sc_chqueue;
+               cp->ch_queue = ata_queue_alloc(1);
                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 58c671ea5a9e -r f2b6f1666c68 sys/arch/amiga/dev/efa.c
--- a/sys/arch/amiga/dev/efa.c  Mon Apr 24 08:29:33 2017 +0000
+++ b/sys/arch/amiga/dev/efa.c  Mon Apr 24 08:48:45 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: efa.c,v 1.12 2014/01/03 00:33:06 rkujawa Exp $ */
+/*     $NetBSD: efa.c,v 1.12.18.1 2017/04/24 08:48:45 jdolecek Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -204,7 +204,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_queue = ata_queue_alloc(1);
 
        if (!sc->sc_32bit_io)
                efa_select_regset(sc, chnum, 0); /* Start in PIO0. */
diff -r 58c671ea5a9e -r f2b6f1666c68 sys/arch/amiga/dev/efavar.h
--- a/sys/arch/amiga/dev/efavar.h       Mon Apr 24 08:29:33 2017 +0000
+++ b/sys/arch/amiga/dev/efavar.h       Mon Apr 24 08:48:45 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: efavar.h,v 1.1 2011/10/27 22:12:23 rkujawa Exp $ */
+/*     $NetBSD: efavar.h,v 1.1.42.1 2017/04/24 08:48:45 jdolecek Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -38,7 +38,6 @@
 struct efa_port {
 
        struct ata_channel      chan;
-       struct ata_queue        queue;
 
        uint8_t                 mode;           /* currently set mode */
 
diff -r 58c671ea5a9e -r f2b6f1666c68 sys/arch/amiga/dev/wdc_acafh.c
--- a/sys/arch/amiga/dev/wdc_acafh.c    Mon Apr 24 08:29:33 2017 +0000
+++ b/sys/arch/amiga/dev/wdc_acafh.c    Mon Apr 24 08:48:45 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wdc_acafh.c,v 1.3 2014/01/03 00:33:06 rkujawa Exp $ */
+/*     $NetBSD: wdc_acafh.c,v 1.3.24.1 2017/04/24 08:48:45 jdolecek Exp $ */
 
 /*-
  * Copyright (c) 2000, 2003, 2013 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wdc_acafh.c,v 1.3 2014/01/03 00:33:06 rkujawa Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc_acafh.c,v 1.3.24.1 2017/04/24 08:48:45 jdolecek Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -69,7 +69,6 @@
 
 struct wdc_acafh_slot {
        struct ata_channel      channel;
-       struct ata_queue        chqueue;
        struct wdc_regs         wdr;
 };
 
@@ -152,7 +151,7 @@
        memset(&sc->sc_slots[chnum],0,sizeof(struct wdc_acafh_slot));
        sc->sc_slots[chnum].channel.ch_channel = chnum;
        sc->sc_slots[chnum].channel.ch_atac = &sc->sc_wdcdev.sc_atac;
-       sc->sc_slots[chnum].channel.ch_queue = &sc->sc_slots[chnum].chqueue;
+       sc->sc_slots[chnum].channel.ch_queue = ata_queue_alloc(1);
 
        wdc_acafh_map_channel(sc, chnum);
 
diff -r 58c671ea5a9e -r f2b6f1666c68 sys/arch/amiga/dev/wdc_buddha.c
--- a/sys/arch/amiga/dev/wdc_buddha.c   Mon Apr 24 08:29:33 2017 +0000
+++ b/sys/arch/amiga/dev/wdc_buddha.c   Mon Apr 24 08:48:45 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wdc_buddha.c,v 1.8 2012/07/31 15:50:31 bouyer Exp $    */
+/*     $NetBSD: wdc_buddha.c,v 1.8.28.1 2017/04/24 08:48:45 jdolecek Exp $     */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -128,8 +128,7 @@
 
                cp->ch_channel = ch;
                cp->ch_atac = &sc->sc_wdcdev.sc_atac;
-               cp->ch_queue =
-                   malloc(sizeof(struct ata_queue), M_DEVBUF, M_NOWAIT);
+               cp->ch_queue = ata_queue_alloc(1);
                if (cp->ch_queue == NULL) {
                        aprint_error_dev(self,
                            "can't allocate memory for command queue\n");
diff -r 58c671ea5a9e -r f2b6f1666c68 sys/arch/amiga/dev/wdc_xsurf.c
--- a/sys/arch/amiga/dev/wdc_xsurf.c    Mon Apr 24 08:29:33 2017 +0000
+++ b/sys/arch/amiga/dev/wdc_xsurf.c    Mon Apr 24 08:48:45 2017 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: wdc_xsurf.c,v 1.2 2012/11/21 22:37:03 rkujawa Exp $ */
+/*      $NetBSD: wdc_xsurf.c,v 1.2.30.1 2017/04/24 08:48:45 jdolecek Exp $ */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -68,7 +68,6 @@
 
 struct wdc_xsurf_port {
        struct ata_channel      channel;
-       struct ata_queue        queue;
        struct wdc_regs         wdr;
 };
 
@@ -162,7 +161,7 @@
        memset(&sc->sc_ports[chnum],0,sizeof(struct wdc_xsurf_port));
        sc->sc_ports[chnum].channel.ch_channel = chnum;
        sc->sc_ports[chnum].channel.ch_atac = &sc->sc_wdcdev.sc_atac;
-       sc->sc_ports[chnum].channel.ch_queue = &sc->sc_ports[chnum].queue;
+       sc->sc_ports[chnum].channel.ch_queue = ata_queue_alloc(1);
 
        wdc_xsurf_map_channel(sc, chnum);       
 
diff -r 58c671ea5a9e -r f2b6f1666c68 sys/arch/arm/allwinner/awin_wdc.c
--- a/sys/arch/arm/allwinner/awin_wdc.c Mon Apr 24 08:29:33 2017 +0000
+++ b/sys/arch/arm/allwinner/awin_wdc.c Mon Apr 24 08:48:45 2017 +0000
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: awin_wdc.c,v 1.2 2014/02/20 21:48:38 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: awin_wdc.c,v 1.2.26.1 2017/04/24 08:48:45 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -52,7 +52,6 @@
        struct wdc_softc asc_sc;
         struct ata_channel *asc_chanlist[1];
         struct ata_channel asc_channel;
-        struct ata_queue asc_chqueue;
         struct wdc_regs asc_wdc_regs;
         void    *asc_ih;
 
diff -r 58c671ea5a9e -r f2b6f1666c68 sys/arch/atari/dev/wdc_mb.c
--- a/sys/arch/atari/dev/wdc_mb.c       Mon Apr 24 08:29:33 2017 +0000
+++ b/sys/arch/atari/dev/wdc_mb.c       Mon Apr 24 08:48:45 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wdc_mb.c,v 1.38 2012/07/31 15:50:32 bouyer Exp $       */
+/*     $NetBSD: wdc_mb.c,v 1.38.28.1 2017/04/24 08:48:45 jdolecek 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.38 2012/07/31 15:50:32 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc_mb.c,v 1.38.28.1 2017/04/24 08:48:45 jdolecek Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -72,7 +72,6 @@
        struct wdc_softc sc_wdcdev;
        struct ata_channel *sc_chanlist[1];
        struct ata_channel sc_channel;
-       struct ata_queue sc_chqueue;
        struct wdc_regs sc_wdc_regs;
        void *sc_ih;



Home | Main Index | Thread Index | Old Index