Search Linux Wireless

RE: [PATCH 2/2] mwifiex: don't clear cmd_sent flag in timeout handler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi John,

> Hi Bing,
> 
> Assuming the timeout happened due to a firmware bug. Does the firmware
> able to recover after setting adapter->cmd_sent = false and the
> firmware could accept a new commands without locking?.

That "adapter->cmd_sent = false" was hoping the firmware is still alive and can respond to a new command. The reality is that the timeout usually indicates the firmware has already hung. Sending another command won't recover it in this case.

> Seems, this is the bug I was encountering and couldn't access the
> mlan0 interface anymore...

This patch itself doesn't solve any existing issue. It helps keep the scene of the initial timeout for investigation.

> 
> Is there a way to force the firmware to reset it without rebooting it?.

I guess you are using SDIO chip. If your host controller supports MMC_POWER_OFF/UP, you can reset the chip with this approach:

        mmc_remove_host(host);
        /* some delay */
        mmc_add_host(host);

Regards,
Bing

> 
> Regards,
> 
> john
> 
> 
> On Wed, Apr 16, 2014 at 10:01 PM, Bing Zhao <bzhao@xxxxxxxxxxx> wrote:
> > From: Amitkumar Karwar <akarwar@xxxxxxxxxxx>
> >
> > When command timeout occurs due to a firmware/hardware bug,
> > there is no chance of next command being successful. We will
> > keep cmd_sent flag on so that next command won't be sent to
> > firmware.
> >
> > Signed-off-by: Amitkumar Karwar <akarwar@xxxxxxxxxxx>
> > Signed-off-by: Bing Zhao <bzhao@xxxxxxxxxxx>
> > ---
> >  drivers/net/wireless/mwifiex/cmdevt.c | 2 --
> >  1 file changed, 2 deletions(-)
> >
> > diff --git a/drivers/net/wireless/mwifiex/cmdevt.c b/drivers/net/wireless/mwifiex/cmdevt.c
> > index 1062c91..8dee6c8 100644
> > --- a/drivers/net/wireless/mwifiex/cmdevt.c
> > +++ b/drivers/net/wireless/mwifiex/cmdevt.c
> > @@ -955,8 +955,6 @@ mwifiex_cmd_timeout_func(unsigned long function_context)
> >                         adapter->cmd_wait_q.status = -ETIMEDOUT;
> >                         wake_up_interruptible(&adapter->cmd_wait_q.wait);
> >                         mwifiex_cancel_pending_ioctl(adapter);
> > -                       /* reset cmd_sent flag to unblock new commands */
> > -                       adapter->cmd_sent = false;
> >                 }
> >         }
> >         if (adapter->hw_status == MWIFIEX_HW_STATUS_INITIALIZING)
> > --
> > 1.8.2.3
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> > the body of a message to majordomo@xxxxxxxxxxxxxxx
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
��.n��������+%������w��{.n�����{���zW����ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux