Libertas with if_spi on pxa270

Andrey Yurovsky andrey at cozybit.com
Wed Jan 28 10:45:50 EST 2009


On Wed, Jan 28, 2009 at 1:54 AM, Mike Rapoport <mike at compulab.co.il> wrote:
> Uli Luckas wrote:
>>>> Does that mean, you got it working on PXA? Mine won't work.
>>>> On pxa270, kernel 2.6.27.3 + "gspi patch" + "16bit/word spi mode" I get
>>>> the following log:
>>>>
>
> [ snip ]
>
>>>>
>>>> Any idea what could be going wrong here?
>>> From what I can tell, libertas initialization is successful. The failed
>>> commands are not supported by G-SPI firmware.
>> I am using the firmware from the linux-firmware git tree. If this firmware
>> does not support some of the commands, then everyone should see these
>> messages.
>>
>> What about the "Received CMD_RESP with invalid sequence n (expected n+1)"
>> messages? Is anyone else seeing those? Are they part of my problem? Or do
>> they hint at a seperate problem, maybe triggered by the 'real' problem?
>
> I'm using 2.6.29-rc2 + "git diff-tree v2.6.29-rc2 wireless-testing/master --
> drivers/net/wireless/libertas" + "16bit/word spi mode" and
>
> With 9.70.3p37 firmware from Marvell. I get:
>
> # modprobe  libertas_spi
> lib80211: common routines for IEEE802.11 drivers
> libertas_spi: Libertas SPI driver
> libertas_spi spi2.0: firmware: requesting libertas/gspi8686_hlp.bin
> libertas_spi spi2.0: firmware: requesting libertas/gspi8686.bin
> libertas: 00:19:88:05:b1:59, fw 9.70.3p37, cap 0x00000303
> eth1 (libertas_spi): not using net_device_ops yet
> libertas: PREP_CMD: command 0x00a3 failed: 2
> libertas: PREP_CMD: command 0x00a3 failed: 2
> libertas: eth1: Marvell WLAN 802.11 adapter

Command 0x00A3 is a mesh setup command.  At this time, we don't have a
good way to tell if a chip/firmware supports mesh or not, so libertas
core tries these commands anyway and they fail.  Please ignore them
for now, though I suggest that we perhaps work around this in the same
way that power save support is currently indicated by the interface
driver (that is, if_spi.c could tell libertas that no GSPI devices
support mesh, because they don't).

> With gspi8686_v9.bin and gspi8686_v9_helper.bin from linux-firmware I get
>
> # modprobe libertas_spi
> lib80211: common routines for IEEE802.11 drivers
> libertas_spi: Libertas SPI driver
> libertas_spi spi2.0: firmware: requesting libertas/gspi8686_hlp.bin
> libertas_spi spi2.0: firmware: requesting libertas/gspi8686.bin
> libertas: spu_wait_for_u16: timeout with val=00, target_mask=00, target=00
> libertas: if_spi_prog_main_firmware: timed out waiting for initial scratch reg = 0
> libertas: failed to load firmware (err=-110)
> libertas_spi: probe of spi2.0 failed with error -110

Very strange.  I tried both Marvell's 'p37 firmware and the firmware
from the linux-firmware tree and had identical results on the Blackfin
boards.  Are you sure that the only thing that you changed is the
firmware image set?  That is, both the helper and main firmware files
(but named as libertas_spi expects them, shown above)?  I'm not aware
of any serious differences in the two firmware versions.

>>> Can you actually use eth0 after the libertas_spi is loaded?
>>>
>> 'ifconfig eth0 up' works, 'iwlist eth0 scan' does not work. I get many more
>> messages like the ones quoted above and after quite a while the scan fails.
>> I've not tried to assoicate to an AP yet.



More information about the libertas-dev mailing list