libertas sdio broken on XO-1.5s
Dan,
A change made by you on April 15th breaks firmware downloading to an sdio connected 8686 on the OLPC's XO-1.5s. I reverted it and was able to get firmware to load just fine, with it in, the firmware fails to load.
commit 96021f096e5178582af296a2fbb6df7dbd6b695c
Author: Dan Williams <[email protected]> Date: Thu Apr 15 13:27:44 2010 -0700
libertas: consolidate SDIO firmware wait code
Consolidate a bunch of C&P code that waits for the firmware to be ready.
dmesg:
[ 15.391242] libertas_sdio: Libertas SDIO driver [ 15.391255] libertas_sdio: Copyright Pierre Ossman [ 15.539475] libertas_sdio mmc0:0001:1: firmware: requesting sd8686_helper.bin [ 17.540214] libertas: failed to load helper firmware [ 17.541054] libertas_sdio: probe of mmc0:0001:1 failed with error -110
dmesg with it reverted:
[ 15.141728] libertas_sdio: Libertas SDIO driver [ 15.141741] libertas_sdio: Copyright Pierre Ossman [ 15.275322] libertas_sdio mmc0:0001:1: firmware: requesting sd8686_helper.bin [ 16.430223] libertas_sdio mmc0:0001:1: firmware: requesting sd8686.bin [ 17.172443] libertas: 00:50:43:28:26:40, fw 9.70.7p0, cap 0x00000303 [ 17.179552] libertas: wlan0: Marvell WLAN 802.11 adapter
I don't know if there's something unique with this device where libertas_sdio works everywhere else and not with the XO-1.5, but I suspect we'll encounter this issue with other libertas devices.
I apologize for not sending a patch, but I don't have time right now to get to it. Perhaps you can get to it quicker, if so, I'll be happy to test anything you come up with.
- Steve
Quoted 6 lines · Steve deRosier
Dan,
A change made by you on April 15th breaks firmware downloading to an sdio connected 8686 on the OLPC's XO-1.5s. I reverted it and was able to get firmware to load just fine, with it in, the firmware fails to load.
Ok, so we get to find out what fails with XO 1.5, and what works with both the Wi2Wi and the Marvell 8686 dev board that I have that I tested it with... I'll retest again I suppose.
Quoted 26 lines
commit
96021f096e5178582af296a2fbb6df7dbd6b695cAuthor: Dan Williams <[email protected]> Date: Thu Apr 15 13:27:44 2010 -0700libertas: consolidate SDIO firmware wait code
Consolidate a bunch of C&P code that waits for the firmware to be ready.
Signed-off-by Dan Williams <[email protected]>Signed-off-by John W. Linville <[email protected]>dmesg:
[ 15.391242] libertas_sdio: Libertas SDIO driver [ 15.391255] libertas_sdio: Copyright Pierre Ossman [ 15.539475] libertas_sdio mmc0:0001:1: firmware: requesting sd8686_helper.bin [ 17.540214] libertas: failed to load helper firmware [ 17.541054] libertas_sdio: probe of mmc0:0001:1 failed with error -110dmesg with it reverted:
[ 15.141728] libertas_sdio: Libertas SDIO driver [ 15.141741] libertas_sdio: Copyright Pierre Ossman [ 15.275322] libertas_sdio mmc0:0001:1: firmware: requesting sd8686_helper.bin [ 16.430223] libertas_sdio mmc0:0001:1: firmware: requesting sd8686.bin [ 17.172443] libertas: 00:50:43:28:26:40, fw 9.70.7p0, cap 0x00000303 [ 17.179552] libertas: wlan0: Marvell WLAN 802.11 adapter
Quoted 3 lines
I don't know if there's something unique with this device where
libertas_sdioworks everywhere else and not with the XO-1.5, but I suspect we'll encounter this issue with other libertas devices.
The XO is all kinds of unique, but the 1.5 less so than the 1.0.
Dan
Quoted 9 lines
I apologize for not sending a patch, but I don't have time right now to get to it. Perhaps you can get to it quicker, if so, I'll be happy to test anything you come up with.
- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 1/1 libertas: fix 8686 firmware loading regression in 96021f096e5178582af296a2fbb6df7dbd6b695c
The 'ready' condition was incorrectly evaluated which sometimes lead to failures loading the second-stage firmware on 8686 devices.
---
drivers/net/wireless/libertas/if_sdio.c +3 -1
@@ -324,7 +324,9 @@ static int if_sdio_wait_status(struct if_sdio_card *card, const u8 condition) timeout = jiffies +HZ ;while (1 ) { status =sdio_readb (card->func,IF_SDIO_STATUS , &ret); -if (ret || (status & condition)) +if (ret) +return ret; +if ((status & condition) == condition)break ;if (time_after (jiffies, timeout))return -ETIMEDOUT ;
Re: [PATCH] libertas: fix 8686 firmware loading regression in 96021f096e5178582af296a2fbb6df7dbd6b695c
Dan,
I tried your patch, it works on the XO-1.5.
Thank you.
- Steve
Quoted 24 lines · Dan Williams
The 'ready' condition was incorrectly evaluated which sometimes lead to failures loading the second-stage firmware on 8686 devices.
Signed-off-by Dan Williams <[email protected]>---
drivers/net/wireless/libertas/if_sdio.c +3
-1@@ -324,7 +324,9 @@ static int if_sdio_wait_status(struct if_sdio_card *card, const u8 condition) timeout = jiffies + HZ; while (1) { status = sdio_readb(card->func, IF_SDIO_STATUS, &ret); - if (ret || (status & condition)) + if (ret) + return ret; + if ((status & condition) == condition) break; if (time_after(jiffies, timeout)) return -ETIMEDOUT;