2008-05-13 12:55:03

by David Woodhouse

[permalink] [raw]
Subject: libertas: fix command timeout after firmware failure

From: Brian Cavagnolo <[email protected]>

This is a fix for OLPC ticket #6586: "SCAN command fails, timer doesn't
fire". In fact, the timer was firing; the problem was that the dnld_sent
state variable was not being updated after the timer expired, so
lbs_execute_next_command was not being called.

Signed-off-by: Brian Cavagnolo <[email protected]>
Signed-off-by: Javier Cardona <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>

---
Bug fix, for 2.6.26 please.

--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -756,6 +756,7 @@ static int lbs_thread(void *data)
priv->nr_retries = 0;
} else {
priv->cur_cmd = NULL;
+ priv->dnld_sent = DNLD_RES_RECEIVED;
lbs_pr_info("requeueing command %x due to timeout (#%d)\n",
le16_to_cpu(cmdnode->cmdbuf->command), priv->nr_retries);


--
dwmw2



2008-05-13 14:04:46

by Holger Schurig

[permalink] [raw]
Subject: Re: libertas: fix command timeout after firmware failure

> Signed-off-by: Brian Cavagnolo <[email protected]>
> Signed-off-by: Javier Cardona <[email protected]>
> Signed-off-by: David Woodhouse <[email protected]>

Not sure if you need it, but:

Acked-by: Holger Schurig <[email protected]>

2008-05-14 07:00:54

by Holger Schurig

[permalink] [raw]
Subject: Re: libertas: fix command timeout after firmware failure

> Yes. I almost managed it at one point but I think I wanted to
> get set up to set on CF and SD hardware before I really did
> it.

I can test CF for you if you need that.


2008-05-13 16:23:59

by Dan Williams

[permalink] [raw]
Subject: Re: libertas: fix command timeout after firmware failure

On Tue, 2008-05-13 at 13:54 +0100, David Woodhouse wrote:
> From: Brian Cavagnolo <[email protected]>
>
> This is a fix for OLPC ticket #6586: "SCAN command fails, timer doesn't
> fire". In fact, the timer was firing; the problem was that the dnld_sent
> state variable was not being updated after the timer expired, so
> lbs_execute_next_command was not being called.
>
> Signed-off-by: Brian Cavagnolo <[email protected]>
> Signed-off-by: Javier Cardona <[email protected]>
> Signed-off-by: David Woodhouse <[email protected]>
>
> ---
> Bug fix, for 2.6.26 please.
>
> --- a/drivers/net/wireless/libertas/main.c
> +++ b/drivers/net/wireless/libertas/main.c
> @@ -756,6 +756,7 @@ static int lbs_thread(void *data)
> priv->nr_retries = 0;
> } else {
> priv->cur_cmd = NULL;
> + priv->dnld_sent = DNLD_RES_RECEIVED;
> lbs_pr_info("requeueing command %x due to timeout (#%d)\n",
> le16_to_cpu(cmdnode->cmdbuf->command), priv->nr_retries);

We really need to kill dnld_sent.

Dan



2008-05-13 16:26:02

by David Woodhouse

[permalink] [raw]
Subject: Re: libertas: fix command timeout after firmware failure

On Tue, 2008-05-13 at 12:19 -0400, Dan Williams wrote:
> On Tue, 2008-05-13 at 13:54 +0100, David Woodhouse wrote:
> > From: Brian Cavagnolo <[email protected]>
> >
> > This is a fix for OLPC ticket #6586: "SCAN command fails, timer doesn't
> > fire". In fact, the timer was firing; the problem was that the dnld_sent
> > state variable was not being updated after the timer expired, so
> > lbs_execute_next_command was not being called.
> >
> > Signed-off-by: Brian Cavagnolo <[email protected]>
> > Signed-off-by: Javier Cardona <[email protected]>
> > Signed-off-by: David Woodhouse <[email protected]>
> >
> > ---
> > Bug fix, for 2.6.26 please.
> >
> > --- a/drivers/net/wireless/libertas/main.c
> > +++ b/drivers/net/wireless/libertas/main.c
> > @@ -756,6 +756,7 @@ static int lbs_thread(void *data)
> > priv->nr_retries = 0;
> > } else {
> > priv->cur_cmd = NULL;
> > + priv->dnld_sent = DNLD_RES_RECEIVED;
> > lbs_pr_info("requeueing command %x due to timeout (#%d)\n",
> > le16_to_cpu(cmdnode->cmdbuf->command), priv->nr_retries);
>
> We really need to kill dnld_sent.

Yes. I almost managed it at one point but I think I wanted to get set up
to set on CF and SD hardware before I really did it.

--
dwmw2