stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Julius Werner <jwerner@chromium.org>,
	Alan Stern <stern@rowland.harvard.edu>
Subject: [PATCH 3.4 11/31] usb: hub: Use correct reset for wedged USB3 devices that are NOTATTACHED
Date: Wed, 18 Dec 2013 13:08:19 -0800	[thread overview]
Message-ID: <20131218210523.114599656@linuxfoundation.org> (raw)
In-Reply-To: <20131218210522.790152625@linuxfoundation.org>

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Julius Werner <jwerner@chromium.org>

commit 2d51f3cd11f414c56a87dc018196b85fd50b04a4 upstream.

This patch adds a check for USB_STATE_NOTATTACHED to the
hub_port_warm_reset_required() workaround for ports that end up in
Compliance Mode in hub_events() when trying to decide which reset
function to use. Trying to call usb_reset_device() with a NOTATTACHED
device will just fail and leave the port broken.

Signed-off-by: Julius Werner <jwerner@chromium.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/core/hub.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -3891,8 +3891,9 @@ static void hub_events(void)
 					hub->hdev->children[i - 1];
 
 				dev_dbg(hub_dev, "warm reset port %d\n", i);
-				if (!udev || !(portstatus &
-						USB_PORT_STAT_CONNECTION)) {
+				if (!udev ||
+				    !(portstatus & USB_PORT_STAT_CONNECTION) ||
+				    udev->state == USB_STATE_NOTATTACHED) {
 					status = hub_port_reset(hub, i,
 							NULL, HUB_BH_RESET_TIME,
 							true);



  parent reply	other threads:[~2013-12-18 21:08 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-18 21:08 [PATCH 3.4 00/31] 3.4.75-stable review Greg Kroah-Hartman
2013-12-18 21:08 ` [PATCH 3.4 01/31] MIPS: DMA: For BMIPS5000 cores flush region just like non-coherent R10000 Greg Kroah-Hartman
2013-12-18 21:08 ` [PATCH 3.4 02/31] ALSA: memalloc.h - fix wrong truncation of dma_addr_t Greg Kroah-Hartman
2013-12-18 21:08 ` [PATCH 3.4 03/31] ARM: pxa: tosa: fix keys mapping Greg Kroah-Hartman
2013-12-18 21:08 ` [PATCH 3.4 04/31] ARM: OMAP3: hwmod data: Dont prevent RESET of USB Host module Greg Kroah-Hartman
2013-12-18 21:08 ` [PATCH 3.4 05/31] ARM: 7912/1: check stack pointer in get_wchan Greg Kroah-Hartman
2013-12-18 21:08 ` [PATCH 3.4 06/31] ARM: 7913/1: fix framepointer check in unwind_frame Greg Kroah-Hartman
2013-12-18 21:08 ` [PATCH 3.4 07/31] KVM: Improve create VCPU parameter (CVE-2013-4587) Greg Kroah-Hartman
2013-12-18 21:08 ` [PATCH 3.4 08/31] hwmon: (w83l786ng) Fix fan speed control mode setting and reporting Greg Kroah-Hartman
2013-12-18 21:08 ` [PATCH 3.4 09/31] xfs: underflow bug in xfs_attrlist_by_handle() Greg Kroah-Hartman
2013-12-18 21:08 ` [PATCH 3.4 10/31] futex: fix handling of read-only-mapped hugepages Greg Kroah-Hartman
2013-12-18 21:08 ` Greg Kroah-Hartman [this message]
2013-12-18 21:08 ` [PATCH 3.4 12/31] usb: dwc3: fix implementation of endpoint wedge Greg Kroah-Hartman
2013-12-18 21:08 ` [PATCH 3.4 13/31] usb: gadget: composite: reset delayed_status on reset_config Greg Kroah-Hartman
2013-12-18 21:08 ` [PATCH 3.4 14/31] USB: serial: option: blacklist interface 1 for Huawei E173s-6 Greg Kroah-Hartman
2013-12-18 21:08 ` [PATCH 3.4 15/31] USB: option: support new huawei devices Greg Kroah-Hartman
2013-12-18 21:08 ` [PATCH 3.4 16/31] Input: usbtouchscreen - separate report and transmit buffer size handling Greg Kroah-Hartman
2013-12-18 21:08 ` [PATCH 3.4 17/31] drivers/rtc/rtc-at91rm9200.c: correct alarm over day/month wrap Greg Kroah-Hartman
2013-12-18 21:08 ` [PATCH 3.4 18/31] selinux: handle TCP SYN-ACK packets correctly in selinux_ip_output() Greg Kroah-Hartman
2013-12-18 21:08 ` [PATCH 3.4 19/31] selinux: handle TCP SYN-ACK packets correctly in selinux_ip_postroute() Greg Kroah-Hartman
2013-12-18 21:08 ` [PATCH 3.4 20/31] mac80211: dont attempt to reorder multicast frames Greg Kroah-Hartman
2013-12-18 21:08 ` [PATCH 3.4 21/31] drm/radeon: fixup bad vram size on SI Greg Kroah-Hartman
2013-12-18 21:08 ` [PATCH 3.4 22/31] x86, efi: Dont use (U)EFI time services on 32 bit Greg Kroah-Hartman
2013-12-18 21:08 ` [PATCH 3.4 23/31] dm bufio: initialize read-only module parameters Greg Kroah-Hartman
2013-12-18 21:08 ` [PATCH 3.4 24/31] dm delay: fix a possible deadlock due to shared workqueue Greg Kroah-Hartman
2013-12-18 21:08 ` [PATCH 3.4 25/31] dm table: fail dm_table_create on dm_round_up overflow Greg Kroah-Hartman
2013-12-18 21:08 ` [PATCH 3.4 27/31] staging: comedi: pcmuio: fix possible NULL deref on detach Greg Kroah-Hartman
2013-12-18 21:08 ` [PATCH 3.4 28/31] staging: comedi: ssv_dnp: use comedi_dio_update_state() Greg Kroah-Hartman
2013-12-18 21:08 ` [PATCH 3.4 29/31] sc1200_wdt: Fix oops Greg Kroah-Hartman
2013-12-18 21:08 ` [PATCH 3.4 30/31] hpfs: fix warnings when the filesystem fills up Greg Kroah-Hartman
2013-12-18 21:08 ` [PATCH 3.4 31/31] Revert "net: update consumers of MSG_MORE to recognize MSG_SENDPAGE_NOTLAST" Greg Kroah-Hartman
2013-12-19  2:02 ` [PATCH 3.4 00/31] 3.4.75-stable review Guenter Roeck
2013-12-19  3:40   ` Greg Kroah-Hartman
2013-12-19 19:54 ` Guenter Roeck
2013-12-19 20:13   ` Greg Kroah-Hartman
2013-12-19 20:46 ` Shuah Khan

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=20131218210523.114599656@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=jwerner@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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;
as well as URLs for NNTP newsgroup(s).