lkml.org 
[lkml]   [2011]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[164/262] USB: EHCI: Fix test mode sequence
    3.0-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Boris Todorov <boris.st.todorov@gmail.com>

    commit 77636c86a600b83de01719efad83567e46d7e8ce upstream.

    The sequence to put port in test mode is not complete.
    According EHCI specification all enabled ports must be
    put in suspend.

    Signed-off-by: Boris Todorov <boris.st.todorov@gmail.com>
    Acked-by: Alan Stern <stern@rowland.harvard.edu>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    drivers/usb/host/ehci-hub.c | 12 ++++++++++++
    1 file changed, 12 insertions(+)

    --- a/drivers/usb/host/ehci-hub.c
    +++ b/drivers/usb/host/ehci-hub.c
    @@ -1120,7 +1120,19 @@ static int ehci_hub_control (
    if (!selector || selector > 5)
    goto error;
    ehci_quiesce(ehci);
    +
    + /* Put all enabled ports into suspend */
    + while (ports--) {
    + u32 __iomem *sreg =
    + &ehci->regs->port_status[ports];
    +
    + temp = ehci_readl(ehci, sreg) & ~PORT_RWC_BITS;
    + if (temp & PORT_PE)
    + ehci_writel(ehci, temp | PORT_SUSPEND,
    + sreg);
    + }
    ehci_halt(ehci);
    + temp = ehci_readl(ehci, status_reg);
    temp |= selector << 16;
    ehci_writel(ehci, temp, status_reg);
    break;



    \
     
     \ /
      Last update: 2011-11-10 06:05    [W:4.138 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site