mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-13 22:46:40 +07:00
xhci: Step 2 to fix usb-linus and usb-next.
Hi Greg, This is the first of two steps to fix your usb-linus and usb-next trees. As I mentioned, commit4fae6f0fa8
"USB: handle LPM errors during device suspend correctly" was incorrectly added to usb-next when it should have been added to usb-linus and marked for stable. Two port power off bug fixes touch the same code that patch touches, but it's not easy to simply move commit4fae6f0f
patch to usb-linus because commit28e861658e
"USB: refactor code for enabling/disabling remote wakeup" also touched those code sections. I propose a two step process to fix this: 1. Pull these four patches into usb-linus. 2. Revert commit28e861658e
from usb-next. Merge usb-linus into usb-next, and resolve the conflicts. I will be sending pull requests for these steps. This pull request is step two. Sarah Sharp -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABAgAGBQJSDXrSAAoJEBMGWMLi1Gc5ZCQP/0zPv79GEqz0sgRzZGu+WJbr GNGIq9FAeEh+2ssIo1/F5q7gul9wL/Vu0DntM8IH9u/T6AVF01OlXAhzfGR9Iqlb dT36SNVe7G1/wG90c7szfcH3SvAYiwQEFv4bhSeLdDzfgRwV8NHtMUTv+Fc6qsmz +YcVOo5gTJOmOQqfzblVEQWx+XhjacvcM4AYfPjWPar4orMOIzGiPPiHSOv+6N10 /kSgcGyXF/qNdkaxRKhCK8USAxADI7UyAgiuBC9LGkOUwNYEZ85/UA5XFhor9kk9 03gSBmes8IS547jVkEYlDKfeoL0j4Z04OxOJ+OG1aOg4K8IVHpIpYBCBz9fklsfx ym0HPKOjYBAF+9dc6sO4CpAkLVS1tbUuxAoxJt5MD5WTLNZ7jdJAtCDEJoD43Yq/ sPkJdBoq1JJxTiEzUT+KUTQfOB7d22spBpaWdSKvduAnJKy89ZPi/Mnk9jLSklGa SFMzx86pbJL/4aAYxiEHDnbRm8utvco817EcCbO+DtEVK1Y54gY5Wi+eW9aweQnh XV51Q4dp5rMGh2llHjobrISnbWR//Zk1lRvXMg0gHh/9skNqUCYaYQXxhXtilb8Q 5PVEZb/fFsZxHQWYpdWHwMXlHRjcsvguLeZgVHhtzfQqIxZH6jHV+lSIp3Si5jQo zQCP+sYuAs9prVtqETXc =qfOL -----END PGP SIGNATURE----- Merge tag 'for-usb-2013-08-15-step-2' of ra.kernel.org:/pub/scm/linux/kernel/git/sarah/xhci into work-next Sarah writes: xhci: Step 2 to fix usb-linus and usb-next. Hi Greg, This is the first of two steps to fix your usb-linus and usb-next trees. As I mentioned, commit4fae6f0fa8
"USB: handle LPM errors during device suspend correctly" was incorrectly added to usb-next when it should have been added to usb-linus and marked for stable. Two port power off bug fixes touch the same code that patch touches, but it's not easy to simply move commit4fae6f0f
patch to usb-linus because commit28e861658e
"USB: refactor code for enabling/disabling remote wakeup" also touched those code sections. I propose a two step process to fix this: 1. Pull these four patches into usb-linus. 2. Revert commit28e861658e
from usb-next. Merge usb-linus into usb-next, and resolve the conflicts. I will be sending pull requests for these steps. This pull request is step two. Sarah Sharp
This commit is contained in:
commit
4c4e15966d
@ -3054,19 +3054,9 @@ int usb_port_suspend(struct usb_device *udev, pm_message_t msg)
|
||||
usb_set_device_state(udev, USB_STATE_SUSPENDED);
|
||||
}
|
||||
|
||||
/*
|
||||
* Check whether current status meets the requirement of
|
||||
* usb port power off mechanism
|
||||
*/
|
||||
if (status == 0 && !udev->do_remote_wakeup && udev->persist_enabled) {
|
||||
enum pm_qos_flags_status pm_qos_stat;
|
||||
|
||||
pm_qos_stat = dev_pm_qos_flags(&port_dev->dev,
|
||||
PM_QOS_FLAG_NO_POWER_OFF);
|
||||
if (pm_qos_stat != PM_QOS_FLAGS_ALL) {
|
||||
pm_runtime_put_sync(&port_dev->dev);
|
||||
port_dev->did_runtime_put = true;
|
||||
}
|
||||
pm_runtime_put_sync(&port_dev->dev);
|
||||
port_dev->did_runtime_put = true;
|
||||
}
|
||||
|
||||
usb_mark_last_busy(hub->hdev);
|
||||
|
@ -89,22 +89,19 @@ static int usb_port_runtime_resume(struct device *dev)
|
||||
retval = usb_hub_set_port_power(hdev, hub, port1, true);
|
||||
if (port_dev->child && !retval) {
|
||||
/*
|
||||
* Wait for usb hub port to be reconnected in order to make
|
||||
* the resume procedure successful.
|
||||
* Attempt to wait for usb hub port to be reconnected in order
|
||||
* to make the resume procedure successful. The device may have
|
||||
* disconnected while the port was powered off, so ignore the
|
||||
* return status.
|
||||
*/
|
||||
retval = hub_port_debounce_be_connected(hub, port1);
|
||||
if (retval < 0) {
|
||||
if (retval < 0)
|
||||
dev_dbg(&port_dev->dev, "can't get reconnection after setting port power on, status %d\n",
|
||||
retval);
|
||||
goto out;
|
||||
}
|
||||
usb_clear_port_feature(hdev, port1, USB_PORT_FEAT_C_ENABLE);
|
||||
|
||||
/* Set return value to 0 if debounce successful */
|
||||
retval = 0;
|
||||
}
|
||||
|
||||
out:
|
||||
clear_bit(port1, hub->busy_bits);
|
||||
usb_autopm_put_interface(intf);
|
||||
return retval;
|
||||
|
@ -26,7 +26,7 @@ static void xhci_plat_quirks(struct device *dev, struct xhci_hcd *xhci)
|
||||
* here that the generic code does not try to make a pci_dev from our
|
||||
* dev struct in order to setup MSI
|
||||
*/
|
||||
xhci->quirks |= XHCI_BROKEN_MSI;
|
||||
xhci->quirks |= XHCI_PLAT;
|
||||
}
|
||||
|
||||
/* called during probe() after chip reset completes */
|
||||
|
@ -348,9 +348,14 @@ static void __maybe_unused xhci_msix_sync_irqs(struct xhci_hcd *xhci)
|
||||
static int xhci_try_enable_msi(struct usb_hcd *hcd)
|
||||
{
|
||||
struct xhci_hcd *xhci = hcd_to_xhci(hcd);
|
||||
struct pci_dev *pdev = to_pci_dev(xhci_to_hcd(xhci)->self.controller);
|
||||
struct pci_dev *pdev;
|
||||
int ret;
|
||||
|
||||
/* The xhci platform device has set up IRQs through usb_add_hcd. */
|
||||
if (xhci->quirks & XHCI_PLAT)
|
||||
return 0;
|
||||
|
||||
pdev = to_pci_dev(xhci_to_hcd(xhci)->self.controller);
|
||||
/*
|
||||
* Some Fresco Logic host controllers advertise MSI, but fail to
|
||||
* generate interrupts. Don't even try to enable MSI.
|
||||
|
@ -1537,6 +1537,7 @@ struct xhci_hcd {
|
||||
#define XHCI_SPURIOUS_REBOOT (1 << 13)
|
||||
#define XHCI_COMP_MODE_QUIRK (1 << 14)
|
||||
#define XHCI_AVOID_BEI (1 << 15)
|
||||
#define XHCI_PLAT (1 << 16)
|
||||
unsigned int num_active_eps;
|
||||
unsigned int limit_active_eps;
|
||||
/* There are two roothubs to keep track of bus suspend info for */
|
||||
|
Loading…
Reference in New Issue
Block a user