From cca52e798798962b4a733a1afc8925dae8ff5729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Sun, 22 May 2011 18:43:29 +0000 Subject: [PATCH] ehci usb driver: * make sure the PortEnable bit is disabled (specification page 28) * 250ms is too long: USB 2.0 specifies only 50ms. This prevented one of my devices to be detected. +alpha git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41658 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/busses/usb/ehci.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/add-ons/kernel/busses/usb/ehci.cpp b/src/add-ons/kernel/busses/usb/ehci.cpp index 21345b910e..b1ec9e57c8 100644 --- a/src/add-ons/kernel/busses/usb/ehci.cpp +++ b/src/add-ons/kernel/busses/usb/ehci.cpp @@ -1043,8 +1043,9 @@ EHCI::ResetPort(uint8 index) } // enable reset signaling - WriteOpReg(portRegister, portStatus | EHCI_PORTSC_PORTRESET); - snooze(250000); + WriteOpReg(portRegister, (portStatus & ~EHCI_PORTSC_ENABLE) + | EHCI_PORTSC_PORTRESET); + snooze(50000); // disable reset signaling portStatus = ReadOpReg(portRegister) & EHCI_PORTSC_DATAMASK;