NetBSD-Bugs archive

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

kern/48236: iavc driver crashes during initialisation



>Number:         48236
>Category:       kern
>Synopsis:       iavc driver crashes during initialisation
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 24 07:55:01 +0000 2013
>Originator:     Dr. Wolfgang Stukenbrock
>Release:        NetBSD 6.1
>Organization:
Dr. Nagler & Company GmbH
>Environment:
        
        
System: NetBSD test-s0 5.1.2 NetBSD 5.1.2 (NSW-WS) #3: Fri Dec 21 15:15:43 CET 
2012 wgstuken@test-s0:/usr/src/sys/arch/amd64/compile/NSW-WS amd64
Architecture: x86_64
Machine: amd64
>Description:
        During pci-attach of the driver the mem-registers are accessed prior 
mapping them.
        This results in a NULL-pointer access and a kernel crash.
        I'm not shure why this has worked before (in 4.x and 5.x) - but now it 
no longer does.

        PS. The autoconf routine complains the following:
"iavc has not been converted to device_t"
        Perhaps this should be changed/fixed too ...
>How-To-Repeat:
        Configure iavc driver and try to to boot the kernel - it will crash ...
>Fix:
        The following patch for /usr/src/sys/dev/pci/iavc_pci.c will s lve this 
issue:
--- iavc_pci.c  2013/09/24 07:50:41     1.1
+++ iavc_pci.c  2013/09/24 07:51:08
@@ -138,8 +138,6 @@
        sc->sc_dma = 0;
        sc->dmat = pa->pa_dmat;
 
-       iavc_b1dma_reset(sc);
-
        if (pci_mapreg_map(pa, IAVC_PCI_IOBA, PCI_MAPREG_TYPE_IO, 0,
                &sc->sc_io_bt, &sc->sc_io_bh, &psc->io_base, &psc->io_size)) {
                aprint_error(": unable to map i/o registers\n");
@@ -153,6 +151,8 @@
        }
        aprint_normal(": %s\n", pp->name);
 
+       iavc_b1dma_reset(sc);
+
        if (pp->npp_product == PCI_PRODUCT_AVM_T1) {
                aprint_error_dev(&sc->sc_dev, "sorry, PRI not yet supported\n");
                return;

>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index