RE: [PATCH] libertas sdio: remove CMD_FUNC_INIT call
From: Bing Zhao
Date: Mon Feb 25 2013 - 18:25:46 EST
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
¢éì®&Þ~º&¶¬+-±éÝ¥w®Ë±Êâmébìdz¹Þ)í
æèw*jg¬±¨¶Ýj/êäz¹Þà2Þ¨èÚ&¢)ß«a¶Úþø®G«éh®æj:+v¨wèÙ>W±êÞiÛaxPjØm¶ÿÃ-»+ùd_