From: Denis Turischev <denis@compulab.co.il>
To: Ben Hutchings <ben@decadent.org.uk>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
torvalds@linux-foundation.org, akpm@linux-foundation.org,
alan@lxorguk.ukuu.org.uk,
Sarah Sharp <sarah.a.sharp@linux.intel.com>,
Robert Hancock <hancockrwd@gmail.com>
Subject: Re: [ 12/95] xhci: Switch PPT ports to EHCI on shutdown.
Date: Mon, 10 Sep 2012 14:09:12 +0300 [thread overview]
Message-ID: <504DCA58.2030202@compulab.co.il> (raw)
In-Reply-To: <20120909224152.583178513@decadent.org.uk>
Hi Ben,
As reported by Robert Hancock there is a typo in if statement below.
Do you want I resubmit it? Or should we wait for Sarah Sharp review?
Denis Turischev
On 09/10/2012 01:42 AM, Ben Hutchings wrote:
> 3.2-stable review patch. If anyone has any objections, please let me know.
>
> ------------------
>
> From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
>
> commit e95829f474f0db3a4d940cae1423783edd966027 upstream.
>
> The Intel desktop boards DH77EB and DH77DF have a hardware issue that
> can be worked around by BIOS. If the USB ports are switched to xHCI on
> shutdown, the xHCI host will send a spurious interrupt, which will wake
> the system. Some BIOS will work around this, but not all.
>
> The bug can be avoided if the USB ports are switched back to EHCI on
> shutdown. The Intel Windows driver switches the ports back to EHCI, so
> change the Linux xHCI driver to do the same.
>
> Unfortunately, we can't tell the two effected boards apart from other
> working motherboards, because the vendors will change the DMI strings
> for the DH77EB and DH77DF boards to their own custom names. One example
> is Compulab's mini-desktop, the Intense-PC. Instead, key off the
> Panther Point xHCI host PCI vendor and device ID, and switch the ports
> over for all PPT xHCI hosts.
>
> The only impact this will have on non-effected boards is to add a couple
> hundred milliseconds delay on boot when the BIOS has to switch the ports
> over from EHCI to xHCI.
>
> This patch should be backported to kernels as old as 3.0, that contain
> the commit 69e848c2090aebba5698a1620604c7dccb448684 "Intel xhci: Support
> EHCI/xHCI port switching."
>
> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
> Reported-by: Denis Turischev <denis@compulab.co.il>
> Tested-by: Denis Turischev <denis@compulab.co.il>
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> ---
> drivers/usb/host/pci-quirks.c | 7 +++++++
> drivers/usb/host/pci-quirks.h | 1 +
> drivers/usb/host/xhci-pci.c | 9 +++++++++
> drivers/usb/host/xhci.c | 3 +++
> drivers/usb/host/xhci.h | 1 +
> 5 files changed, 21 insertions(+)
>
> --- a/drivers/usb/host/pci-quirks.c
> +++ b/drivers/usb/host/pci-quirks.c
> @@ -800,6 +800,13 @@ void usb_enable_xhci_ports(struct pci_de
> }
> EXPORT_SYMBOL_GPL(usb_enable_xhci_ports);
>
> +void usb_disable_xhci_ports(struct pci_dev *xhci_pdev)
> +{
> + pci_write_config_dword(xhci_pdev, USB_INTEL_USB3_PSSEN, 0x0);
> + pci_write_config_dword(xhci_pdev, USB_INTEL_XUSB2PR, 0x0);
> +}
> +EXPORT_SYMBOL_GPL(usb_disable_xhci_ports);
> +
> /**
> * PCI Quirks for xHCI.
> *
> --- a/drivers/usb/host/pci-quirks.h
> +++ b/drivers/usb/host/pci-quirks.h
> @@ -10,6 +10,7 @@ void usb_amd_quirk_pll_disable(void);
> void usb_amd_quirk_pll_enable(void);
> bool usb_is_intel_switchable_xhci(struct pci_dev *pdev);
> void usb_enable_xhci_ports(struct pci_dev *xhci_pdev);
> +void usb_disable_xhci_ports(struct pci_dev *xhci_pdev);
> #else
> static inline void usb_amd_quirk_pll_disable(void) {}
> static inline void usb_amd_quirk_pll_enable(void) {}
> --- a/drivers/usb/host/xhci-pci.c
> +++ b/drivers/usb/host/xhci-pci.c
> @@ -90,6 +90,15 @@ static void xhci_pci_quirks(struct devic
> xhci->quirks |= XHCI_EP_LIMIT_QUIRK;
> xhci->limit_active_eps = 64;
> xhci->quirks |= XHCI_SW_BW_CHECKING;
> + /*
> + * PPT desktop boards DH77EB and DH77DF will power back on after
> + * a few seconds of being shutdown. The fix for this is to
> + * switch the ports from xHCI to EHCI on shutdown. We can't use
> + * DMI information to find those particular boards (since each
> + * vendor will change the board name), so we have to key off all
> + * PPT chipsets.
> + */
> + xhci->quirks |= XHCI_SPURIOUS_REBOOT;
> }
> if (pdev->vendor == PCI_VENDOR_ID_ETRON &&
> pdev->device == PCI_DEVICE_ID_ASROCK_P67) {
> --- a/drivers/usb/host/xhci.c
> +++ b/drivers/usb/host/xhci.c
> @@ -648,6 +648,9 @@ void xhci_shutdown(struct usb_hcd *hcd)
> {
> struct xhci_hcd *xhci = hcd_to_xhci(hcd);
>
> + if (xhci->quirks && XHCI_SPURIOUS_REBOOT)
This looks like a typo, think it should be & not &&. With this code, it
appears the quirk will always be triggered since XHCI_SPURIOUS_REBOOT is
non-zero.
> + usb_disable_xhci_ports(to_pci_dev(hcd->self.controller));
> +
> spin_lock_irq(&xhci->lock);
> xhci_halt(xhci);
> spin_unlock_irq(&xhci->lock);
> --- a/drivers/usb/host/xhci.h
> +++ b/drivers/usb/host/xhci.h
> @@ -1471,6 +1471,7 @@ struct xhci_hcd {
> #define XHCI_SW_BW_CHECKING (1 << 8)
> #define XHCI_AMD_0x96_HOST (1 << 9)
> #define XHCI_TRUST_TX_LENGTH (1 << 10)
> +#define XHCI_SPURIOUS_REBOOT (1 << 13)
> unsigned int num_active_eps;
> unsigned int limit_active_eps;
> /* There are two roothubs to keep track of bus suspend info for */
>
>
next prev parent reply other threads:[~2012-09-10 11:09 UTC|newest]
Thread overview: 112+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-09 22:41 [ 00/95] 3.2.29-stable review Ben Hutchings
2012-09-09 22:41 ` [ 01/95] HID: add ASUS AIO keyboard model AK1D Ben Hutchings
2012-09-09 22:41 ` [ 02/95] nfs: tear down caches in nfs_init_writepagecache when allocation fails Ben Hutchings
2012-09-09 22:41 ` [ 03/95] NFS: Use kcalloc() when allocating arrays Ben Hutchings
2012-09-09 22:41 ` [ 04/95] NFSv4.1 fix page number calculation bug for filelayout decode buffers Ben Hutchings
2012-09-09 22:41 ` [ 05/95] fix page number calculation bug for block layout decode buffer Ben Hutchings
2012-09-09 22:41 ` [ 06/95] pnfs: defer release of pages in layoutget Ben Hutchings
2012-09-09 22:41 ` [ 07/95] ext4: avoid kmemcheck complaint from reading uninitialized memory Ben Hutchings
2012-09-09 22:41 ` [ 08/95] fuse: verify all ioctl retry iov elements Ben Hutchings
2012-09-09 22:41 ` [ 09/95] Bluetooth: Fix legacy pairing with some devices Ben Hutchings
2012-09-09 22:42 ` [ 10/95] xhci: Increase reset timeout for Renesas 720201 host Ben Hutchings
2012-09-09 22:42 ` [ 11/95] xhci: Add Etron XHCI_TRUST_TX_LENGTH quirk Ben Hutchings
2012-09-09 22:42 ` [ 12/95] xhci: Switch PPT ports to EHCI on shutdown Ben Hutchings
2012-09-10 11:09 ` Denis Turischev [this message]
2012-09-10 15:18 ` Ben Hutchings
2012-09-09 22:42 ` [ 13/95] USB: ftdi_sio: Add VID/PID for Kondo Serial USB Ben Hutchings
2012-09-09 22:42 ` [ 14/95] USB: option: Add Vodafone/Huawei K5005 support Ben Hutchings
2012-09-09 22:42 ` [ 15/95] USB: add USB_VENDOR_AND_INTERFACE_INFO() macro Ben Hutchings
2012-09-09 22:42 ` [ 16/95] USB: support the new interfaces of Huawei Data Card devices in option driver Ben Hutchings
2012-09-09 22:42 ` [ 17/95] usb: serial: mos7840: Fixup mos7840_chars_in_buffer() Ben Hutchings
2012-09-09 22:42 ` [ 18/95] usb: gadget: u_ether: fix kworker 100% CPU issue with still used interfaces in eth_stop Ben Hutchings
2012-09-09 22:42 ` [ 19/95] ARM: 7483/1: vfp: only advertise VFPv4 in hwcaps if CONFIG_VFPv3 is enabled Ben Hutchings
2012-09-09 22:42 ` [ 20/95] ARM: 7488/1: mm: use 5 bits for swapfile type encoding Ben Hutchings
2012-09-09 22:42 ` [ 21/95] ARM: 7489/1: errata: fix workaround for erratum #720789 on UP systems Ben Hutchings
2012-09-09 22:42 ` [ 22/95] drm/i915: ignore eDP bpc settings from vbt Ben Hutchings
2012-09-09 22:42 ` [ 23/95] ALSA: hda - fix Copyright debug message Ben Hutchings
2012-09-09 22:42 ` [ 24/95] sched: fix divide by zero at {thread_group,task}_times Ben Hutchings
2012-09-09 22:42 ` [ 25/95] mutex: Place lock in contended state after fastpath_lock failure Ben Hutchings
2012-09-09 23:34 ` Nicolas Pitre
2012-09-09 23:42 ` Ben Hutchings
2012-09-09 22:42 ` [ 26/95] ath9k: fix decrypt_error initialization in ath_rx_tasklet() Ben Hutchings
2012-09-09 22:42 ` [ 27/95] drm/nvd0/disp: mask off high 16 bit of negative cursor x-coordinate Ben Hutchings
2012-09-09 22:42 ` [ 28/95] drm/i915: reorder edp disabling to fix ivb MacBook Air Ben Hutchings
2012-09-09 22:42 ` [ 29/95] audit: dont free_chunk() after fsnotify_add_mark() Ben Hutchings
2012-09-09 22:42 ` [ 30/95] audit: fix refcounting in audit-tree Ben Hutchings
2012-09-09 22:42 ` [ 31/95] vfs: canonicalize create mode in build_open_flags() Ben Hutchings
2012-09-09 22:42 ` [ 32/95] PCI: EHCI: Fix crash during hibernation on ASUS computers Ben Hutchings
2012-09-09 22:42 ` [ 33/95] IB/srp: Fix a race condition Ben Hutchings
2012-09-09 22:42 ` [ 34/95] USB: option: add ZTE K5006-Z Ben Hutchings
2012-09-10 17:11 ` Thomas Schäfer
2012-09-11 7:43 ` Bjørn Mork
2012-09-12 2:29 ` Ben Hutchings
2012-09-13 15:22 ` Thomas Schäfer
2012-09-16 16:44 ` Ben Hutchings
2012-09-09 22:42 ` [ 35/95] dccp: check ccid before dereferencing Ben Hutchings
2012-09-10 6:17 ` Mathias Krause
2012-09-10 6:47 ` David Miller
2012-09-10 7:10 ` Mathias Krause
2012-09-09 22:42 ` [ 36/95] md: Dont truncate size at 4TB for RAID0 and Linear Ben Hutchings
2012-09-09 22:42 ` [ 37/95] NFS: Alias the nfs module to nfs4 Ben Hutchings
2012-09-09 22:42 ` [ 38/95] target: fix NULL pointer dereference bug alloc_page() fails to get memory Ben Hutchings
2012-09-09 22:42 ` [ 39/95] ext4: fix long mount times on very big file systems Ben Hutchings
2012-09-09 22:42 ` [ 40/95] PM / Runtime: Fix rpm_resume() return value for power.no_callbacks set Ben Hutchings
2012-09-09 22:42 ` [ 41/95] PM / Runtime: Clear power.deferred_resume on success in rpm_suspend() Ben Hutchings
2012-09-09 22:42 ` [ 42/95] ASoC: wm9712: Fix microphone source selection Ben Hutchings
2012-09-09 22:42 ` [ 43/95] USB: smsusb: remove __devinit* from the struct usb_device_id table Ben Hutchings
2012-09-09 22:42 ` [ 44/95] USB: spca506: " Ben Hutchings
2012-09-09 22:42 ` [ 45/95] USB: p54usb: " Ben Hutchings
2012-09-09 22:42 ` [ 46/95] USB: rtl8187: " Ben Hutchings
2012-09-09 22:42 ` [ 47/95] USB: vt6656: " Ben Hutchings
2012-09-09 22:42 ` [ 48/95] USB: winbond: " Ben Hutchings
2012-09-09 22:42 ` [ 49/95] USB: emi62: " Ben Hutchings
2012-09-09 22:42 ` [ 50/95] USB: CDC ACM: Fix NULL pointer dereference Ben Hutchings
2012-09-09 22:42 ` [ 51/95] alpha: Dont export SOCK_NONBLOCK to user space Ben Hutchings
2012-09-09 22:42 ` [ 52/95] Redefine ATOMIC_INIT and ATOMIC64_INIT to drop the casts Ben Hutchings
2012-09-09 22:42 ` [ 53/95] ALSA: hda - dont create dysfunctional mixer controls for ca0132 Ben Hutchings
2012-09-09 22:42 ` [ 54/95] netconsole: remove a redundant netconsole_target_put() Ben Hutchings
2012-09-09 22:42 ` [ 55/95] drm/radeon/kms: upstream atombios.h updates Ben Hutchings
2012-09-09 22:42 ` [ 56/95] drm/radeon/kms: extend the Fujitsu D3003-S2 board connector quirk to cover later silicon stepping Ben Hutchings
2012-09-09 22:42 ` [ 57/95] drm/radeon: implement ACPI VFCT vbios fetch (v3) Ben Hutchings
2012-09-09 22:42 ` [ 58/95] ACPI: export symbol acpi_get_table_with_size Ben Hutchings
2012-09-09 22:42 ` [ 59/95] drm/radeon: convert radeon vfct code to use acpi_get_table_with_size Ben Hutchings
2012-09-09 22:42 ` [ 60/95] drm/radeon: fix invalid memory access in radeon_atrm_get_bios() Ben Hutchings
2012-09-09 22:42 ` [ 61/95] drm/radeon: finish getting bios earlier Ben Hutchings
2012-09-09 22:42 ` [ 62/95] drm/radeon: fix use after free in ATRM bios reading code Ben Hutchings
2012-09-09 22:42 ` [ 63/95] drm/radeon: split ATRM support out from the ATPX handler (v3) Ben Hutchings
2012-09-09 22:42 ` [ 64/95] NFSv3: Ensure that do_proc_get_root() reports errors correctly Ben Hutchings
2012-09-09 22:42 ` [ 65/95] vfs: missed source of ->f_pos races Ben Hutchings
2012-09-09 22:42 ` [ 66/95] svcrpc: fix BUG() in svc_tcp_clear_pages Ben Hutchings
2012-09-09 22:42 ` [ 67/95] svcrpc: sends on closed socket should stop immediately Ben Hutchings
2012-09-09 22:42 ` [ 68/95] svcrpc: fix svc_xprt_enqueue/svc_recv busy-looping Ben Hutchings
2012-09-09 22:42 ` [ 69/95] Revert "drm/radeon: fix bo creation retry path" Ben Hutchings
2012-09-09 22:43 ` [ 70/95] fbcon: fix race condition between console lock and cursor timer (v1.1) Ben Hutchings
2012-09-09 22:43 ` [ 71/95] cciss: fix incorrect scsi status reporting Ben Hutchings
2012-09-09 22:43 ` [ 72/95] mm: hugetlbfs: correctly populate shared pmd Ben Hutchings
2012-09-09 22:43 ` [ 73/95] drivers/misc/sgi-xp/xpc_uv.c: SGI XPC fails to load when cpu 0 is out of IRQ resources Ben Hutchings
2012-09-09 22:43 ` [ 74/95] drivers/rtc/rtc-rs5c348.c: fix hour decoding in 12-hour mode Ben Hutchings
2012-09-09 22:43 ` [ 75/95] rapidio/tsi721: fix inbound doorbell interrupt handling Ben Hutchings
2012-09-09 22:43 ` [ 76/95] rapidio/tsi721: fix unused variable compiler warning Ben Hutchings
2012-09-09 22:43 ` [ 77/95] fs/buffer.c: remove BUG() in possible but rare condition Ben Hutchings
2012-09-09 22:43 ` [ 78/95] block: replace __getblk_slow misfix by grow_dev_page fix Ben Hutchings
2012-09-09 22:43 ` [ 79/95] Bluetooth: Fix using uninitialized option in RFCMode Ben Hutchings
2012-09-09 22:43 ` [ 80/95] drivers/char/random.c: fix boot id uniqueness race Ben Hutchings
2012-09-09 22:43 ` [ 81/95] MAINTAINERS: Theodore Tso is taking over the random driver Ben Hutchings
2012-09-09 22:43 ` [ 82/95] random: Add comment to random_initialize() Ben Hutchings
2012-09-09 22:43 ` [ 83/95] dmi: Feed DMI table to /dev/random driver Ben Hutchings
2012-09-09 22:43 ` [ 84/95] virtio_blk: fix config handler race Ben Hutchings
2012-09-10 2:26 ` Rusty Russell
2012-09-10 2:45 ` Asias He
2012-09-10 15:25 ` Ben Hutchings
2012-09-09 22:43 ` [ 85/95] virtio_blk: Drop unused request tracking list Ben Hutchings
2012-09-09 22:43 ` [ 86/95] virtio-blk: Fix hot-unplug race in remove method Ben Hutchings
2012-09-09 22:43 ` [ 87/95] virtio-blk: Call del_gendisk() before disable guest kick Ben Hutchings
2012-09-09 22:43 ` [ 88/95] virtio-blk: Reset device after blk_cleanup_queue() Ben Hutchings
2012-09-09 22:43 ` [ 89/95] HID: add support for Cypress barcode scanner 04B4:ED81 Ben Hutchings
2012-09-09 22:43 ` [ 90/95] pmac_zilog,kdb: Fix console poll hook to return instead of loop Ben Hutchings
2012-09-09 22:43 ` [ 91/95] Staging: speakup: fix an improperly-declared variable Ben Hutchings
2012-09-09 22:43 ` [ 92/95] NFS: Fix Oopses in nfs_lookup_revalidate and nfs4_lookup_revalidate Ben Hutchings
2012-09-12 6:45 ` Suresh Jayaraman
2012-09-09 22:43 ` [ 93/95] asus-nb-wmi: add some video toggle keys Ben Hutchings
2012-09-09 22:43 ` [ 94/95] Squashfs: fix mount time sanity check for corrupted superblock Ben Hutchings
2012-09-09 22:43 ` [ 95/95] mm: avoid swapping out with swappiness==0 Ben Hutchings
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=504DCA58.2030202@compulab.co.il \
--to=denis@compulab.co.il \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=ben@decadent.org.uk \
--cc=hancockrwd@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sarah.a.sharp@linux.intel.com \
--cc=stable@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.