Contribute
Register

CustoMac Desktop USB Fixes - 10.11+ Reference

Unfortunately I'm still experiencing occasional USB weirdness even after applying all the usual fixes. USB devices will not be recognized on insertion, will stick after ejection, be recognized as USB2 while being USB3 etc. I posted my config etc in Forums/Post Installation/General Help on May,1 asking for help but got no replies. Rehabman? VoiletDragon? Could you have a look?
Main culprits are my front USB ports, HS/SS07 and HS/SS08.
 
Unfortunately I'm still experiencing occasional USB weirdness even after applying all the usual fixes. USB devices will not be recognized on insertion, will stick after ejection, be recognized as USB2 while being USB3 etc. I posted my config etc in Forums/Post Installation/General Help on May,1 asking for help but got no replies. Rehabman? VoiletDragon? Could you have a look?
Main culprits are my front USB ports, HS/SS07 and HS/SS08.

Read FAQ, "Problem Reporting"
https://www.tonymacx86.com/threads/faq-read-first-laptop-frequent-questions.164990/
 
Incorrect. Series 8, 9 and 100 has no USB 2 it is routed through XHCI Controller.
Yes it seems you are right. I stuck a bluetooth dongle on one of the internal USB 2 headers on an MSI H81i and it does indeed come under the XHC. The Gigabyte H81 board i was using has an option in the firmware settings to route or not the USB 2 to XHC but i never used the headers.

Whether or not the EHCI gets used looks firmware controlled.

There is this in coreboot.

Code:
/* Route all ports to XHCI controller */
void usb_xhci_route_all(void)
{
    u32 port_mask, route;
    u16 reg16;

    /* Skip if EHCI is already disabled */
    if (RCBA32(FD) & PCH_DISABLE_EHCI1)
        return;

    /* Set D0 state */
    reg16 = pci_read_config16(PCH_XHCI_DEV, XHCI_PWR_CTL_STS);
    reg16 &= ~PWR_CTL_SET_MASK;
    reg16 |= PWR_CTL_SET_D0;
    pci_write_config16(PCH_XHCI_DEV, XHCI_PWR_CTL_STS, reg16);

    /* Set USB3 superspeed enable */
    port_mask = pci_read_config32(PCH_XHCI_DEV, XHCI_USB3PRM);
    route = pci_read_config32(PCH_XHCI_DEV, XHCI_USB3PR);
    route &= ~XHCI_USB3PR_SSEN;
    route |= XHCI_USB3PR_SSEN & port_mask;
    pci_write_config32(PCH_XHCI_DEV, XHCI_USB3PR, route);

    /* Route USB2 ports to XHCI controller */
    port_mask = pci_read_config32(PCH_XHCI_DEV, XHCI_USB2PRM);
    route = pci_read_config32(PCH_XHCI_DEV, XHCI_USB2PR);
    route &= ~XHCI_USB2PR_HCSEL;
    route |= XHCI_USB2PR_HCSEL & port_mask;
    pci_write_config32(PCH_XHCI_DEV, XHCI_USB2PR, route);

    /* Disable EHCI controller */
    usb_ehci_disable(PCH_EHCI1_DEV);

    /* LynxPoint-H has a second EHCI controller */
    if (!pch_is_lp())
        usb_ehci_disable(PCH_EHCI2_DEV);

    /* Reset and clear port change status */
    usb_xhci_reset_usb3(PCH_XHCI_DEV, 1);
}
 
Yes it seems you are right. I stuck a bluetooth dongle on one of the internal USB 2 headers on an MSI H81i and it does indeed come under the XHC. The Gigabyte H81 board i was using has an option in the firmware settings to route or not the USB 2 to XHC but i never used the headers.

Whether or not the EHCI gets used looks firmware controlled.

There is this in coreboot.

Code:
/* Route all ports to XHCI controller */
void usb_xhci_route_all(void)
{
    u32 port_mask, route;
    u16 reg16;

    /* Skip if EHCI is already disabled */
    if (RCBA32(FD) & PCH_DISABLE_EHCI1)
        return;

    /* Set D0 state */
    reg16 = pci_read_config16(PCH_XHCI_DEV, XHCI_PWR_CTL_STS);
    reg16 &= ~PWR_CTL_SET_MASK;
    reg16 |= PWR_CTL_SET_D0;
    pci_write_config16(PCH_XHCI_DEV, XHCI_PWR_CTL_STS, reg16);

    /* Set USB3 superspeed enable */
    port_mask = pci_read_config32(PCH_XHCI_DEV, XHCI_USB3PRM);
    route = pci_read_config32(PCH_XHCI_DEV, XHCI_USB3PR);
    route &= ~XHCI_USB3PR_SSEN;
    route |= XHCI_USB3PR_SSEN & port_mask;
    pci_write_config32(PCH_XHCI_DEV, XHCI_USB3PR, route);

    /* Route USB2 ports to XHCI controller */
    port_mask = pci_read_config32(PCH_XHCI_DEV, XHCI_USB2PRM);
    route = pci_read_config32(PCH_XHCI_DEV, XHCI_USB2PR);
    route &= ~XHCI_USB2PR_HCSEL;
    route |= XHCI_USB2PR_HCSEL & port_mask;
    pci_write_config32(PCH_XHCI_DEV, XHCI_USB2PR, route);

    /* Disable EHCI controller */
    usb_ehci_disable(PCH_EHCI1_DEV);

    /* LynxPoint-H has a second EHCI controller */
    if (!pch_is_lp())
        usb_ehci_disable(PCH_EHCI2_DEV);

    /* Reset and clear port change status */
    usb_xhci_reset_usb3(PCH_XHCI_DEV, 1);
}

You will notice that USB 2 devices will come under XHC not EHCI controllers. This is normal. Nothing to worry about.
 
I do some arduino programming. Haven't done it in a while on my machine, but now it seems all the com ports are blocked after doing the USB fixes. Any Ideas?
 
Hello.

I recently updated my X99 system from 10.11.6 to 10.12.6.

Now X86PlatformPlugin.kext is not loading any more, which means PM is broken.
I found this in log:
com.apple.driver.X86PlatformPlugin: The following symbols are unresolved for this kext.
com.apple.driver.X86PlatformPlugin: __ZN15IOUSBHostDevice9metaClassE
com.apple.driver.X86PlatformPlugin: __ZN16AppleUSBHostPort9metaClasseE
Can't load kext com.apple.driver.X86PlatformPlugin - link failed.

I'm using USBInjectAll with X99 injector
All USB3 ports are working.
IOreg looks good.

Also fixed USB power property injection by renaming EC0 to EC as mentioned here
https://www.tonymacx86.com/threads/guide-usb-power-property-injection-for-sierra.222266/

Tried different BIOS settings for XHCI mode (smart auto, auto, enabled) - nothing changed.

Could this issue be related to any USB driver or is it something else?

Latest Clover, MacPro6,1

Cheers
Roland
 
Back
Top