Module Name:    src
Committed By:   jdolecek
Date:           Wed Sep 20 19:44:39 UTC 2017

Modified Files:
        src/sys/dev/isa [jdolecek-ncq]: wdc_isa.c

Log Message:
initialize properly ata_channel during probe


To generate a diff of this commit:
cvs rdiff -u -r1.59.28.1 -r1.59.28.2 src/sys/dev/isa/wdc_isa.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/isa/wdc_isa.c
diff -u src/sys/dev/isa/wdc_isa.c:1.59.28.1 src/sys/dev/isa/wdc_isa.c:1.59.28.2
--- src/sys/dev/isa/wdc_isa.c:1.59.28.1	Wed Jun 21 19:21:25 2017
+++ src/sys/dev/isa/wdc_isa.c	Wed Sep 20 19:44:38 2017
@@ -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 @@ wdc_isa_probe(device_t parent, cfdata_t 
 
 	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 @@ wdc_isa_probe(device_t parent, cfdata_t 
 	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);
 }

Reply via email to