Re: ral(4) cardbus crash
Thanks for testing it. I'll commit it this week-end.
2010/7/19 Max Herrg緳d <herrgard@gmail.com>:
> Nicolas Thery wrote:
>> 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)
>> {
>> ꀠꀠꀠ澵truct ral_pci_softc *psc = device_get_softc(dev);
>> ꀠꀠꀠ澵truct rt2560_softc *sc = &psc->u.sc_rt2560;
>> - ꀠꀠꀠstruct ifnet *ifp = sc->sc_ifp;
>> + ꀠꀠꀠstruct ifnet *ifp;
>> ꀠꀠꀠ湶nt error;
>>
>> ꀠꀠꀠ湶f (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) {
>> @@ -202,6 +202,7 @@ ral_pci_attach(device_t dev)
>> ꀠꀠꀠ汢rror = (*psc->sc_opns->attach)(dev, pci_get_device(dev));
>> ꀠꀠꀠ湶f (error != 0)
>> ꀠꀠꀠꀠꀠꀠꀠ澑eturn error;
>> + ꀠꀠꀠifp = sc->sc_ifp;
>>
>> ꀠꀠꀠꀯ*
>> ꀠꀠꀠꀠ* Hook our interrupt after all initialization is complete.
>
> Yup. This patch fixes this crash.
>
> Thank you,
> Max
>
>
>
討論串 (同標題文章)
完整討論串 (本文為第 6 之 6 篇):