[PATCH] Fix cs firmware loading
Ryan Mallon
ryan at bluewatersys.com
Wed Oct 15 19:07:58 EDT 2008
Dan Williams wrote:
>>> BTW, I assume you guys are using 8335 hardware version b2 and later,
>>> right?
>>>
>>>
>> We are using the Wistron Neweb DRCM 81 module, which uses the Marvell
>> 8385. We have mostly been using it with the 2.6.20 kernel (we patched
>
> Sorry, I mean 8385 b2, not 8335. The hardware version is the important
> part, because previous versions had hardware bugs in the CF interface.
> Just wondering if you'd worked around those somehow, or if you were
> using up-to-date hardware versions.
I'm not actually sure what the hardware version is. I get the following
in Linux:
root at snapper:~$ pccardctl insert
pcmcia_socket pcmcia_socket0: pccard: PCMCIA card inserted into slot 0
pcmcia 0.0: pcmcia: registering new device pcmcia0.0
firmware: requesting libertas_cs_helper.fw
firmware: requesting libertas_cs.fw
libertas: 00:0b:6b:0c:b8:cb, fw 5.0.11p0, cap 0x00000393
libertas: eth1: Marvell WLAN 802.11 adapter
root at snapper:~$ pccardctl ident
Socket 0:
product info: "Marvell", "802.11 CF", "ID: 04", ""
manfid: 0x02df, 0x8103
function: 6 (network)
We aren't doing any particular work arounds. What were the hardware
problems with the compact flash 8385?
>
>> the Libertas driver into our kernel at the time). One of our
>> customers who uses the wireless on their board quite heavily has
>> noticed some problems with scanning, which we believe may be related
>> to the older code, hence I am doing some testing with the newest
>> driver. Some prelim testing shows the that driver is still working
>> fine (with my patch applied) on the hardware that I have.
>>
>> --
>>
>> Change the return value of if_cs_poll_while_fw_download to zero on
>> success, so that the firmware loading functions also correctly
>> return zero on success.
>>
>> Signed-off-by: Ryan Mallon <ryan at bluewatersys.com>
>>
>> diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c
>> index 842a08d..8f8934a 100644
>> --- a/drivers/net/wireless/libertas/if_cs.c
>> +++ b/drivers/net/wireless/libertas/if_cs.c
>> @@ -151,7 +151,7 @@ static int if_cs_poll_while_fw_download(struct if_cs_card *card, uint addr, u8 r
>> for (i = 0; i < 100000; i++) {
>> u8 val = if_cs_read8(card, addr);
>> if (val == reg)
>> - return i;
>> + return 0;
>> udelay(5);
>> }
>> return -ETIME;
>
> Looks good to me, care to post to linux-wireless or would you like me to
> do that for you?
I'm not on the linux-wireless list, so can you push it through for me.
Thanks.
~Ryan
--
Bluewater Systems Ltd - ARM Technology Solution Centre
Ryan Mallon Unit 5, Amuri Park
Phone: +64 3 3779127 404 Barbadoes St
Fax: +64 3 3779135 PO Box 13 889
Email: ryan at bluewatersys.com Christchurch, 8013
Web: http://www.bluewatersys.com New Zealand
Freecall Australia 1800 148 751 USA 1800 261 2934
More information about the libertas-dev
mailing list