aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-hub.c
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2009-08-20 16:39:54 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-23 09:46:38 -0400
commit8d053c79f22462f55c02c8083580730b922cf7b4 (patch)
tree2b29c3219fec7cb622af6ffba69c8eb21650c662 /drivers/usb/host/ehci-hub.c
parent917778267fbe67703ab7d5c6f0b7a05d4c3df485 (diff)
USB: ehci-dbgp,ehci: Allow early or late use of the dbgp device
If the EHCI debug port is initialized and in use, the EHCI host controller driver must follow two rules. 1) If the EHCI host driver issues a controller reset, the debug controller driver re-initialization must get called after the reset is completed. 2) The EHCI host driver should ignore any requests to the physical EHCI debug port when the EHCI debug port is in use. The code to check for the debug port was moved from ehci_pci_reinit() to ehci_pci_setup because it must get called prior to ehci_reset() which will clear the debug port registers. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: dbrownell@users.sourceforge.net Cc: Ingo Molnar <mingo@elte.hu> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Yinghai Lu <yinghai@kernel.org> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ehci-hub.c')
-rw-r--r--drivers/usb/host/ehci-hub.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
index 818647c33da8..6b5e4d18d4bf 100644
--- a/drivers/usb/host/ehci-hub.c
+++ b/drivers/usb/host/ehci-hub.c
@@ -855,6 +855,15 @@ static int ehci_hub_control (
855 case SetPortFeature: 855 case SetPortFeature:
856 selector = wIndex >> 8; 856 selector = wIndex >> 8;
857 wIndex &= 0xff; 857 wIndex &= 0xff;
858 if (unlikely(ehci->debug)) {
859 /* If the debug port is active any port
860 * feature requests should get denied */
861 if (wIndex == HCS_DEBUG_PORT(ehci->hcs_params) &&
862 (readl(&ehci->debug->control) & DBGP_ENABLED)) {
863 retval = -ENODEV;
864 goto error_exit;
865 }
866 }
858 if (!wIndex || wIndex > ports) 867 if (!wIndex || wIndex > ports)
859 goto error; 868 goto error;
860 wIndex--; 869 wIndex--;
@@ -951,6 +960,7 @@ error:
951 /* "stall" on error */ 960 /* "stall" on error */
952 retval = -EPIPE; 961 retval = -EPIPE;
953 } 962 }
963error_exit:
954 spin_unlock_irqrestore (&ehci->lock, flags); 964 spin_unlock_irqrestore (&ehci->lock, flags);
955 return retval; 965 return retval;
956} 966}