Commit 76a0f32b authored by Mathias Nyman's avatar Mathias Nyman Committed by Greg Kroah-Hartman

xhci: rename temp and temp1 variables

temp and temp1 variables are used for port status (portsc) and
command register. Give them more descriptive names

No functional changes
Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2e77a825
...@@ -1572,7 +1572,7 @@ static void handle_port_status(struct xhci_hcd *xhci, ...@@ -1572,7 +1572,7 @@ static void handle_port_status(struct xhci_hcd *xhci,
{ {
struct usb_hcd *hcd; struct usb_hcd *hcd;
u32 port_id; u32 port_id;
u32 temp, temp1; u32 portsc, cmd_reg;
int max_ports; int max_ports;
int slot_id; int slot_id;
unsigned int faked_port_index; unsigned int faked_port_index;
...@@ -1636,26 +1636,26 @@ static void handle_port_status(struct xhci_hcd *xhci, ...@@ -1636,26 +1636,26 @@ static void handle_port_status(struct xhci_hcd *xhci,
/* Find the faked port hub number */ /* Find the faked port hub number */
faked_port_index = find_faked_portnum_from_hw_portnum(hcd, xhci, faked_port_index = find_faked_portnum_from_hw_portnum(hcd, xhci,
port_id); port_id);
portsc = readl(port_array[faked_port_index]);
temp = readl(port_array[faked_port_index]);
if (hcd->state == HC_STATE_SUSPENDED) { if (hcd->state == HC_STATE_SUSPENDED) {
xhci_dbg(xhci, "resume root hub\n"); xhci_dbg(xhci, "resume root hub\n");
usb_hcd_resume_root_hub(hcd); usb_hcd_resume_root_hub(hcd);
} }
if (hcd->speed >= HCD_USB3 && (temp & PORT_PLS_MASK) == XDEV_INACTIVE) if (hcd->speed >= HCD_USB3 && (portsc & PORT_PLS_MASK) == XDEV_INACTIVE)
bus_state->port_remote_wakeup &= ~(1 << faked_port_index); bus_state->port_remote_wakeup &= ~(1 << faked_port_index);
if ((temp & PORT_PLC) && (temp & PORT_PLS_MASK) == XDEV_RESUME) { if ((portsc & PORT_PLC) && (portsc & PORT_PLS_MASK) == XDEV_RESUME) {
xhci_dbg(xhci, "port resume event for port %d\n", port_id); xhci_dbg(xhci, "port resume event for port %d\n", port_id);
temp1 = readl(&xhci->op_regs->command); cmd_reg = readl(&xhci->op_regs->command);
if (!(temp1 & CMD_RUN)) { if (!(cmd_reg & CMD_RUN)) {
xhci_warn(xhci, "xHC is not running.\n"); xhci_warn(xhci, "xHC is not running.\n");
goto cleanup; goto cleanup;
} }
if (DEV_SUPERSPEED_ANY(temp)) { if (DEV_SUPERSPEED_ANY(portsc)) {
xhci_dbg(xhci, "remote wake SS port %d\n", port_id); xhci_dbg(xhci, "remote wake SS port %d\n", port_id);
/* Set a flag to say the port signaled remote wakeup, /* Set a flag to say the port signaled remote wakeup,
* so we can tell the difference between the end of * so we can tell the difference between the end of
...@@ -1683,8 +1683,8 @@ static void handle_port_status(struct xhci_hcd *xhci, ...@@ -1683,8 +1683,8 @@ static void handle_port_status(struct xhci_hcd *xhci,
} }
} }
if ((temp & PORT_PLC) && (temp & PORT_PLS_MASK) == XDEV_U0 && if ((portsc & PORT_PLC) && (portsc & PORT_PLS_MASK) == XDEV_U0 &&
DEV_SUPERSPEED_ANY(temp)) { DEV_SUPERSPEED_ANY(portsc)) {
xhci_dbg(xhci, "resume SS port %d finished\n", port_id); xhci_dbg(xhci, "resume SS port %d finished\n", port_id);
/* We've just brought the device into U0 through either the /* We've just brought the device into U0 through either the
* Resume state after a device remote wakeup, or through the * Resume state after a device remote wakeup, or through the
...@@ -1714,7 +1714,7 @@ static void handle_port_status(struct xhci_hcd *xhci, ...@@ -1714,7 +1714,7 @@ static void handle_port_status(struct xhci_hcd *xhci,
* RExit to a disconnect state). If so, let the the driver know it's * RExit to a disconnect state). If so, let the the driver know it's
* out of the RExit state. * out of the RExit state.
*/ */
if (!DEV_SUPERSPEED_ANY(temp) && if (!DEV_SUPERSPEED_ANY(portsc) &&
test_and_clear_bit(faked_port_index, test_and_clear_bit(faked_port_index,
&bus_state->rexit_ports)) { &bus_state->rexit_ports)) {
complete(&bus_state->rexit_done[faked_port_index]); complete(&bus_state->rexit_done[faked_port_index]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment