Re: SDIO single IRQ optimization breaks libertas

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

 



On 30 May 2011 16:38, Nicolas Pitre <nicolas.pitre@xxxxxxxxxx> wrote:
> On Mon, 30 May 2011, Per Forlin wrote:
>
>> Hi Daniel,
>>
>> >
>> > On 29 May 2011 15:26, Daniel Drake <dsd <at> laptop.org> wrote:
>> > > Hi,
>> > >
>> > > The following commit in 2.6.39 causes instant death for libertas_sdio
>> > > when it receives its first interrupt during initialization:
>> > >
>> > > commit 06e8935febe687e2a561707d4c7ca4245d261dbe
>> >
>> > The crash happens on this line of code in if_sdio_interrupt:
>> >
>> > cause = sdio_readb(card->func, IF_SDIO_H_INT_STATUS, &ret);
>> >
>> > card is NULL here
>> Thanks for you detailed report. It fails due to sdio_get_drvdata() returns NULL.
>>
>> I am thinking of if the timing has changed due to this "single irq" patch or if
>> the functionality is broken.
>> To answer that I have a question on the if_sdio.c in libertas.
>>
>> if_sdio.c
>>  sdio_claim_host();
>>  sdio_claim_irq()
>>  ...
>>  sdio_release_host()
>>  sdio_set_drvdata(func, card)
>
> This looks wrong to me.  the driver must be ready to receive interrupts
> the moment it registers for it, or make sure the hardware is not
> generating any.
>
>> Just a sanity question, can the interrupt occur before sdio_set_drvdata()?
>
> What might be happening here is that for some reasons the card is
> asserting the interrupt line, but none of the function bits in CCCR_INTx
> is set.
>
I think your assumption is correct. I didn't know this could happen.
I propose to let the client decide whether use make sdio_irq_single or
not, default is no. I'll make patch for it.

Thanks,
Per
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux