Libertas GSPI seemingly losing tx

Ian Jeffray ian at jeffray.co.uk
Mon Apr 19 08:39:36 EDT 2010


On 19/04/2010 10:30, Sebastian Andrzej Siewior wrote:
> * Ian Jeffray | 2010-04-14 22:21:11 [+0100]:
>
>> I've got an 8686 connected to a Blackfin via GSPI.  Works fine
>> at 1MHz, no problems.  Increasing the bus speed any higher
>> (all the way to 30MHz tested) works fine for a while, but then
>> eventually it seems that TX stops working somehow.
>>
>> I'm not sure if this is GSPI-specific, but it's the only mode of
>> operation I'm able to test.  I'm using the 2.6.33.2 kernel.  The
>> problem "appears" to be reduced a little by adding a .cs_chg_udelay = 1
>> to the Blackfin SPI resources.  I've tested this against five
>> different wifi client devices now - all the same outcome.
>
> The SPI message has three parts:
> - send the request
> - send 0 bytes if use_dummy_writes else use a delay in the chip
> - read the result
>
> the "send 0 bytes" is important as it gives the 8686 time to prepare the
> request. Now if you use the dummy writes and you are increasing the bus
> speed then you will shorten the delay you achieve.
> You could prove this by switching to constant delays at both bus speeds
> (one MHz and 30 MHz) or just increase the number of dummy transfers.
> I have no spec here so I don't know which bus speeds the Chips is
> capable of and how long the delay has to be.

I've edited the driver to ignore avoid using the delays read back from
the device and use very large numbers instead - no improvement.

I've /never/ been able to use use_dummy_writes either... it just doesn't
seem to work at all for me.

The interesting thing for me is that even when things seem to have
died (no TCP/IP comms) I can successfully do things like iwlist - so the
SPI side of things still appears to be ok... suggesting a problem on
the actual device itself perhaps somehow.   Eventually the kernel oopses
with NETDEV WATCHDOG: wlan0 (libertas_spi): transmit queue 0 timed out

I've got an SD card on the same SPI bus - which has been throwing faults
since I added the 8686 wheras I've /never/ seen an issue before.  Have
others used the 8686 on a bus with multiple devices?

TIA,

Ian



More information about the libertas-dev mailing list