[PATCH] libertas sdio: remove CMD_FUNC_INIT call

Bing Zhao bzhao at marvell.com
Mon Feb 25 18:21:23 EST 2013


Hi Daniel,

> > There seems to be a race condition in lbs_thread().
> >
> > At line 582:
> >  582                 if (!priv->fw_ready)
> >  583                         continue;
> >
> > The fw_ready is 0, so you never get the chance to execute the FUNC_INIT command.
> >
> >  617                 /* Execute the next command */
> >  618                 if (!priv->dnld_sent && !priv->cur_cmd)
> >  619                         lbs_execute_next_command(priv);
> >
> >
> > Could you try the following change?
> >
> > diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libe
> > index 739309e..8f5d977 100644
> > --- a/drivers/net/wireless/libertas/if_sdio.c
> > +++ b/drivers/net/wireless/libertas/if_sdio.c
> > @@ -825,6 +825,8 @@ static void if_sdio_finish_power_on(struct if_sdio_card *car
> >
> >         sdio_release_host(func);
> >
> > +       priv->fw_ready = 1;
> > +
> >         /*
> >          * FUNC_INIT is required for SD8688 WLAN/BT multiple functions
> >          */
> > @@ -839,7 +841,6 @@ static void if_sdio_finish_power_on(struct if_sdio_card *car
> >                         netdev_alert(priv->dev, "CMD_FUNC_INIT cmd failed\n");
> >         }
> >
> > -       priv->fw_ready = 1;
> >         wake_up(&card->pwron_waitq);
> >
> >         if (!card->started) {
> 
> Thank you.
> Everything seem to work fine for me with the patch applied.

Do you have any concern for OLPC platforms with above change? If it doesn't seem to break OLPC I will send a patch to the list.

Thanks,
Bing



More information about the libertas-dev mailing list