>From 2cb9c6eca9f0b05d8055d1c7ba78f89c89c34869 Mon Sep 17 00:00:00 2001 From: Joshua Roys <Joshua.Roys@xxxxxxxxxxxxxxx> Date: Thu, 3 May 2012 00:20:18 -0400 Subject: [PATCH 7/9] rtlwifi: fail rtl_usb_start if any bulk in urbs fail This would have made debugging the erroneous bulk in endpoint number easier. Signed-off-by: Joshua Roys <Joshua.Roys@xxxxxxxxxxxxxxx> --- drivers/net/wireless/rtlwifi/usb.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c index 00e90bc..c62fc7d 100644 --- a/drivers/net/wireless/rtlwifi/usb.c +++ b/drivers/net/wireless/rtlwifi/usb.c @@ -648,13 +648,17 @@ static int _rtl_usb_receive(struct ieee80211_hw *hw) usb_anchor_urb(urb, &rtlusb->rx_submitted); err = usb_submit_urb(urb, GFP_KERNEL); - if (err) + if (err) { + RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG, + "Failed to submit URB!!\n"); goto err_out; + } usb_free_urb(urb); } return 0; err_out: + RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG, "err=%i\n", err); usb_kill_anchored_urbs(&rtlusb->rx_submitted); return err; } @@ -676,7 +680,7 @@ static int rtl_usb_start(struct ieee80211_hw *hw) set_hal_start(rtlhal); /* Start bulk IN */ - _rtl_usb_receive(hw); + err = _rtl_usb_receive(hw); } return err; -- 1.7.7.6