Author: mmlr Date: 2011-05-23 23:53:12 +0200 (Mon, 23 May 2011) New Revision: 41690 Changeset: https://dev.haiku-os.org/changeset/41690 Ticket: https://dev.haiku-os.org/ticket/5551 Modified: haiku/trunk/src/add-ons/kernel/busses/usb/ehci.cpp Log: We obviously need to mask off the interrupt threshold value before overwriting it with our new setting. Otherwise we might end up with an illegal value as the interrupt threshold which might inhibit interrupt generation alltogether depending on the controller implementation. This was the case for the ATI/AMD SBx00 chipsets. Therefore fixes #5551. Modified: haiku/trunk/src/add-ons/kernel/busses/usb/ehci.cpp =================================================================== --- haiku/trunk/src/add-ons/kernel/busses/usb/ehci.cpp 2011-05-23 21:48:40 UTC (rev 41689) +++ haiku/trunk/src/add-ons/kernel/busses/usb/ehci.cpp 2011-05-23 21:53:12 UTC (rev 41690) @@ -552,9 +552,14 @@ bool hasPerPortChangeEvent = (ReadCapReg32(EHCI_HCCPARAMS) & EHCI_HCCPARAMS_PPCEC) != 0; - uint32 frameListSize = (ReadOpReg(EHCI_USBCMD) >> EHCI_USBCMD_FLS_SHIFT) + + uint32 config = ReadOpReg(EHCI_USBCMD); + config &= ~((EHCI_USBCMD_ITC_MASK << EHCI_USBCMD_ITC_SHIFT) + | EHCI_USBCMD_PPCEE); + uint32 frameListSize = (config >> EHCI_USBCMD_FLS_SHIFT) & EHCI_USBCMD_FLS_MASK; - WriteOpReg(EHCI_USBCMD, ReadOpReg(EHCI_USBCMD) | EHCI_USBCMD_RUNSTOP + + WriteOpReg(EHCI_USBCMD, config | EHCI_USBCMD_RUNSTOP | (hasPerPortChangeEvent ? EHCI_USBCMD_PPCEE : 0) | EHCI_USBCMD_ASENABLE | EHCI_USBCMD_PSENABLE | (frameListSize << EHCI_USBCMD_FLS_SHIFT)