Source-Changes-HG archive

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

[src/jdolecek-ncq]: src/sys/dev/isa initialize properly ata_channel during probe



details:   https://anonhg.NetBSD.org/src/rev/5ca7a1da1749
branches:  jdolecek-ncq
changeset: 823023:5ca7a1da1749
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Wed Sep 20 19:44:38 2017 +0000

description:
initialize properly ata_channel during probe

diffstat:

 sys/dev/isa/wdc_isa.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (37 lines):

diff -r fb44b4244685 -r 5ca7a1da1749 sys/dev/isa/wdc_isa.c
--- a/sys/dev/isa/wdc_isa.c     Wed Sep 20 19:39:36 2017 +0000
+++ b/sys/dev/isa/wdc_isa.c     Wed Sep 20 19:44:38 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wdc_isa.c,v 1.59.28.1 2017/06/21 19:21:25 jdolecek Exp $ */
+/*     $NetBSD: wdc_isa.c,v 1.59.28.2 2017/09/20 19:44:38 jdolecek Exp $ */
 
 /*-
  * Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wdc_isa.c,v 1.59.28.1 2017/06/21 19:21:25 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc_isa.c,v 1.59.28.2 2017/09/20 19:44:38 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -107,7 +107,9 @@
 
        memset(&wdc, 0, sizeof(wdc));
        memset(&ch, 0, sizeof(ch));
+       ata_channel_init(&ch);
        ch.ch_atac = &wdc.sc_atac;
+       ch.ch_queue = ata_queue_alloc(1);
        wdc.regs = &wdr;
 
        wdr.cmd_iot = ia->ia_iot;
@@ -141,6 +143,8 @@
        bus_space_unmap(wdr.ctl_iot, wdr.ctl_ioh, WDC_ISA_AUXREG_NPORTS);
 outunmap:
        bus_space_unmap(wdr.cmd_iot, wdr.cmd_baseioh, WDC_ISA_REG_NPORTS);
+       ata_queue_free(ch.ch_queue);
+       ata_channel_destroy(&ch);
 out:
        return (result);
 }



Home | Main Index | Thread Index | Old Index