|
@@ -1572,7 +1572,7 @@ static void handle_port_status(struct xhci_hcd *xhci,
|
|
|
{
|
|
|
struct usb_hcd *hcd;
|
|
|
u32 port_id;
|
|
|
- u32 temp, temp1;
|
|
|
+ u32 portsc, cmd_reg;
|
|
|
int max_ports;
|
|
|
int slot_id;
|
|
|
unsigned int faked_port_index;
|
|
@@ -1636,26 +1636,26 @@ static void handle_port_status(struct xhci_hcd *xhci,
|
|
|
/* Find the faked port hub number */
|
|
|
faked_port_index = find_faked_portnum_from_hw_portnum(hcd, xhci,
|
|
|
port_id);
|
|
|
+ portsc = readl(port_array[faked_port_index]);
|
|
|
|
|
|
- temp = readl(port_array[faked_port_index]);
|
|
|
if (hcd->state == HC_STATE_SUSPENDED) {
|
|
|
xhci_dbg(xhci, "resume root hub\n");
|
|
|
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);
|
|
|
|
|
|
- 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);
|
|
|
|
|
|
- temp1 = readl(&xhci->op_regs->command);
|
|
|
- if (!(temp1 & CMD_RUN)) {
|
|
|
+ cmd_reg = readl(&xhci->op_regs->command);
|
|
|
+ if (!(cmd_reg & CMD_RUN)) {
|
|
|
xhci_warn(xhci, "xHC is not running.\n");
|
|
|
goto cleanup;
|
|
|
}
|
|
|
|
|
|
- if (DEV_SUPERSPEED_ANY(temp)) {
|
|
|
+ if (DEV_SUPERSPEED_ANY(portsc)) {
|
|
|
xhci_dbg(xhci, "remote wake SS port %d\n", port_id);
|
|
|
/* Set a flag to say the port signaled remote wakeup,
|
|
|
* so we can tell the difference between the end of
|
|
@@ -1683,8 +1683,8 @@ static void handle_port_status(struct xhci_hcd *xhci,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if ((temp & PORT_PLC) && (temp & PORT_PLS_MASK) == XDEV_U0 &&
|
|
|
- DEV_SUPERSPEED_ANY(temp)) {
|
|
|
+ if ((portsc & PORT_PLC) && (portsc & PORT_PLS_MASK) == XDEV_U0 &&
|
|
|
+ DEV_SUPERSPEED_ANY(portsc)) {
|
|
|
xhci_dbg(xhci, "resume SS port %d finished\n", port_id);
|
|
|
/* We've just brought the device into U0 through either the
|
|
|
* Resume state after a device remote wakeup, or through the
|
|
@@ -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
|
|
|
* out of the RExit state.
|
|
|
*/
|
|
|
- if (!DEV_SUPERSPEED_ANY(temp) &&
|
|
|
+ if (!DEV_SUPERSPEED_ANY(portsc) &&
|
|
|
test_and_clear_bit(faked_port_index,
|
|
|
&bus_state->rexit_ports)) {
|
|
|
complete(&bus_state->rexit_done[faked_port_index]);
|