mwifiex: fix system hang issue in cmd timeout error case
authorBing Zhao <bzhao@marvell.com>
Thu, 15 Nov 2012 23:58:47 +0000 (15:58 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 16 Nov 2012 19:52:25 +0000 (14:52 -0500)
commitb1a47aa5e1e159e2cb06d7dfcc17ef5149b09299
tree6efdac23577820cc7ee54f73131419f37ee8c01c
parenta485e827f07bfdd0762059386e6e787bed6e81ee
mwifiex: fix system hang issue in cmd timeout error case

Reported by Tim Shepard:
I was seeing sporadic failures (wedgeups), and the majority of those
failures I saw printed the printouts in mwifiex_cmd_timeout_func with
cmd = 0xe5 which is CMD_802_11_HS_CFG_ENH.  When this happens, two
minutes later I get notified that the rtcwake thread is blocked, like
this:
      INFO: task rtcwake:3495 blocked for more than 120 seconds.

To get the hung thread unblocked we wake up the cmd wait queue and
cancel the ioctl.

Cc: "3.4+" <stable@vger.kernel.org>
Reported-by: Tim Shepard <shep@laptop.org>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwifiex/cmdevt.c