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.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41690 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz 2011-05-23 21:53:12 +00:00
parent fe81732aca
commit c05a3fa6a7

View File

@ -552,9 +552,14 @@ EHCI::Start()
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)