mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 03:50:24 +09:00
Revert "xhci: track port suspend state correctly in unsuccessful resume cases"
This reverts commit6538b6d13cwhich is commitd7cdfc319bupstream. It breaks the Android kernel abi and can be brought back in the future in an abi-safe way if it is really needed. Bug: 161946584 Change-Id: Idab0edccdf4d6b57fddcca069ad44a8381befa48 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -1043,19 +1043,19 @@ static void xhci_get_usb3_port_status(struct xhci_port *port, u32 *status,
|
||||
*status |= USB_PORT_STAT_C_CONFIG_ERROR << 16;
|
||||
|
||||
/* USB3 specific wPortStatus bits */
|
||||
if (portsc & PORT_POWER)
|
||||
if (portsc & PORT_POWER) {
|
||||
*status |= USB_SS_PORT_STAT_POWER;
|
||||
/* link state handling */
|
||||
if (link_state == XDEV_U0)
|
||||
bus_state->suspended_ports &= ~(1 << portnum);
|
||||
}
|
||||
|
||||
/* no longer suspended or resuming */
|
||||
if (link_state != XDEV_U3 &&
|
||||
/* remote wake resume signaling complete */
|
||||
if (bus_state->port_remote_wakeup & (1 << portnum) &&
|
||||
link_state != XDEV_RESUME &&
|
||||
link_state != XDEV_RECOVERY) {
|
||||
/* remote wake resume signaling complete */
|
||||
if (bus_state->port_remote_wakeup & (1 << portnum)) {
|
||||
bus_state->port_remote_wakeup &= ~(1 << portnum);
|
||||
usb_hcd_end_port_resume(&hcd->self, portnum);
|
||||
}
|
||||
bus_state->suspended_ports &= ~(1 << portnum);
|
||||
bus_state->port_remote_wakeup &= ~(1 << portnum);
|
||||
usb_hcd_end_port_resume(&hcd->self, portnum);
|
||||
}
|
||||
|
||||
xhci_hub_report_usb3_link_state(xhci, status, portsc);
|
||||
@@ -1112,7 +1112,6 @@ static void xhci_get_usb2_port_status(struct xhci_port *port, u32 *status,
|
||||
usb_hcd_end_port_resume(&port->rhub->hcd->self, portnum);
|
||||
}
|
||||
port->rexit_active = 0;
|
||||
bus_state->suspended_ports &= ~(1 << portnum);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user