DragonFly bugs List (threaded) for 2010-07
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: ral(4) cardbus crash
Nicolas Thery wrote:
> 2010/6/21 Max Herrgård <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.
Yup. This patch fixes this crash.
Thank you,
Max
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]