From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>,
Huang Ying <ying.huang@intel.com>
Subject: [071/141] xhci: Disable D3cold for buggy TI redrivers.
Date: Wed, 03 Jul 2013 14:40:08 -0400 [thread overview]
Message-ID: <20130703184056.411073580@goodmis.org> (raw)
In-Reply-To: 20130703183857.307196999@goodmis.org
[-- Attachment #1: 0071-xhci-Disable-D3cold-for-buggy-TI-redrivers.patch --]
[-- Type: text/plain, Size: 4380 bytes --]
3.6.11.6 stable review patch.
If anyone has any objections, please let me know.
------------------
From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
[ Upstream commit c3897aa5386faba77e5bbdf94902a1658d3a5b11 ]
Some xHCI hosts contain a "redriver" from TI that silently drops port
status connect changes if the port slips into Compliance Mode. If the
port slips into compliance mode while the host is in D0, there will not
be a port status change event. If the port slips into compliance mode
while the host is in D3, the host will not send a PME. This includes
when the system is suspended (S3) or hibernated (S4).
If this happens when the system is in S3/S4, there is nothing software
can do. Other port status change events that would normally cause the
host to wake the system from S3/S4 may also be lost. This includes
remote wakeup, disconnects and connects on other ports, and overrcurrent
events. A decision was made to _NOT_ disable system suspend/hibernate
on these systems, since users are unlikely to enable wakeup from S3/S4
for the xHCI host.
Software can deal with this issue when the system is in S0. A work
around was put in to poll the port status registers for Compliance Mode.
The xHCI driver will continue to poll the registers while the host is
runtime suspended. Unfortunately, that means we can't allow the PCI
device to go into D3cold, because power will be removed from the host,
and the config space will read as all Fs.
Disable D3cold in the xHCI PCI runtime suspend function.
This patch should be backported to kernels as old as 3.2, that
contain the commit 71c731a296f1b08a3724bd1b514b64f1bda87a23 "usb: host:
xhci: Fix Compliance Mode on SN65LVPE502CP Hardware"
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: Huang Ying <ying.huang@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
drivers/usb/host/xhci-pci.c | 10 ++++++++++
drivers/usb/host/xhci.c | 4 ++--
drivers/usb/host/xhci.h | 3 +++
3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index dcb72f7..cd0fc48 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -221,12 +221,22 @@ static void xhci_pci_remove(struct pci_dev *dev)
static int xhci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup)
{
struct xhci_hcd *xhci = hcd_to_xhci(hcd);
+ struct pci_dev *pdev;
int retval = 0;
if (hcd->state != HC_STATE_SUSPENDED ||
xhci->shared_hcd->state != HC_STATE_SUSPENDED)
return -EINVAL;
+ pdev = to_pci_dev(hcd->self.controller);
+
+ /*
+ * Systems with the TI redriver that loses port status change events
+ * need to have the registers polled during D3, so avoid D3cold.
+ */
+ if (xhci_compliance_mode_recovery_timer_quirk_check())
+ pdev->no_d3cold = true;
+
retval = xhci_suspend(xhci);
return retval;
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 6ee481a..2c117ec 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -466,7 +466,7 @@ static void compliance_mode_recovery_timer_init(struct xhci_hcd *xhci)
* Systems:
* Vendor: Hewlett-Packard -> System Models: Z420, Z620 and Z820
*/
-static bool compliance_mode_recovery_timer_quirk_check(void)
+bool xhci_compliance_mode_recovery_timer_quirk_check(void)
{
const char *dmi_product_name, *dmi_sys_vendor;
@@ -517,7 +517,7 @@ int xhci_init(struct usb_hcd *hcd)
xhci_dbg(xhci, "Finished xhci_init\n");
/* Initializing Compliance Mode Recovery Data If Needed */
- if (compliance_mode_recovery_timer_quirk_check()) {
+ if (xhci_compliance_mode_recovery_timer_quirk_check()) {
xhci->quirks |= XHCI_COMP_MODE_QUIRK;
compliance_mode_recovery_timer_init(xhci);
}
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 212d408..f056e9f 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1852,4 +1852,7 @@ struct xhci_input_control_ctx *xhci_get_input_control_ctx(struct xhci_hcd *xhci,
struct xhci_slot_ctx *xhci_get_slot_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx);
struct xhci_ep_ctx *xhci_get_ep_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx, unsigned int ep_index);
+/* xHCI quirks */
+bool xhci_compliance_mode_recovery_timer_quirk_check(void);
+
#endif /* __LINUX_XHCI_HCD_H */
--
1.7.10.4
next prev parent reply other threads:[~2013-07-03 19:03 UTC|newest]
Thread overview: 143+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-03 18:38 [000/141] 3.6.11.6-stable review Steven Rostedt
2013-07-03 18:38 ` [001/141] avr32: fix relocation check for signed 18-bit offset Steven Rostedt
2013-07-03 18:38 ` [002/141] ARM: plat-orion: Fix num_resources and id for ge10 and ge11 Steven Rostedt
2013-07-03 18:39 ` [003/141] cfg80211: fix wiphy_register error path Steven Rostedt
2013-07-03 18:39 ` [004/141] mac80211: fix AP-mode frame matching Steven Rostedt
2013-07-03 18:39 ` [005/141] usb: option: Add Telewell TW-LTE 4G Steven Rostedt
2013-07-03 18:39 ` [006/141] USB: option: add device IDs for Dell 5804 (Novatel E371) WWAN card Steven Rostedt
2013-07-03 18:39 ` [007/141] USB: ftdi_sio: Add support for Newport CONEX motor drivers Steven Rostedt
2013-07-03 18:39 ` [008/141] USB: cxacru: potential underflow in cxacru_cm_get_array() Steven Rostedt
2013-07-03 18:39 ` [009/141] TTY: Fix tty miss restart after we turn off flow-control Steven Rostedt
2013-07-03 18:39 ` [010/141] USB: Blacklisted Cinterions PLxx WWAN Interface Steven Rostedt
2013-07-03 18:39 ` [011/141] USB: reset resume quirk needed by a hub Steven Rostedt
2013-07-03 18:39 ` [012/141] USB: xHCI: override bogus bulk wMaxPacketSize values Steven Rostedt
2013-07-03 18:39 ` [013/141] USB: UHCI: fix for suspend of virtual HP controller Steven Rostedt
2013-07-03 18:39 ` [014/141] Input: egalax_ts - ABS_MT_POSITION_Y not reported well Steven Rostedt
2013-07-03 18:39 ` [015/141] cifs: only set ops for inodes in I_NEW state Steven Rostedt
2013-07-03 18:39 ` [016/141] random: fix accounting race condition with lockless irq entropy_count update Steven Rostedt
2013-07-03 18:39 ` [017/141] fat: fix possible overflow for fat_clusters Steven Rostedt
2013-07-03 18:39 ` [018/141] tg3: Skip powering down function 0 on certain serdes devices Steven Rostedt
2013-07-03 18:39 ` [019/141] tg3: Fix data corruption on 5725 with TSO Steven Rostedt
2013-07-03 18:39 ` [020/141] perf: net_dropmonitor: Fix trace parameter order Steven Rostedt
2013-07-03 18:39 ` [021/141] perf: net_dropmonitor: Fix symbol-relative addresses Steven Rostedt
2013-07-03 18:39 ` [022/141] ocfs2: goto out_unlock if ocfs2_get_clusters_nocache() failed in ocfs2_fiemap() Steven Rostedt
2013-07-03 18:39 ` [023/141] Kirkwood: Enable PCIe port 1 on QNAP TS-11x/TS-21x Steven Rostedt
2013-07-03 18:39 ` [024/141] drivers/leds/leds-ot200.c: fix error caused by shifted mask Steven Rostedt
2013-07-03 18:39 ` [025/141] rapidio/tsi721: fix bug in MSI interrupt handling Steven Rostedt
2013-07-03 18:39 ` [026/141] mm compaction: fix of improper cache flush in migration code Steven Rostedt
2013-07-03 18:39 ` [027/141] wait: fix false timeouts when using wait_event_timeout() Steven Rostedt
2013-07-03 18:39 ` [028/141] nilfs2: fix issue of nilfs_set_page_dirty() for page at EOF boundary Steven Rostedt
2013-07-03 18:39 ` [029/141] mm: memcg: remove incorrect VM_BUG_ON for swap cache pages in uncharge Steven Rostedt
2013-07-03 18:39 ` [030/141] drivers/block/brd.c: fix brd_lookup_page() race Steven Rostedt
2013-07-03 18:39 ` [031/141] mm/pagewalk.c: walk_page_range should avoid VM_PFNMAP areas Steven Rostedt
2013-07-03 18:39 ` [032/141] mm/THP: use pmd_populate() to update the pmd with pgtable_t pointer Steven Rostedt
2013-07-03 18:39 ` [033/141] xfs: kill suid/sgid through the truncate path Steven Rostedt
2013-07-03 18:39 ` [034/141] SUNRPC: Prevent an rpc_task wakeup race Steven Rostedt
2013-07-03 18:39 ` [035/141] ASoC: cs42l52: fix default value for MASTERA_VOL Steven Rostedt
2013-07-03 18:39 ` [036/141] drm/radeon: fix typo in cu_per_sh on verde Steven Rostedt
2013-07-03 18:39 ` [037/141] drm/radeon: fix card_posted check for newer asics Steven Rostedt
2013-07-03 18:39 ` [038/141] cifs: fix potential buffer overrun when composing a new options string Steven Rostedt
2013-07-03 18:39 ` [039/141] ata_piix: add PCI IDs for Intel BayTail Steven Rostedt
2013-07-03 18:39 ` [040/141] libata: make ata_exec_internal_sg honor DMADIR Steven Rostedt
2013-07-03 18:39 ` [041/141] m68k/mac: Fix unexpected interrupt with CONFIG_EARLY_PRINTK Steven Rostedt
2013-07-03 18:39 ` [042/141] iscsi-target: fix heap buffer overflow on error Steven Rostedt
2013-07-03 18:39 ` [043/141] ib_srpt: Call target_sess_cmd_list_set_waiting during shutdown_session Steven Rostedt
2013-07-03 18:39 ` [044/141] NFSv4: Fix a thinko in nfs4_try_open_cached Steven Rostedt
2013-07-03 18:39 ` [045/141] regulator: palmas: Fix "enable_reg" to point to the correct reg for SMPS10 Steven Rostedt
2013-07-03 18:39 ` [046/141] reiserfs: fix deadlock with nfs racing on create/lookup Steven Rostedt
2013-07-03 18:39 ` [047/141] reiserfs: fix problems with chowning setuid file w/ xattrs Steven Rostedt
2013-07-03 18:39 ` [048/141] reiserfs: fix spurious multiple-fill in reiserfs_readdir_dentry Steven Rostedt
2013-07-03 18:39 ` [049/141] jfs: fix a couple races Steven Rostedt
2013-07-03 18:39 ` [050/141] xen-netback: remove skb in xen_netbk_alloc_page Steven Rostedt
2013-07-03 18:39 ` [051/141] iommu/amd: Re-enable IOMMU event log interrupt after handling Steven Rostedt
2013-07-03 18:39 ` [052/141] iommu/amd: Workaround for ERBT1312 Steven Rostedt
2013-07-03 18:39 ` [053/141] ACPI / video: Add "Asus UL30A" to ACPI video detect blacklist Steven Rostedt
2013-07-03 18:39 ` [054/141] mac80211: close AP_VLAN interfaces before unregistering all Steven Rostedt
2013-07-03 18:39 ` [055/141] iwlwifi: dvm: fix zero LQ CMD sending avoidance Steven Rostedt
2013-07-03 18:39 ` [056/141] cfg80211: check wdev->netdev in connection work Steven Rostedt
2013-07-03 18:39 ` [057/141] ath9k: use correct OTP register offsets for AR9550 Steven Rostedt
2013-07-03 18:39 ` [058/141] tg3: Add read dma workaround for 5720 Steven Rostedt
2013-07-03 18:39 ` [059/141] target: Re-instate sess_wait_list for target_wait_for_sess_cmds Steven Rostedt
2013-07-03 18:39 ` [060/141] xen-netback: coalesce slots in TX path and fix regressions Steven Rostedt
2013-07-03 18:39 ` [061/141] xen-netback: dont disconnect frontend when seeing oversize packet Steven Rostedt
2013-07-03 18:39 ` [062/141] xen-netback: remove redundent parameter in netbk_count_requests Steven Rostedt
2013-07-03 18:40 ` [063/141] xen-netback: avoid allocating variable size array on stack Steven Rostedt
2013-07-03 18:40 ` [064/141] xen-netfront: reduce gso_max_size to account for max TCP header Steven Rostedt
2013-07-03 18:40 ` [065/141] xen-netback: better names for thresholds Steven Rostedt
2013-07-03 18:40 ` [066/141] USB: serial: Add Option GTM681W to qcserial device table Steven Rostedt
2013-07-03 18:40 ` [067/141] USB: option: blacklist network interface on Huawei E1820 Steven Rostedt
2013-07-03 18:40 ` [068/141] xhci - correct comp_mode_recovery_timer on return from hibernate Steven Rostedt
2013-07-03 18:40 ` [069/141] xhci-mem: init list heads at the beginning of init Steven Rostedt
2013-07-03 18:40 ` [070/141] xhci: fix list access before init Steven Rostedt
2013-07-03 18:40 ` Steven Rostedt [this message]
2013-07-03 18:40 ` [072/141] ALSA: usb-audio: fix Roland/Cakewalk UM-3G support Steven Rostedt
2013-07-03 18:40 ` [073/141] ALSA: usb-audio - Apply Logitech QuickCam Pro 9000 quirk only to audio iface Steven Rostedt
2013-07-03 18:40 ` [074/141] ALSA: usb-audio - Fix invalid volume resolution on Logitech HD webcam c270 Steven Rostedt
2013-07-03 18:40 ` [075/141] USB: iuu_phoenix: fix bulk-message timeout Steven Rostedt
2013-07-03 18:40 ` [076/141] USB: keyspan: fix bogus array index Steven Rostedt
2013-07-03 18:40 ` [077/141] USB: ark3116: fix control-message timeout Steven Rostedt
2013-07-03 18:40 ` [078/141] USB: visor: fix initialisation of Treo/Kyocera devices Steven Rostedt
2013-07-03 18:40 ` [079/141] USB: Serial: cypress_M8: Enable FRWD Dongle hidcom device Steven Rostedt
2013-07-03 18:40 ` [080/141] USB: whiteheat: fix broken port configuration Steven Rostedt
2013-07-03 18:40 ` [081/141] USB: serial: fix Treo/Kyocera interrrupt-in urb context Steven Rostedt
2013-07-03 18:40 ` [082/141] USB: mos7840: fix DMA to stack Steven Rostedt
2013-07-03 18:40 ` [083/141] USB: mos7720: " Steven Rostedt
2013-07-03 18:40 ` [084/141] USB: mos7720: fix message timeouts Steven Rostedt
2013-07-03 18:40 ` [085/141] USB: mos7720: fix hardware flow control Steven Rostedt
2013-07-03 18:40 ` [086/141] ACPI / video: ignore BIOS initial backlight value for HP m4 Steven Rostedt
2013-07-03 18:40 ` [087/141] ACPI / video: ignore BIOS initial backlight value for HP Pavilion g6 Steven Rostedt
2013-07-03 18:40 ` [088/141] ARM: 7742/1: topology: export cpu_topology Steven Rostedt
2013-07-03 18:40 ` [089/141] ARM: 7743/1: compressed/head.S: work around new binutils warning Steven Rostedt
2013-07-03 18:40 ` [090/141] powerpc/eeh: Dont check RTAS token to get PE addr Steven Rostedt
2013-07-03 18:40 ` [091/141] dmaengine: ste_dma40: fix pm runtime ref counting Steven Rostedt
2013-07-03 18:40 ` [092/141] radeon: Fix system hang issue when using KMS with older cards Steven Rostedt
2013-07-03 18:40 ` [093/141] drm/radeon: dont allow audio on DCE6 Steven Rostedt
2013-07-03 18:40 ` [094/141] ecryptfs: fixed msync to flush data Steven Rostedt
2013-07-03 18:40 ` [095/141] eCryptfs: Check return of filemap_write_and_wait during fsync Steven Rostedt
2013-07-03 18:40 ` [096/141] hwmon: (adm1021) Strengthen chip detection for ADM1021, LM84 and MAX1617 Steven Rostedt
2013-07-03 18:40 ` [097/141] drm/mgag200: Add missing write to index before accessing data register Steven Rostedt
2013-07-03 18:40 ` [098/141] drm: fix a use-after-free when GPU acceleration disabled Steven Rostedt
2013-07-03 18:40 ` [099/141] drm/i915/sdvo: Use &intel_sdvo->ddc instead of intel_sdvo->i2c for DDC Steven Rostedt
2013-07-03 18:40 ` [100/141] drm/i915: no lvds quirk for hp t5740 Steven Rostedt
2013-07-03 18:40 ` [101/141] usb: dwc3: gadget: free trb pool only from epnum 2 Steven Rostedt
2013-07-03 18:40 ` [102/141] drm/gma500: Increase max resolution for mode setting Steven Rostedt
2013-07-03 18:40 ` [103/141] powerpc: Set default VGA device Steven Rostedt
2013-07-03 18:40 ` [104/141] powerpc/pseries: Force 32 bit MSIs for devices that require it Steven Rostedt
2013-07-03 18:40 ` [105/141] powerpc/pseries: Perform proper max_bus_speed detection Steven Rostedt
2013-07-03 18:40 ` [106/141] radeon: use max_bus_speed to activate gen2 speeds Steven Rostedt
2013-07-03 18:40 ` [107/141] iio: frequency: ad4350: Fix bug / typo in mask Steven Rostedt
2013-07-03 18:40 ` [108/141] USB: serial: add wait_until_sent operation Steven Rostedt
2013-07-03 18:40 ` [109/141] USB: serial: add generic wait_until_sent implementation Steven Rostedt
2013-07-03 18:40 ` [110/141] USB: io_ti: fix chars_in_buffer overhead Steven Rostedt
2013-07-03 18:40 ` [111/141] xen/smp: Fixup NOHZ per cpu data when onlining an offline CPU Steven Rostedt
2013-07-03 18:40 ` [112/141] b43: stop format string leaking into error msgs Steven Rostedt
2013-07-03 18:40 ` [113/141] ceph: add cpu_to_le32() calls when encoding a reconnect capability Steven Rostedt
2013-07-03 18:40 ` [114/141] ceph: ceph_pagelist_append might sleep while atomic Steven Rostedt
2013-07-03 18:40 ` [115/141] drivers/rtc/rtc-twl.c: fix missing device_init_wakeup() when booted with device tree Steven Rostedt
2013-07-03 18:40 ` [116/141] drm/gma500/psb: Unpin framebuffer on crtc disable Steven Rostedt
2013-07-03 18:40 ` [117/141] drm/gma500/cdv: " Steven Rostedt
2013-07-03 18:40 ` [118/141] Bluetooth: Fix mgmt handling of power on failures Steven Rostedt
2013-07-03 18:40 ` [119/141] ath9k: Disable PowerSave by default Steven Rostedt
2013-07-03 18:40 ` [120/141] Revert "ath9k_hw: Update rx gain initval to improve rx sensitivity" Steven Rostedt
2013-07-03 18:40 ` [121/141] ath9k: Use minstrel rate control by default Steven Rostedt
2013-07-03 18:40 ` [122/141] CPU hotplug: provide a generic helper to disable/enable CPU hotplug Steven Rostedt
2013-07-03 18:41 ` [123/141] reboot: rigrate shutdown/reboot to boot cpu Steven Rostedt
2013-07-03 18:41 ` [124/141] kmsg: honor dmesg_restrict sysctl on /dev/kmsg Steven Rostedt
2013-07-03 18:41 ` [125/141] cciss: fix broken mutex usage in ioctl Steven Rostedt
2013-07-03 18:41 ` [126/141] drm/i915: prefer VBT modes for SVDO-LVDS over EDID Steven Rostedt
2013-07-03 18:41 ` [127/141] swap: avoid read_swap_cache_async() race to deadlock while waiting on discard I/O completion Steven Rostedt
2013-07-03 18:41 ` [128/141] md/raid1: consider WRITE as successful only if at least one non-Faulty and non-rebuilding drive completed it Steven Rostedt
2013-07-03 18:41 ` [129/141] md/raid1,raid10: use freeze_array in place of raise_barrier in various places Steven Rostedt
2013-07-03 18:41 ` [130/141] mm: migration: add migrate_entry_wait_huge() Steven Rostedt
2013-07-03 18:41 ` [131/141] x86: Fix typo in kexec register clearing Steven Rostedt
2013-07-03 18:41 ` [132/141] libceph: clear messenger auth_retry flag when we authenticate Steven Rostedt
2013-07-03 18:41 ` [133/141] libceph: fix authorizer invalidation Steven Rostedt
2013-07-03 18:41 ` [134/141] libceph: add update_authorizer auth method Steven Rostedt
2013-07-03 18:41 ` [135/141] libceph: wrap auth ops in wrapper functions Steven Rostedt
2013-07-03 18:41 ` [136/141] libceph: wrap auth methods in a mutex Steven Rostedt
2013-07-03 18:41 ` [137/141] powerpc: Fix stack overflow crash in resume_kernel when ftracing Steven Rostedt
2013-07-03 18:41 ` [138/141] powerpc: Fix emulation of illegal instructions on PowerNV platform Steven Rostedt
2013-07-03 18:41 ` [139/141] powerpc: Fix missing/delayed calls to irq_work Steven Rostedt
2013-07-03 18:41 ` [140/141] USB: pl2303: fix device initialisation at open Steven Rostedt
2013-07-03 18:41 ` [141/141] USB: spcp8x5: " Steven Rostedt
2013-07-03 19:16 ` [000/141] 3.6.11.6-stable review Steven Rostedt
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=20130703184056.411073580@goodmis.org \
--to=rostedt@goodmis.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sarah.a.sharp@linux.intel.com \
--cc=stable@vger.kernel.org \
--cc=ying.huang@intel.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