summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-hub.c
diff options
context:
space:
mode:
authorLinus Torvalds2011-02-10 21:20:40 +0100
committerLinus Torvalds2011-02-10 21:20:40 +0100
commit67d019528e5c2693145217cf18a507689980d2a4 (patch)
tree77191261468d37b069009887c1ab11afd93e2952 /drivers/usb/host/ehci-hub.c
parentMerge branch 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gre... (diff)
parentUSB: cdc-acm: Adding second ACM channel support for Nokia N8 (diff)
downloadkernel-qcow2-linux-67d019528e5c2693145217cf18a507689980d2a4.tar.gz
kernel-qcow2-linux-67d019528e5c2693145217cf18a507689980d2a4.tar.xz
kernel-qcow2-linux-67d019528e5c2693145217cf18a507689980d2a4.zip
Merge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (21 commits) USB: cdc-acm: Adding second ACM channel support for Nokia N8 USB, Mass Storage, composite, gadget: Fix build failure and memset of a struct USB: Fix trout build failure with ci13xxx_msm gadget USB: EHCI: fix scheduling while atomic during suspend USB: usb-storage: unusual_devs entry for Coby MP3 player USB: ftdi_sio: Add VID=0x0647, PID=0x0100 for Acton Research spectrograph USB: fix race between root-hub resume and wakeup requests USB: prevent buggy hubs from crashing the USB stack usb: r8a66597-udc: Fixed bufnum of Bulk USB: ftdi_sio: add ST Micro Connect Lite uart support USB: Storage: Add unusual_devs entry for VTech Kidizoom USB SL811HS HCD: Fix memory leak in sl811h_urb_enqueue() USB: ti_usb: fix module removal USB: io_edgeport: fix the reported firmware major and minor usb: ehci-omap: Show fatal probing time errors to end user usb: musb: introduce api for dma code to check compatibility with usb request usb: musb: maintain three states for buffer mappings instead of two usb: musb: disable double buffering when it's broken usb: musb: hsdma: change back to use musb_read/writew usb: musb: core: fix IRQ check ...
Diffstat (limited to 'drivers/usb/host/ehci-hub.c')
-rw-r--r--drivers/usb/host/ehci-hub.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
index 796ea0c8900f..8a515f0d5988 100644
--- a/drivers/usb/host/ehci-hub.c
+++ b/drivers/usb/host/ehci-hub.c
@@ -111,6 +111,7 @@ static void ehci_adjust_port_wakeup_flags(struct ehci_hcd *ehci,
{
int port;
u32 temp;
+ unsigned long flags;
/* If remote wakeup is enabled for the root hub but disabled
* for the controller, we must adjust all the port wakeup flags
@@ -120,6 +121,8 @@ static void ehci_adjust_port_wakeup_flags(struct ehci_hcd *ehci,
if (!ehci_to_hcd(ehci)->self.root_hub->do_remote_wakeup || do_wakeup)
return;
+ spin_lock_irqsave(&ehci->lock, flags);
+
/* clear phy low-power mode before changing wakeup flags */
if (ehci->has_hostpc) {
port = HCS_N_PORTS(ehci->hcs_params);
@@ -131,7 +134,9 @@ static void ehci_adjust_port_wakeup_flags(struct ehci_hcd *ehci,
temp = ehci_readl(ehci, hostpc_reg);
ehci_writel(ehci, temp & ~HOSTPC_PHCD, hostpc_reg);
}
+ spin_unlock_irqrestore(&ehci->lock, flags);
msleep(5);
+ spin_lock_irqsave(&ehci->lock, flags);
}
port = HCS_N_PORTS(ehci->hcs_params);
@@ -170,6 +175,8 @@ static void ehci_adjust_port_wakeup_flags(struct ehci_hcd *ehci,
/* Does the root hub have a port wakeup pending? */
if (!suspending && (ehci_readl(ehci, &ehci->regs->status) & STS_PCD))
usb_hcd_resume_root_hub(ehci_to_hcd(ehci));
+
+ spin_unlock_irqrestore(&ehci->lock, flags);
}
static int ehci_bus_suspend (struct usb_hcd *hcd)