Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 25754
b: refs/heads/master
c: 8e32640
h: refs/heads/master
v: v3
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Apr 14, 2006
1 parent 5dab2c5 commit 3b425b0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 01e89506351b84ac6f39eb70f99c71483768ca60
refs/heads/master: 8e32640672bdcb01e0d83f087f09dd65fcbc3275
3 changes: 1 addition & 2 deletions trunk/drivers/usb/host/uhci-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,7 @@ static void finish_reset(struct uhci_hcd *uhci)
for (port = 0; port < uhci->rh_numports; ++port)
outw(0, uhci->io_addr + USBPORTSC1 + (port * 2));

uhci->port_c_suspend = uhci->suspended_ports =
uhci->resuming_ports = 0;
uhci->port_c_suspend = uhci->resuming_ports = 0;
uhci->rh_state = UHCI_RH_RESET;
uhci->is_stopped = UHCI_IS_STOPPED;
uhci_to_hcd(uhci)->state = HC_STATE_HALT;
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/usb/host/uhci-hcd.h
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,6 @@ struct uhci_hcd {

/* Support for port suspend/resume/reset */
unsigned long port_c_suspend; /* Bit-arrays of ports */
unsigned long suspended_ports;
unsigned long resuming_ports;
unsigned long ports_timeout; /* Time to stop signalling */

Expand Down
18 changes: 9 additions & 9 deletions trunk/drivers/usb/host/uhci-hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,18 @@ static void uhci_finish_suspend(struct uhci_hcd *uhci, int port,
{
int status;

if (test_bit(port, &uhci->suspended_ports)) {
if (inw(port_addr) & (USBPORTSC_SUSP | USBPORTSC_RD)) {
CLR_RH_PORTSTAT(USBPORTSC_SUSP | USBPORTSC_RD);
clear_bit(port, &uhci->suspended_ports);
clear_bit(port, &uhci->resuming_ports);
set_bit(port, &uhci->port_c_suspend);
if (test_bit(port, &uhci->resuming_ports))
set_bit(port, &uhci->port_c_suspend);

/* The controller won't actually turn off the RD bit until
* it has had a chance to send a low-speed EOP sequence,
* which takes 3 bit times (= 2 microseconds). We'll delay
* slightly longer for good luck. */
udelay(4);
}
clear_bit(port, &uhci->resuming_ports);
}

/* Wait for the UHCI controller in HP's iLO2 server management chip.
Expand Down Expand Up @@ -265,8 +265,6 @@ static int uhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
wPortChange |= USB_PORT_STAT_C_SUSPEND;
lstatus |= 1;
}
if (test_bit(port, &uhci->suspended_ports))
lstatus |= 2;
if (test_bit(port, &uhci->resuming_ports))
lstatus |= 4;

Expand Down Expand Up @@ -309,7 +307,6 @@ static int uhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,

switch (wValue) {
case USB_PORT_FEAT_SUSPEND:
set_bit(port, &uhci->suspended_ports);
SET_RH_PORTSTAT(USBPORTSC_SUSP);
OK(0);
case USB_PORT_FEAT_RESET:
Expand Down Expand Up @@ -343,8 +340,11 @@ static int uhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
CLR_RH_PORTSTAT(USBPORTSC_PEC);
OK(0);
case USB_PORT_FEAT_SUSPEND:
if (test_bit(port, &uhci->suspended_ports) &&
!test_and_set_bit(port,
if (!(inw(port_addr) & USBPORTSC_SUSP)) {

/* Make certain the port isn't suspended */
uhci_finish_suspend(uhci, port, port_addr);
} else if (!test_and_set_bit(port,
&uhci->resuming_ports)) {
SET_RH_PORTSTAT(USBPORTSC_RD);

Expand Down

0 comments on commit 3b425b0

Please sign in to comment.