Thread (9 messages) 9 messages, 4 authors, 2013-02-26

RE: [PATCH] libertas sdio: remove CMD_FUNC_INIT call

From: Bing Zhao <hidden>
Date: 2013-02-25 23:25:42
Also in: linux-wireless, lkml

Hi Daniel,
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help