Module Name:    src
Committed By:   jmcneill
Date:           Mon Apr 18 10:09:07 UTC 2022

Modified Files:
        src/sys/dev/isa: fdc_isa.c

Log Message:
Do not attach if the parent bus failed to provide an ISA chipset tag.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/isa/fdc_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/fdc_isa.c
diff -u src/sys/dev/isa/fdc_isa.c:1.20 src/sys/dev/isa/fdc_isa.c:1.21
--- src/sys/dev/isa/fdc_isa.c:1.20	Mon Apr 13 16:33:24 2015
+++ src/sys/dev/isa/fdc_isa.c	Mon Apr 18 10:09:07 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: fdc_isa.c,v 1.20 2015/04/13 16:33:24 riastradh Exp $	*/
+/*	$NetBSD: fdc_isa.c,v 1.21 2022/04/18 10:09:07 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdc_isa.c,v 1.20 2015/04/13 16:33:24 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdc_isa.c,v 1.21 2022/04/18 10:09:07 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -131,6 +131,10 @@ fdc_isa_probe(device_t parent, cfdata_t 
 	if (ia->ia_drq[0].ir_drq == ISA_UNKNOWN_DRQ)
 		return (0);
 
+	/* ISA chipset tag is required for DMA support. */
+	if (ia->ia_ic == NULL)
+		return (0);
+
 	/* Map the I/O space. */
 	iobase = ia->ia_io[0].ir_addr;
 	if (bus_space_map(iot, iobase, 6 /* FDC_NPORT */, 0, &base_ioh))

Reply via email to