NetBSD-Bugs archive

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

kern/39034: if_ndis is broken in NetBSD-current with sources from 06/24/2008



>Number:         39034
>Category:       kern
>Synopsis:       if_ndis is broken in NetBSD-current with sources from 
>06/24/2008
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 25 02:30:00 +0000 2008
>Originator:     Gianni D'Aprile
>Release:        NetBSD 4.99.65 i386
>Organization:
>Environment:


System: NetBSD 4.99.65 (PINGA) #24: Tue Jun 17 22:11:59 CDT 2008
        
toor%pinga.daprile.net@localhost:/usr/obj/usr/src/sys/arch/i386/compile/PINGA



>Description:


if_ndis has bitrotted a bit on NetBSD-current with sources from 6/24/2008


>How-To-Repeat:


Try to build a kernel with:

options        COMPAT_NDIS
ndis*   at pci? dev ? function ?

You will also need a valid ndis_driver_data.h produced with ndiscvt in your 
kernel compile directory.


>Fix:


--- 2008062401_if_ndis.patch begins here ---
Index: sys/dev/if_ndis/if_ndis.c
===================================================================
RCS file: /cvsroot/src/sys/dev/if_ndis/if_ndis.c,v
retrieving revision 1.18
diff -u -r1.18 if_ndis.c
--- sys/dev/if_ndis/if_ndis.c   8 Apr 2008 06:12:21 -0000       1.18
+++ sys/dev/if_ndis/if_ndis.c   25 Jun 2008 01:57:54 -0000
@@ -332,7 +332,7 @@
                error = ndis_set_info(sc, OID_GEN_CURRENT_PACKET_FILTER,
                    &sc->ndis_filter, &len);
         if (error) {
-               aprint_error_dev(sc->ndif_dev, "set filter failed: %d\n", 
+               aprint_error_dev(sc->ndis_dev, "set filter failed: %d\n", 
                             error);
         }
                return;
@@ -693,7 +693,7 @@
        }
 
        /* Tell the user what version of the API the driver is using. */
-       aprint_normal_dev(&sc->ndis_dev, "NDIS API version: %d.%d\n",
+       aprint_normal_dev(sc->ndis_dev, "NDIS API version: %d.%d\n",
                      sc->ndis_chars->nmc_version_major,
                      sc->ndis_chars->nmc_version_minor);
 
@@ -1184,7 +1184,7 @@
 #endif
 #endif
 
-       mtx_destroy(&sc->ndis_mtx);
+       /* mtx_destroy(&sc->ndis_mtx); */
 
        return(0);
 }
@@ -2599,7 +2599,7 @@
                        error = ifmedia_ioctl(ifp, ifr, &sc->ifmedia, command);
                break;
        case SIOCSIFCAP:
-               if ((error = ether_ioctl(ifp, cmd, data)) == ENETRESET) {
+               if ((error = ether_ioctl(ifp, command, data)) == ENETRESET) {
                        ndis_set_offload(sc);
                        error = 0;
                }
Index: sys/dev/if_ndis/if_ndis_pci.c
===================================================================
RCS file: /cvsroot/src/sys/dev/if_ndis/if_ndis_pci.c,v
retrieving revision 1.10
diff -u -r1.10 if_ndis_pci.c
--- sys/dev/if_ndis/if_ndis_pci.c       8 Apr 2008 06:12:21 -0000       1.10
+++ sys/dev/if_ndis/if_ndis_pci.c       25 Jun 2008 01:57:54 -0000
@@ -653,7 +653,7 @@
        sc->ndis_rl = rl;
        sc->ndis_rescnt = rl->cprl_count;
        
-       kthread_create(ndis_attach, (void *)sc);
+       kthread_create(PRI_NONE, 0, NULL, ndis_attach, (void *)sc, NULL, 
"ndis_attach");
 }
 #endif /* __NetBSD__ */
 
--- 2008062401_if_ndis.patch ends here ---





Home | Main Index | Thread Index | Old Index