Source-Changes archive

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

Re: CVS commit: syssrc/sys/dev/pci



>> Sun, 13 Jan 2002 21:38:26 +0200 (EET), Lennart Augustsson 
>> <augustss%netbsd.org@localhost> said:

> Module Name:  syssrc
> Committed By: augustss
> Date:         Sun Jan 13 19:38:26 UTC 2002
> 
> Modified Files:
>       syssrc/sys/dev/pci: if_wi_pci.c
> 
> Log Message:
> Add code to handle PCMCIA cards placed on a PCI card with the PLX chip.
> From OpenBSD and FreeBSD.

On wi_pci_attach(), wpp is used before wpp is initialized by wi_pci_lookup().

--
ura

Index: if_wi_pci.c
===================================================================
RCS file: /cvsroot/netbsd/syssrc/sys/dev/pci/if_wi_pci.c,v
retrieving revision 1.4
diff -u -u -r1.4 if_wi_pci.c
--- if_wi_pci.c 2002/01/13 19:40:51     1.4
+++ if_wi_pci.c 2002/01/15 02:55:42
@@ -196,6 +196,14 @@
 
        psc->psc_pa = pa;
 
+       wpp = wi_pci_lookup(pa);
+#ifdef DIAGNOSTIC
+       if (wpp == NULL) {
+               printf("\n");
+               panic("wi_pci_attach: impossible");
+       }
+#endif
+
        if (wpp->wpp_plx) {
                /* Map memory and I/O registers. */
                if (pci_mapreg_map(pa, WI_PCI_LOMEM, PCI_MAPREG_TYPE_MEM, 0,
@@ -220,14 +228,6 @@
                memh = ioh;
                sc->sc_pci = 1;
        }
-
-       wpp = wi_pci_lookup(pa);
-#ifdef DIAGNOSTIC
-       if (wpp == NULL) {
-               printf("\n");
-               panic("wi_pci_attach: impossible");
-       }
-#endif
 
        if (wpp->wpp_name != NULL) {
                printf(": %s Wireless Lan\n", wpp->wpp_name);



Home | Main Index | Thread Index | Old Index