linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* libertas sdio broken on XO-1.5s
@ 2010-04-27 19:35 Steve deRosier
  2010-04-28  0:14 ` Dan Williams
  0 siblings, 1 reply; 4+ messages in thread
From: Steve deRosier @ 2010-04-27 19:35 UTC (permalink / raw)
  To: linux-wireless, Dan Williams

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 <dcbw@redhat.com>
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.

    Signed-off-by: Dan Williams <dcbw@redhat.com>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: libertas sdio broken on XO-1.5s
  2010-04-27 19:35 libertas sdio broken on XO-1.5s Steve deRosier
@ 2010-04-28  0:14 ` Dan Williams
  2010-04-28 19:37   ` [PATCH] libertas: fix 8686 firmware loading regression in 96021f096e5178582af296a2fbb6df7dbd6b695c Dan Williams
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Williams @ 2010-04-28  0:14 UTC (permalink / raw)
  To: Steve deRosier; +Cc: linux-wireless

On Tue, 2010-04-27 at 12:35 -0700, Steve deRosier wrote:
> 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.

> commit 96021f096e5178582af296a2fbb6df7dbd6b695c
> Author: Dan Williams <dcbw@redhat.com>
> 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.
> 
>     Signed-off-by: Dan Williams <dcbw@redhat.com>
>     Signed-off-by: John W. Linville <linville@tuxdriver.com>
> 
> 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.

The XO is all kinds of unique, but the 1.5 less so than the 1.0.

Dan

> 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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] libertas: fix 8686 firmware loading regression in 96021f096e5178582af296a2fbb6df7dbd6b695c
  2010-04-28  0:14 ` Dan Williams
@ 2010-04-28 19:37   ` Dan Williams
  2010-04-28 23:33     ` Steve deRosier
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Williams @ 2010-04-28 19:37 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Steve deRosier, Alagu Sankar

The 'ready' condition was incorrectly evaluated which sometimes lead to
failures loading the second-stage firmware on 8686 devices.

Signed-off-by: Dan Williams <dcbw@redhat.com>

---
diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c
index 13dfeda..64dd345 100644
--- a/drivers/net/wireless/libertas/if_sdio.c
+++ b/drivers/net/wireless/libertas/if_sdio.c
@@ -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;



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] libertas: fix 8686 firmware loading regression in 96021f096e5178582af296a2fbb6df7dbd6b695c
  2010-04-28 19:37   ` [PATCH] libertas: fix 8686 firmware loading regression in 96021f096e5178582af296a2fbb6df7dbd6b695c Dan Williams
@ 2010-04-28 23:33     ` Steve deRosier
  0 siblings, 0 replies; 4+ messages in thread
From: Steve deRosier @ 2010-04-28 23:33 UTC (permalink / raw)
  To: Dan Williams; +Cc: linville, linux-wireless, Alagu Sankar

Dan,

I tried your patch, it works on the XO-1.5.

Thank you.

- Steve

On Wed, Apr 28, 2010 at 12:37 PM, Dan Williams <dcbw@redhat.com> wrote:
> The 'ready' condition was incorrectly evaluated which sometimes lead to
> failures loading the second-stage firmware on 8686 devices.
>
> Signed-off-by: Dan Williams <dcbw@redhat.com>
>
> ---
> diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c
> index 13dfeda..64dd345 100644
> --- a/drivers/net/wireless/libertas/if_sdio.c
> +++ b/drivers/net/wireless/libertas/if_sdio.c
> @@ -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;
>
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-04-28 23:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-27 19:35 libertas sdio broken on XO-1.5s Steve deRosier
2010-04-28  0:14 ` Dan Williams
2010-04-28 19:37   ` [PATCH] libertas: fix 8686 firmware loading regression in 96021f096e5178582af296a2fbb6df7dbd6b695c Dan Williams
2010-04-28 23:33     ` Steve deRosier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).