Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/isa Do not attach if the parent bus failed to provid...



details:   https://anonhg.NetBSD.org/src/rev/e87a4880c6d5
branches:  trunk
changeset: 365690:e87a4880c6d5
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Mon Apr 18 10:09:07 2022 +0000

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

diffstat:

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

diffs (29 lines):

diff -r d463c3f564b0 -r e87a4880c6d5 sys/dev/isa/fdc_isa.c
--- a/sys/dev/isa/fdc_isa.c     Mon Apr 18 06:02:27 2022 +0000
+++ b/sys/dev/isa/fdc_isa.c     Mon Apr 18 10:09:07 2022 +0000
@@ -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 @@
        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))



Home | Main Index | Thread Index | Old Index