Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev adapt several more wdc attachments for NCQ branch merge
details: https://anonhg.NetBSD.org/src/rev/6033a86675e2
branches: trunk
changeset: 356669:6033a86675e2
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Sat Oct 07 19:52:11 2017 +0000
description:
adapt several more wdc attachments for NCQ branch merge
diffstat:
sys/dev/ic/wdc_upc.c | 9 ++++-----
sys/dev/ofisa/wdc_ofisa.c | 8 +++-----
sys/dev/podulebus/dtide.c | 9 ++++-----
sys/dev/podulebus/hcide.c | 9 ++++-----
4 files changed, 15 insertions(+), 20 deletions(-)
diffs (166 lines):
diff -r cc190bc62d2e -r 6033a86675e2 sys/dev/ic/wdc_upc.c
--- a/sys/dev/ic/wdc_upc.c Sat Oct 07 19:44:22 2017 +0000
+++ b/sys/dev/ic/wdc_upc.c Sat Oct 07 19:52:11 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wdc_upc.c,v 1.29 2012/07/31 15:50:35 bouyer Exp $ */
+/* $NetBSD: wdc_upc.c,v 1.30 2017/10/07 19:52:11 jdolecek Exp $ */
/*-
* Copyright (c) 2000 Ben Harris
* All rights reserved.
@@ -28,7 +28,7 @@
/* This file is part of NetBSD/arm26 -- a port of NetBSD to ARM2/3 machines. */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wdc_upc.c,v 1.29 2012/07/31 15:50:35 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc_upc.c,v 1.30 2017/10/07 19:52:11 jdolecek Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -51,7 +51,6 @@
struct wdc_softc sc_wdc;
struct ata_channel *sc_chanlist[1];
struct ata_channel sc_channel;
- struct ata_queue sc_chqueue;
struct wdc_regs sc_wdc_regs;
};
@@ -88,7 +87,7 @@
wdr->ctl_ioh = ua->ua_ioh2;
sc->sc_channel.ch_channel = 0;
sc->sc_channel.ch_atac = &sc->sc_wdc.sc_atac;
- sc->sc_channel.ch_queue = &sc->sc_chqueue;
+ sc->sc_channel.ch_queue = ata_queue_alloc(1);
sc->sc_wdc.wdc_maxdrives = 2;
for (i = 0; i < WDC_NREG; i++) {
if (bus_space_subregion(ua->ua_iot, ua->ua_ioh, i,
@@ -98,7 +97,7 @@
return;
}
}
- wdc_init_shadow_regs(&sc->sc_channel);
+ wdc_init_shadow_regs(wdr);
upc_intr_establish(ua->ua_irqhandle, IPL_BIO, wdcintr,
&sc->sc_channel);
diff -r cc190bc62d2e -r 6033a86675e2 sys/dev/ofisa/wdc_ofisa.c
--- a/sys/dev/ofisa/wdc_ofisa.c Sat Oct 07 19:44:22 2017 +0000
+++ b/sys/dev/ofisa/wdc_ofisa.c Sat Oct 07 19:52:11 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wdc_ofisa.c,v 1.33 2012/07/31 15:50:35 bouyer Exp $ */
+/* $NetBSD: wdc_ofisa.c,v 1.34 2017/10/07 19:52:11 jdolecek Exp $ */
/*
* Copyright 1997, 1998
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wdc_ofisa.c,v 1.33 2012/07/31 15:50:35 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc_ofisa.c,v 1.34 2017/10/07 19:52:11 jdolecek Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -61,7 +61,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 wdc_regs;
void *sc_ih;
};
@@ -161,8 +160,7 @@
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_queue = ata_queue_alloc(1);
wdc_init_shadow_regs(&sc->sc_channel);
wdcattach(&sc->sc_channel);
diff -r cc190bc62d2e -r 6033a86675e2 sys/dev/podulebus/dtide.c
--- a/sys/dev/podulebus/dtide.c Sat Oct 07 19:44:22 2017 +0000
+++ b/sys/dev/podulebus/dtide.c Sat Oct 07 19:52:11 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dtide.c,v 1.28 2012/07/31 15:50:37 bouyer Exp $ */
+/* $NetBSD: dtide.c,v 1.29 2017/10/07 19:52:11 jdolecek Exp $ */
/*-
* Copyright (c) 2000, 2001 Ben Harris
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dtide.c,v 1.28 2012/07/31 15:50:37 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dtide.c,v 1.29 2017/10/07 19:52:11 jdolecek Exp $");
#include <sys/param.h>
@@ -53,7 +53,6 @@
struct wdc_softc sc_wdc;
struct ata_channel *sc_chp[DTIDE_NCHANNELS];/* pointers to sc_chan */
struct ata_channel sc_chan[DTIDE_NCHANNELS];
- struct ata_queue sc_chq[DTIDE_NCHANNELS];
struct wdc_regs sc_wdc_regs[DTIDE_NCHANNELS];
bus_space_tag_t sc_magict;
bus_space_handle_t sc_magich;
@@ -106,14 +105,14 @@
ch->ch_atac = &sc->sc_wdc.sc_atac;
wdr->cmd_iot = bst;
wdr->ctl_iot = bst;
- ch->ch_queue = &sc->sc_chq[i];
+ ch->ch_queue = ata_queue_alloc(1);
bus_space_map(pa->pa_fast_t,
pa->pa_fast_base + dtide_cmdoffsets[i], 0, 8,
&wdr->cmd_baseioh);
for (j = 0; j < WDC_NREG; j++)
bus_space_subregion(wdr->cmd_iot, wdr->cmd_baseioh,
j, j == 0 ? 4 : 1, &wdr->cmd_iohs[j]);
- wdc_init_shadow_regs(ch);
+ wdc_init_shadow_regs(wdr);
bus_space_map(pa->pa_fast_t,
pa->pa_fast_base + dtide_ctloffsets[i], 0, 8,
&wdr->ctl_ioh);
diff -r cc190bc62d2e -r 6033a86675e2 sys/dev/podulebus/hcide.c
--- a/sys/dev/podulebus/hcide.c Sat Oct 07 19:44:22 2017 +0000
+++ b/sys/dev/podulebus/hcide.c Sat Oct 07 19:52:11 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hcide.c,v 1.25 2012/07/31 15:50:37 bouyer Exp $ */
+/* $NetBSD: hcide.c,v 1.26 2017/10/07 19:52:11 jdolecek Exp $ */
/*-
* Copyright (c) 2000, 2001 Ben Harris
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hcide.c,v 1.25 2012/07/31 15:50:37 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hcide.c,v 1.26 2017/10/07 19:52:11 jdolecek Exp $");
#include <sys/param.h>
@@ -52,7 +52,6 @@
struct wdc_softc sc_wdc;
struct ata_channel *sc_chp[HCIDE_NCHANNELS];/* pointers to sc_chan */
struct ata_channel sc_chan[HCIDE_NCHANNELS];
- struct ata_queue sc_chq[HCIDE_NCHANNELS];
struct wdc_regs sc_wdc_regs[HCIDE_NCHANNELS];
};
@@ -101,14 +100,14 @@
ch->ch_atac = &sc->sc_wdc.sc_atac;
wdr->cmd_iot = pa->pa_mod_t;
wdr->ctl_iot = pa->pa_mod_t;
- ch->ch_queue = &sc->sc_chq[i];
+ ch->ch_queue = ata_queue_alloc(1);
bus_space_map(pa->pa_fast_t,
pa->pa_fast_base + hcide_cmdoffsets[i], 0, 8,
&wdr->cmd_baseioh);
for (j = 0; j < WDC_NREG; j++)
bus_space_subregion(wdr->cmd_iot, wdr->cmd_baseioh,
j, j == 0 ? 4 : 1, &wdr->cmd_iohs[j]);
- wdc_init_shadow_regs(ch);
+ wdc_init_shadow_regs(wdr);
bus_space_map(pa->pa_fast_t,
pa->pa_fast_base + hcide_ctloffsets[i], 0, 8,
&wdr->ctl_ioh);
Home |
Main Index |
Thread Index |
Old Index