Re: [PATCHv2] USB: EHCI: Fix test mode sequence

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

Boris Todorov wrote:

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@xxxxxxxxx>
---
 drivers/usb/host/ehci-hub.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
index ea6184b..4b513e4 100644
--- a/drivers/usb/host/ehci-hub.c
+++ b/drivers/usb/host/ehci-hub.c
[...]
@@ -1120,6 +1121,18 @@ static int ehci_hub_control (
 			if (!selector || selector > 5)
 				goto error;
 			ehci_quiesce(ehci);
+			/* put all enabled ports in suspend */
+			while(ports--) {

   Need a space after *while*. Have you run your patch thru scripts/checkpatch.pl?

+				port_sreg = &ehci->regs->port_status[ports];
+
+				/* first check if port is enabled
+				 * else results are undefined (according spec)
+				 */
+				if(ehci_readl(ehci, port_sreg) & PORT_PE)

   Need a space after *if*.

+					ehci_writel(ehci,
+						ehci_readl(ehci, port_sreg)|PORT_SUSPEND,

   The kernel style generally assumes spaces around operators.

WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux