Re: ral(4) cardbus crash

看板DFBSD_bugs作者時間15年前 (2010/07/11 18:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/6 (看更多)
2010/6/21 Max Herrg緳d <herrgard@gmail.com>: > Hi, > > I get this crash when plugging in my ral(4) cardbus card. [...] > #14 0xc0296ccb in ral_pci_attach (dev=0xc14d3a58) at /usr/src/sys/dev/netif/ral/if_ral_pci.c:209 It looks like sc_ifp is initialized after ifp = sc->sc_ifp. Could you try this patch please? diff --git a/sys/dev/netif/ral/if_ral_pci.c b/sys/dev/netif/ral/if_ral_pci.c index 4af51b1..c94fad7 100644 --- a/sys/dev/netif/ral/if_ral_pci.c +++ b/sys/dev/netif/ral/if_ral_pci.c @@ -164,7 +164,7 @@ ral_pci_attach(device_t dev) { struct ral_pci_softc *psc = device_get_softc(dev); struct rt2560_softc *sc = &psc->u.sc_rt2560; - struct ifnet *ifp = sc->sc_ifp; + struct ifnet *ifp; int error; if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) { @@ -202,6 +202,7 @@ ral_pci_attach(device_t dev) error = (*psc->sc_opns->attach)(dev, pci_get_device(dev)); if (error != 0) return error; + ifp = sc->sc_ifp; /* * Hook our interrupt after all initialization is complete.
文章代碼(AID): #1CEPPYUt (DFBSD_bugs)
文章代碼(AID): #1CEPPYUt (DFBSD_bugs)