Jump to content

GenericUSBXHCI USB 3.0 driver for OS X with source


928 posts in this topic

Recommended Posts

If you still have that problem with failed sleep under 10.9DP1, could you try 1.2.5d2 and let me know if it makes any difference?

Ok, now sleep work in Mavericks 10.9 DP1:

 

 

before putting in Sleep: Pandora's box 06-20-13_1750.html.zip

 

After resuming from Sleep: Pandora's box 06-20-13_1751.html.zip

 

Only one problem: device were not expelled properly.
 
However, sleep works.
 
I put this kext into Pandora for 10.9 (We are going to publish the new Beta 2 in a few minutes). Any updates will be immediate if available!
 
thank you very much
 
Micky
Link to comment
Share on other sites

It's something about that xhci-ehci port switching mechanism.  See this

Wake reason = power-button
RestoreControllerStateFromSleep(XHCI Root Hub USB 2.0 Simulation): Port 1 on bus 0xa connected: portSC(0xe020ae1)
USBF:    181.816    AppleUSBEHCI: setPowerState - PCI device still has PMS status bit set. PMCSR is 0x8000
RestoreControllerStateFromSleep(XHCI Root Hub USB 2.0 Simulation): Port 3 on bus 0xa connected: portSC(0xe0206e1)
RestoreControllerStateFromSleep(XHCI Root Hub USB 2.0 Simulation): Port 4 on bus 0xa connected: portSC(0xe0206e1)
The USB device HubDevice (Port 1 of Hub at 0x1a000000) may have caused a wake by issuing a remote wakeup (2)

The xhci controller is reporting that all 3 devices were disconnected and reconnected during sleep.  That's why you see the ejection messages.  The ehci controller is reporting at the same time that it woke the system - even though it was the power button that woke the system.  This is some hardware glitch.  The thing that confuses me is why this wasn't happening under OS 10.8.4, because as far as xhci - nothing related has changed.

Can you review the bios settings for xhci to see if the bios is set to switch ports 1-4 to xhci during boot?  Different bioses list this option in different ways.

 

Only one problem: device were not expelled properly.
Link to comment
Share on other sites

My bios is set to boot in pre-OS the controller USB 3.0 as USB 2.0, and after switch in USB 3.0 mode when OS is loaded, otherwise nothing works.. :(

 

- even though it was the power button that woke the system

 

yep, from the patch into the dsdt at post  #196

 

Micky

Link to comment
Share on other sites

Well, this is probably the cause.  If you boot with kernel flag "-gux_defer_usb2", the highspeed ports 1-4 are left to ehci when OS is loaded and should resolve these spurious disconnects in sleep.  The superspeed ports continue to function with xhci.

Not sure why it doesn't work if pre-OS highspeed ports are switched to xhci and left to xhci when OS is loaded... :unsure:

My bios is set to boot in pre-OS the controller USB 3.0 as USB 2.0, and after switch in USB 3.0 mode when OS is loaded, otherwise nothing works.. :(

Link to comment
Share on other sites

Thanks anyway, however when I have time I do other tests.

...I was very curious .. I found that in 10.8.4 everything was working properly, but perhaps it is also the fault of the DSDT, as already happened to others, Mavericks does not seem like normal ACPI tables used in the previous OSes.

 

Micky
Link to comment
Share on other sites

Hello Zenith,

First want to thank you again for amazing work. I use the driver with an highpoint asmedia 4 bus controller and it works wonders right alongside the native z77 one when i set ioprobe to -1.

 

This weekend i was helping a friend update his pro tools hack to 10.8.4 and decided to use your driver for his USB 3.0 card as well. I am having an issue where the USB 3.0 works initially and when i plug in a drive it mounts. Once i start using the drive however, it functions for a time and then "stalls". for instance a finder copy will just stall in the procedure, or mounting a large dmg will stall during verification. Some drives seem to sit there indefinitely in the stalled state while others eventually register a hard eject. In any case once the stall occurs the port no longer works to reconnect the device or any other device.

 

Please have a look at the xhcidumps i made. I am afraid i don't know what to look for.

Also this is a nec based chipset device (looks like D720200F1), 2 ports on a mpcie card.

 

Very much looking forward to your assistance.

 

Note:

file 1 is after boot before any device gets attached

file 2 is after attaching a USB 3.0 HDD and seeing it mount on desktop

file 3 is after compressing a disk image onto the hdd, which works for about a minute and then stalls. i ran the commands twice in case anything was changing during the stall state.

file 4 is after attempting to reconnect the drive, it does not mount again until a reboot is performed.

 

Thanks,

g\

1 - xhci no device.txt

2 - xhci hdd device.txt

3 - xhci hdd stalled.txt

4 - xhci hdd reconnect fails.txt

Link to comment
Share on other sites

genzai: It says "Host System Error Detected" - is a fatal hardware condition with the xHC on its PCIe link, and can only be recovered from by system power-cycle or reset-button.  Probably faulty hardware.  Try same xHC with a different drive or same drive with a different xHC.

Also try updating firmware on xHC and drive (if there is one.)

Link to comment
Share on other sites

genzai: It says "Host System Error Detected" - is a fatal hardware condition with the xHC on its PCIe link, and can only be recovered from by system power-cycle or reset-button.  Probably faulty hardware.  Try same xHC with a different drive or same drive with a different xHC.

Also try updating firmware on xHC and drive (if there is one.)

Huge thanks for the very fast reply. I have tried it with multiple drives from different vendors and they all have the same issue with either stalling or stalling and then disconnecting. I also use these drives regularly with my own system (your driver on asmedia, or apple driver on intel) and the drives are OK.

 

Could this be a hardware problem with the card in his system? Is there any other tests i can perform to track the issue?

Please let me know, i will have the system for at least a couple more days and i can do any tests you advise.

Cheers,

g\

 

EDIT: the µPD720200 does appear to be the very first USB 3.0 host controller in general release, and maybe its less compatible. but options for mpcie are very limited. 

Comply spec to: PCIe 2.0 Base Spec

USB3.0 rev1.0 (USB-IF certified: Test ID = 380000000)

Intel xHCI rev0.96

compare this to the 201 versions and other more recent controllers which claim intel xHCI rev 1.0 compliance, could this be part of the issue?

Link to comment
Share on other sites

Could this be a hardware problem with the card in his system? Is there any other tests i can perform to track the issue?

Yes, repeating HSE indicates the PCIe link between the card and southbridge on motherboard in unreliable.

 

 

Please let me know, i will have the system for at least a couple more days and i can do any tests you advise.

None really - as the consistently reproducible HSEs are enough.  Update the firmware.  You may try cleaning the PCIe connector and making sure it's plugged in right - but if problem remains - it's a faulty card.

 

 

 

the µPD720200 does appear to be the very first USB 3.0 host controller in general release, and maybe its less compatible.

It's still one of the best.  The 0.96 doesn't make any difference.  Anyhow, you have the F1 version - and I'm pretty sure there have been others on this thread with this chip which did work - so it's this particular card.

Link to comment
Share on other sites

It's still one of the best.  The 0.96 doesn't make any difference.  Anyhow, you have the F1 version - and I'm pretty sure there have been others on this thread with this chip which did work - so it's this particular card.

Ok, i did update firmware just now, using windows, to 3.0.3.4 which i believe is the latest. verified firmware update was successful. Back in OS X the stall issue still occurred. I guess now that i have a windows option i can try seeing if it stalls there too. But i will also try reseating and cleaning the pcie connection. And if that doesn't work i found a mpci card with the 720202 version of the chip, and i will order that.

 

Thanks for all!

g\

Link to comment
Share on other sites

This is The Prefect Kext for USB 3.0

After download GenericUSBXHCI_1.2.1 and put it on /S/L/E repair permission with Kext Utillity.

I can Connect the Iphone 4s On this USB port and Also External Hard Drive

My Device is 0x0194 Vendor 0x1033 Nec on Dell Vostro 3350 ML 1.8.3

 

Thank You Very Much

:thumbsup_anim: :thumbsup_anim: :thumbsup_anim: :thumbsup_anim: :thumbsup_anim:

 

Tagged As Favourite

Is There any way to make my USB 2 working  ? please ?

Link to comment
Share on other sites

Just a quick thanks to Zenith432. The last version v1.2.4 fixed all my USB3 issues on my build running 10.8.4. You complete me! Ot at least my Hackintosh!

 

GA-Z68XP-UD3 / i7 3.49 GHz / GeForce GTX 560 2048 MB / 32 GB 1600 MHz DDR3 / Crucial M4 256gb SSD / Bios F10

 

NIce seeing you blackosx!

Link to comment
Share on other sites

>You complete me! Ot at least my Hackintosh!

 

After spending the night with v1.2.4 the love affair is over!  :hysterical: 

 

Front USB3 will not power a self powered HD but the rear USB3 will. Getting a couple warning windows after sleep that the HD was not ejected properly, but external HD is still visible on desktop and working.

 

v1.2.3 would cycle power on/off continuously. The previous kext ( v1.2.1? ) powered self-powered HD fine but with many "Not ejected properly..." windows.

 

Running: 10.8.4 - GA-Z68XP-UD3

 

How can I help out?

 

Thanks,

 

JV

Link to comment
Share on other sites

  • 2 weeks later...

Thank you kind sirs for your work in this area!

 

My first build was around the GA-Z77X-UP4 TH

I know don't punch me in the face, I didn't do the best research and should have gone with something else.

 

My question is, do you think this new usb3.0 driver will bring back my usb3.0 functionality?

Link to comment
Share on other sites

@Zenith432–sadly this USB3 driver does not work as well as your VoodooHDA branch (2.8.2d6) on my two systems (one Sandy Bridge Shuttle SH67H7, the other an Ivy Bridge Shuttle SH61V). Both systems are running 10.7.5.

 

When loading the kext, it does not register peripherals plugged into the USB3 ports, nor log anything to the syslog (unsure if it should). I used the Caldigit driver on 10.7.4, but as we all know 10.7.5 breaks it.

 

Some debugging output (happy to provide more, as I'd certainly like USB3 to be functioning on these boxes)–

 

$ ./xhcdump running:

Found a device of class GenericUSBXHCI: IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/RP03@1C,2/IOPCI2PCIBridge/PXSX@0/GenericUSBXHCI
USBCmd RS Y HCRST N INTE Y HSEE N LHCRST N CSS N CRS N EWE Y EU3S N
USBSts HCH N HSE N EINT Y PCD N SSS N RSS N SRE N CNR N HCE N
DNCtrl 0xffff
CRCr CRR N
Config 32
MFIndex 9380
Last Time Sync xHC 0 milliseconds <-> CPU 0 nanoseconds
# Configured Endpoints 0
# Interrupts: Total 0, Serviced 0, Inactive 0, Offline 0
Port   1 PortSC CCS N PED N OCA N PR N
           PLS RxDetect PP Y Speed Unknown PIC Off LWS N
           CSC N PEC N WRC N OCC N PRC N PLC N CEC N CAS N
           WCE Y WDE Y WOE Y DR N WPR N
         PortPmsc U1 0 U2 0 FLA N PortLi LEC 0
Port   2 PortSC CCS N PED N OCA N PR N
           PLS RxDetect PP Y Speed Unknown PIC Off LWS N
           CSC N PEC N WRC N OCC N PRC N PLC N CEC N CAS N
           WCE Y WDE Y WOE Y DR N WPR N
         PortPmsc U1 0 U2 0 FLA N PortLi LEC 0
Port   3 PortSC CCS N PED N OCA N PR N
           PLS RxDetect PP Y Speed Unknown PIC Off LWS N
           CSC N PEC N WRC N OCC N PRC N PLC N CEC N CAS N
           WCE Y WDE Y WOE Y DR N WPR N
         PortPmsc L1S Invalid RWE N HIRD 50 us L1Slot 0 HLE N TestMode Disabled
Port   4 PortSC CCS N PED N OCA N PR N
           PLS RxDetect PP Y Speed Unknown PIC Off LWS N
           CSC N PEC N WRC N OCC N PRC N PLC N CEC N CAS N
           WCE Y WDE Y WOE Y DR N WPR N
         PortPmsc L1S Invalid RWE N HIRD 50 us L1Slot 0 HLE N TestMode Disabled
Interrupter 0 iman IP Y imod I 40000 ns C 0 ns erstsz 1 erdp DESI 0 EHB Y

$ ./xhcdump caps:

Found a device of class GenericUSBXHCI: IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/RP03@1C,2/IOPCI2PCIBridge/PXSX@0/GenericUSBXHCI
Kext Version 1.2.4
Vendor 0x1b21, Device 0x1042, Revision 0
CapLength  32
HCIVersion 0x96
MaxSlots 32, MaxIntrs 8, Rsvd(1) 0, MaxPorts 4
IST 1 microframes, ERST Max 32768, Rsvd(2) 0x17, SPR N, Max Scratchpad Bufs 0
U1 Device Exit Latency 0, Rsvd(3) 0, U2 Device Exit Latency 0
AC64 N, BNC N, CSZ N, PPC N, PIND N, LHRC N, LTC N, NSS Y, Rsvd(4) 0x1, MaxPSASize 65536
  xHC Extended Cap ID 1, Specific 0
    Legacy CTLSTS 0xc0010000
  xHC Extended Cap ID 2, Specific 0x300
    Supported Protocol Name 0x20425355 PortOffset 1 PortCount 2 ProtocolDefined 0
  xHC Extended Cap ID 2, Specific 0x200
    Supported Protocol Name 0x20425355 PortOffset 3 PortCount 2 ProtocolDefined 0x1
DBOff  0x1800
RTSOff 0x1000
PageSize 4096
Using MSI

Link to comment
Share on other sites

 

Hi Zenith432,

 

this is what confused me in the first place. I also would have expected that the scanner using EHCI is not impacted by the XHCI driver. What makes it even more confusing is, that if I attach a USB2-HD to the USB3 ports of the EJ168 the scanner works (see attached files), attaching a USB3-HD (the famous "Expansion Desk") to the same port causes the KP. The only connection between the two I can think of is "libusb" (http://libusb.sourceforge.net/), which when activated through "TWAINBridge" not only polls or otherwise accesses the EHCI side but XHCI driver as well and is not prepared for the response ultimately leading to the crash of "TWAINBridge". Any suggestion how I can further narrow that down ? I have scanned the system.log and crash-reporter logs already but don't really know what to look for, there are no obvious messages related to the crash.

 

[EDIT] Just stumbled across this for "libusb 0.1", which is used by TWAINSANE. Would that support my theory ?

 

Disadvantages compared to libusb-1.0

  • Does not provide isochronous endpoint I/O
  • Does not provide asynchronous I/O

 

 

Hi Zenith432,
 
trying to find a solution for the libusb freeze issue I faced with my scanner I found out that also Apple's Logic Pro 8 as well as Soundtrack Pro 2.0 freeze during start-up when I connect my USB3.0 hard drive to one of the USB 3 ports of my GA-Z68X-UD3H-B3. I am using Version 1.2.4 of your GenericUSBXHCI on 10.8.4.
 
Logic Pro 8 freezes when checking MIDI-drivers, Soundtrack Pro does not give any indication. I also could not find any entries in the system logs.
Could it be connected to those applications being 32bit and the driver only supporting 64bit ?
 
It might not be an issue with your kext after all, but I have no access to a real Mac with USB3 to see, if those programs freeze there as well.
 
Since both programs are kind of outdated and are not really supported under 10.8.4 any more it may be a waste of time searching for a solution. 
Nevertheless, I would hate having to spend another $199,99 for the latest Logic Pro X as I use Logic Pro 8 frequently.
Of course I would be able to live without USB3 for a while, but it's annoying.
 
Thanks for any idea or advice how to proceed from here. For my scanner I decided to use VueScan and remove libusb as well as twain-sane.
Link to comment
Share on other sites

Hi Zephyr, I am a newbie, and have combed this thread pretty thoroughly.

I appreciate the work invested into this kext. and after I installed it, It helped me read my USB 3 devices, but unfortunately they only appear under the High-Speed Bus, they max out at 480 mb/s.  I know my ext drive can super super speed because on the actual imac I have, it supports that speed under the superspeed setting.

 

What am I doing wrong with this kext?

 

my specs:

GA-H77N-WIFI

OSX 10.8.4

i5-3750K @ 3.9GHz

Link to comment
Share on other sites

Hi,

I tried to use the latest version 1.2.4 with my ASMedia ExpressCard 2 port USB 3.0 on my MacBook Pro early 2008, with 10.8.4 installed. First time after insert the ExpressCard, if I try to plug in USB 3.0 HDD, it only operates in Hi-Speed mode (480MB/s). But if I eject the drive then plug it in again in the same port, it can operates at Super Speed Bus. This condition happens to the other port. If I want to get Super Speed Bus then I have to plug then eject the drive and then plug it in again.
With the ExpressCard inside, my MBP cannot go to the sleep mode. But if I unplug the ExpressCard, the sleep function is normal.
I also tried older version 1.1.6 & 1.1.4, but got the same problem.

I just wonder is there a way to fix this problem ?

Link to comment
Share on other sites

×
×
  • Create New...