From: Larry Finger <Larry.Finger@lwfinger.net>
To: "Patrik, Kluba" <pkluba@dension.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: bug: deadlock in rtl8192cu
Date: Tue, 12 Mar 2013 11:34:57 -0500 [thread overview]
Message-ID: <513F5931.6040509@lwfinger.net> (raw)
In-Reply-To: <20130312163020.67f9532b.pkluba@dension.com>
On 03/12/2013 10:30 AM, Patrik, Kluba wrote:
>
> Hi!
>
> After killing a wpa_supplicant which was set up to connect to an
> invalid (non-existent) SSID, it goes to 'D' state, and brings down
> every process trying to do low-level network operations (anything
> involving an rtnl_lock) to their knees. The same happens when instead
> of killing wpa_supplicant, I do 'ifconfig wlan0 down'.
>
> See the task state dump at the end. Unfortunately it's not very helpful
> as there are a plenty of static functions called, and due to this a
> couple of addresses are resolved to incorrect symbol names, which
> makes the dump confusing. BTW this is on an ARM system.
>
> The blocking usb_control_msg was actually called from
> _usbctrl_vendorreq_sync_read(). See the following fragment:
>
>
> do {
> status = usb_control_msg(udev, pipe, request, reqtype, value,
> index, pdata, len, 0); /*max. timeout*/
> if (status < 0) {
>
>
> Seems like the blocking is intentional (max timeout specified in the
> comment), but I don't know why the transfer cannot finish.
>
> The caller of _usbctrl_vendorreq_sync_read() is _DisableGPIO().
>
>
> /* 1. Disable GPIO[7:0] */
> rtl_write_word(rtlpriv, REG_GPIO_PIN_CTRL+2, 0x0000);
> value32 = rtl_read_dword(rtlpriv, REG_GPIO_PIN_CTRL) & 0xFFFF00FF;
>
>
> rtl_write_word() completes, and rtl_read_dword() is being blocked.
>
> The caller of _DisableGPIO() is _CardDisableHWSM(), which was called
> from rtl92cu_card_disable(), which was called from rtl_usb_stop().
> rtl_usb_stop was called with rtnl_lock held.
>
> This was first observed on a 3.2.34 kernel. Today I have tried
> compat-wireless-02-22 on the same kernel, with the patches from OpenWrt,
> but nothing changed. I have checked the wireless-next git tree, and
> _usbctrl_vendorreq_sync_read() is the same.
>
> I have no idea what can be the actual problem, but can do a bit of debugging and
> information gathering if you need more, just tell me what should I do.
> usb_control_msg() has not completed for at least 30 minutes now. As a quick
> workaround, is it enough to set a timeout of say, 5 seconds in
> usbctrl_vendorreq_sync_read() ? Could this cause problems at different places?
I do not think that a timeout of 5 seconds would cause any problems. Any USB I/O
that has not completed in that time should return an error status.
Please try it with
status = usb_control_msg(udev, pipe, request, reqtype, value,
index, pdata, len, USB_CTRL_SET_TIMEOUT);
That symbol is set to 5000 (milliseconds).
Let me know if that helps. I have not seen this problem on x86 or ppc
architecture. Perhaps these are fundamentally different than ARM.
Larry
next prev parent reply other threads:[~2013-03-12 16:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-12 15:30 bug: deadlock in rtl8192cu Patrik, Kluba
2013-03-12 15:33 ` Patrik, Kluba
2013-03-12 16:34 ` Larry Finger [this message]
2013-03-13 14:25 ` Patrik, Kluba
2013-03-13 15:11 ` Patrik, Kluba
2013-03-13 15:13 ` Larry Finger
2013-03-13 15:26 ` John W. Linville
2013-03-13 15:51 ` Patrik, Kluba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=513F5931.6040509@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=linux-wireless@vger.kernel.org \
--cc=pkluba@dension.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox