summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci-hub.c
diff options
context:
space:
mode:
authorMathias Nyman <mathias.nyman@linux.intel.com>2023-02-02 16:05:03 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-02-02 16:44:42 +0100
commita909d629ae77b97b6288bc3cfe68560454bf79c6 (patch)
tree4d7ec6e15e2d628d0e3131a098c544ef51192030 /drivers/usb/host/xhci-hub.c
parentxhci: Pass port structure as parameter to xhci_disable_port(). (diff)
downloadlinux-a909d629ae77b97b6288bc3cfe68560454bf79c6.tar.xz
linux-a909d629ae77b97b6288bc3cfe68560454bf79c6.zip
xhci: rename resume_done to resume_timestamp
resume_done is just a timestamp, avoid confusing it with completions related to port state transitions that are named *_done Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/r/20230202150505.618915-10-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/xhci-hub.c')
-rw-r--r--drivers/usb/host/xhci-hub.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
index b27969e3cdcf..a2053aa9b4a9 100644
--- a/drivers/usb/host/xhci-hub.c
+++ b/drivers/usb/host/xhci-hub.c
@@ -943,7 +943,7 @@ static int xhci_handle_usb2_port_link_resume(struct xhci_port *port,
return -EINVAL;
}
/* did port event handler already start resume timing? */
- if (!port->resume_done) {
+ if (!port->resume_timestamp) {
/* If not, maybe we are in a host initated resume? */
if (test_bit(wIndex, &bus_state->resuming_ports)) {
/* Host initated resume doesn't time the resume
@@ -960,18 +960,18 @@ static int xhci_handle_usb2_port_link_resume(struct xhci_port *port,
msecs_to_jiffies(USB_RESUME_TIMEOUT);
set_bit(wIndex, &bus_state->resuming_ports);
- port->resume_done = timeout;
+ port->resume_timestamp = timeout;
mod_timer(&hcd->rh_timer, timeout);
usb_hcd_start_port_resume(&hcd->self, wIndex);
}
/* Has resume been signalled for USB_RESUME_TIME yet? */
- } else if (time_after_eq(jiffies, port->resume_done)) {
+ } else if (time_after_eq(jiffies, port->resume_timestamp)) {
int time_left;
xhci_dbg(xhci, "resume USB2 port %d-%d\n",
hcd->self.busnum, wIndex + 1);
- port->resume_done = 0;
+ port->resume_timestamp = 0;
clear_bit(wIndex, &bus_state->resuming_ports);
port->rexit_active = true;
@@ -1106,10 +1106,10 @@ static void xhci_get_usb2_port_status(struct xhci_port *port, u32 *status,
if (link_state == XDEV_U2)
*status |= USB_PORT_STAT_L1;
if (link_state == XDEV_U0) {
- if (port->resume_done)
+ if (port->resume_timestamp)
usb_hcd_end_port_resume(&port->rhub->hcd->self,
portnum);
- port->resume_done = 0;
+ port->resume_timestamp = 0;
clear_bit(portnum, &bus_state->resuming_ports);
if (bus_state->suspended_ports & (1 << portnum)) {
bus_state->suspended_ports &= ~(1 << portnum);
@@ -1181,11 +1181,11 @@ static u32 xhci_get_port_status(struct usb_hcd *hcd,
* Clear stale usb2 resume signalling variables in case port changed
* state during resume signalling. For example on error
*/
- if ((port->resume_done ||
+ if ((port->resume_timestamp ||
test_bit(wIndex, &bus_state->resuming_ports)) &&
(raw_port_status & PORT_PLS_MASK) != XDEV_U3 &&
(raw_port_status & PORT_PLS_MASK) != XDEV_RESUME) {
- port->resume_done = 0;
+ port->resume_timestamp = 0;
clear_bit(wIndex, &bus_state->resuming_ports);
usb_hcd_end_port_resume(&hcd->self, wIndex);
}
@@ -1693,8 +1693,8 @@ int xhci_hub_status_data(struct usb_hcd *hcd, char *buf)
if ((temp & mask) != 0 ||
(bus_state->port_c_suspend & 1 << i) ||
- (ports[i]->resume_done && time_after_eq(
- jiffies, ports[i]->resume_done))) {
+ (ports[i]->resume_timestamp && time_after_eq(
+ jiffies, ports[i]->resume_timestamp))) {
buf[(i + 1) / 8] |= 1 << (i + 1) % 8;
status = 1;
}