Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/jdolecek-ncq]: src/sys/dev/ic adjust to interface changes - ata_queue is...
details: https://anonhg.NetBSD.org/src/rev/58c671ea5a9e
branches: jdolecek-ncq
changeset: 822901:58c671ea5a9e
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Mon Apr 24 08:29:33 2017 +0000
description:
adjust to interface changes - ata_queue is now dynamically allocated
diffstat:
sys/dev/ic/ninjaata32.c | 8 +++++---
sys/dev/ic/ninjaata32var.h | 3 +--
2 files changed, 6 insertions(+), 5 deletions(-)
diffs (53 lines):
diff -r b9f7afb0d755 -r 58c671ea5a9e sys/dev/ic/ninjaata32.c
--- a/sys/dev/ic/ninjaata32.c Sun Apr 23 14:33:28 2017 +0000
+++ b/sys/dev/ic/ninjaata32.c Mon Apr 24 08:29:33 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ninjaata32.c,v 1.18 2012/07/31 15:50:34 bouyer Exp $ */
+/* $NetBSD: ninjaata32.c,v 1.18.28.1 2017/04/24 08:29:33 jdolecek Exp $ */
/*
* Copyright (c) 2006 ITOH Yasufumi.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ninjaata32.c,v 1.18 2012/07/31 15:50:34 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ninjaata32.c,v 1.18.28.1 2017/04/24 08:29:33 jdolecek Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -191,7 +191,7 @@
sc->sc_wdc_chanarray[0] = &sc->sc_ch[0].ch_ata_channel;
sc->sc_ch[0].ch_ata_channel.ch_channel = 0;
sc->sc_ch[0].ch_ata_channel.ch_atac = &sc->sc_wdcdev.sc_atac;
- sc->sc_ch[0].ch_ata_channel.ch_queue = &sc->sc_wdc_chqueue;
+ sc->sc_ch[0].ch_ata_channel.ch_queue = ata_queue_alloc(1);
sc->sc_wdcdev.wdc_maxdrives = 2; /* max number of drives per channel */
/* map ATA registers */
@@ -264,6 +264,8 @@
bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_sgtpg,
sizeof(struct njata32_dma_page));
bus_dmamem_free(sc->sc_dmat, &sc->sc_sgt_seg, sc->sc_sgt_nsegs);
+
+ ata_queue_free(sc->sc_ch[0].ch_ata_channel.ch_queue);
}
return 0;
diff -r b9f7afb0d755 -r 58c671ea5a9e sys/dev/ic/ninjaata32var.h
--- a/sys/dev/ic/ninjaata32var.h Sun Apr 23 14:33:28 2017 +0000
+++ b/sys/dev/ic/ninjaata32var.h Mon Apr 24 08:29:33 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ninjaata32var.h,v 1.5 2011/02/21 02:32:00 itohy Exp $ */
+/* $NetBSD: ninjaata32var.h,v 1.5.44.1 2017/04/24 08:29:33 jdolecek Exp $ */
/*
* Copyright (c) 2006 ITOH Yasufumi.
@@ -69,7 +69,6 @@
} sc_ch[NJATA32_NCHAN];
struct ata_channel *sc_wdc_chanarray[NJATA32_NCHAN];
- struct ata_queue sc_wdc_chqueue;
struct wdc_regs sc_wdc_regs;
#define NJATA32_REGT(sc) (sc)->sc_wdc_regs.cmd_iot
#define NJATA32_REGH(sc) (sc)->sc_wdc_regs.cmd_baseioh
Home |
Main Index |
Thread Index |
Old Index