libertas_sdio on at91sam9263

Marc Pignat marc.pignat at hevs.ch
Tue Dec 18 10:17:35 EST 2007


On Tuesday 18 December 2007, Dan Williams wrote:
> On Tue, 2007-12-18 at 14:27 +0100, Marc Pignat wrote:
...

> Pierre would have to weigh in here, but we decided to keep the stack
> free from this workaround.  This is a problem with SDIO controllers, and
> network drivers shouldn't have to carry hacks to work around broken SDIO
> controllers, because that's just really the wrong place for this sort of
> thing.  There are some nice layering violations necessary to fix this,
> and Pierre opted for keeping the stack hack-free but adding a note in
> if_sdio.c:
OK, Pierre is right, we should keep it clean.

> 
>  * As SDIO is still new to the kernel, it is unfortunately common with
>  * bugs in the host controllers related to that. One such bug is that
>  * controllers cannot do transfers that aren't a multiple of 4 bytes.
>  * If you don't have time to fix the host controller driver, you can
>  * work around the problem by modifying if_sdio_host_to_card() and
>  * if_sdio_card_to_host() to pad the data.
> 
> So for now, if your controller sucks, you get to work around the bug in
> your sources as we'd like to keep the upstream kernel bits free from
> hacks until a reasonable workaround can be figured out (which probably
> means fixing the host controller driver).
Okay, the problem is a sofware problem for the at91sam9263. For the
at91rm9200, this is really a hardware problem...

> 
> This bug is more common than you might expect; the OLPC CAFE SDIO
> controller also has this problem.  The spec should probably be clearer
> since so many chip vendors seem to screw this up.

I will keep this problem in my idle task.

For now, I think we could add a flag (somewhere in the sdio_driver struct) to
remember these chips (8385 and 8686) work with packet size rounded up.

Regards

Marc



More information about the libertas-dev mailing list