Jump to content

GenericUSBXHCI USB 3.0 driver for OS X with source


928 posts in this topic

Recommended Posts

Sorry to be the first to report a not working. Acer S3 intel i3 with Intel Series 7 chipset. OSX 10.8.2 stock kext did not work, but was reporting usb 3.0. With your kext it shows both USB 3.0 and USB 2.0

 

Without the -gux_defer_usb2 flag I am missing the HD webcam showing up in System Information. Plugging in a usb 3.0 device into the usb port "stalls" the system for about 15 seconds. It comes back without anything showing as connected. Plugin a usb 2.0 device does work since it is deferred to the USB 2.0 kext from the stock kext. Without the "defer" flag, usb 2.0 doesn't show up either.

 

I'm sure it is a strange combination on my ultrabook, I had problems with video as well since on a Series 7 OSX expects intel 4000HD and not the 3000HD. I had no luck with other kext before.

Link to comment
Share on other sites

Without the -gux_defer_usb2 flag I am missing the HD webcam showing up in System Information.
Ok, Thanks. A webcam is not likely to work at all as the driver does not support isoch endpoints (I mentioned this.)

As for the stall - can you run "xhcdump running" once the keyboard is responsive (and also after the 15 seconds if it's not the same time.) and PM me the result (or post.) It contains a dump of the state of the ports. Also, "xhcdump caps" could help (shows the chip caps.)

Link to comment
Share on other sites

As requested: the xhcdump caps and running output.

The dump shows that ports 1-3 are disconnected, and on port 4 there's a high-speed device that was properly reset and enabled. If that's the HD webcam you mentioned, it's just not going to work for the time-being because isoch endpoints are not supported (sorry). If it's some other device, next thing to check is "xhcdump slots" which will dump your connected devices, and then "xhcdump endpoints <slotnumber>" which shows the configured endpoints on the device.
Link to comment
Share on other sites

I attached 3 screen dumps:

 

First shot is how I am running without your Kext

Second shot is after installing your kext with Kext Helper B7 (before reboot)

Third shot is after reboot and your kext installed.

 

There is no change in any of the xhcdump output before or after I plug in a USB device

post-277708-0-23841900-1362678246_thumb.png

post-277708-0-21611100-1362678258_thumb.png

post-277708-0-13551400-1362678269_thumb.png

Link to comment
Share on other sites

I attached 3 screen dumps:
The kext I attached in post #1, does not support webcams or any other USB device that uses real-time audio or video streaming. Such devices use isoch endpoints.

I plan to add isoch support, but it requires some work, so will take time. If the cam is all you need a driver for, use AppleUSBEHCI.kext (which I assume is active in screenshot #1, although the shot doesn't show it.)

The kext does support bulk and interrupt endpoints, which includes things like disk drives, mice, keyboard, printers, probably digital cameras. Especially, USB3 ports are used for superspeed disk drives.

The reason that the camera info shows up in shot #2 is because that's obtained through the device's control endpoint. Once the OS finds a specific driver for your camera (assuming you have one), it tries to configure the isoch endpoint and fails...

The only curious part is why it doesn't show up at all after reboot. That could be because the cam driver soft-ejects the camera after several attempts to configure it or a timeout. I don't see the point in speculating why a device that can't work anyhow sometimes shows up and sometimes doesn't. If you have a device that's supposed to work with this kext (see above), and it doesn't show up - that's a problem.

 

I tried my own webcam with my kext, and it shows up in System Info both before and after boot, but I don't have an OS X driver for it, so it never gets configured (not even with AppleUSBEHCI.)

 

Update: I notice another possible reason why no devices are showing up after boot - according to caps.txt you posted, USB legacy is enabled on the xHC and it's owned by the bios. This is a known issue with AppleUSBXHCI too. If you could verify for me that no device works on boot, I'll add some code to take ownership of the xHC from the bios, and we'll see if that fixes the problem.

Edited by Zenith432
Link to comment
Share on other sites

Dr. Brains: I added code to take ownership from the bios - uploaded v1.1.a2 (in post #1.)

 

I hope this fixes the problem with no device showing up after boot.

 

webcam should still not work due to isoch. One workaround for this is to boot with "-gux_defer_usb2". This switches the USB2 ports to EHCI, where isoch is supported. You should still be able to use superspeed devices with the kext that show up under the superspeed hub.

 

Thanks for helping me figure this out.

Edited by Zenith432
Link to comment
Share on other sites

Hi,

 

there is a lot of improvement with the new version. My USB 3.0 external harddrive gets detected and shows under Super Speed. No more system stalls when inserting the device.

 

Copying data over from external to internal drive does show something funny: It looks like it is reading a block of data, then stops, reads a block again (blocks as in around 64mb at a time). This is by looking at the progress bar during copy and the drive activity led on the external drive.

 

Copying the same file under windows 7 (x64 home premium with usb 3.0 driver) look more smooth, and the activity light continues flashing without "pause".

 

the xhcdump runnning and caps didn't change.

 

Edit: I did some benchmarks and this shows a transferspeed of around 43MB/s. This could be the HDD inself not the USB 3.0 host/kext. I will try tomorrow with a different HDD. Windows benchmark show the same drive around 45MB/s (different benchmark software, so not really fair to compare 1 to 1)

post-277708-0-63562200-1362776400_thumb.png

Link to comment
Share on other sites

Zenith432

 

I tried compiling it...

 

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/usb/USB.h:32:14: 'IOKit/usb/IOUSBPriv.h' file not found

Link to comment
Share on other sites

So is this better than you patched method? (http://www.insanelymac.com/forum/topic/285157-patched-appleusbxhci-from-os-1082/page__st__60)

 

I'm only now in need of USB3 with my ASUS Maximus IV GENEZ/GEN3 board and trying to find the best way to do so. It uses Asmedia chipset for the two ports (and two by front panel connector).

 

Back when I originally built the system the methods of getting it to work-along with sleep and other things-was a fiasco... So which of these methods is best zenith? I want to incorporate whatever solution into a writeup of the board!

 

Thanks a million-

Phil

Link to comment
Share on other sites

Is there a possibility you can also build one for SL.
No. SL IOUSBFamily has no support for superspeed devices. The layout of base class IOUSBControllerV3 is older, and GenericUSBXHCI will crash-n-burn if loaded. If fact, I'm not certain which versions of Lion run this kext. I'm pretty sure 10.7.5 does, but don't know about earlier ones.

 

DrBrains: for the stalls you describe in post #10, try updated build 1.1a3 in post #1.

Link to comment
Share on other sites

I'm getting nothing, finally got around to trying this, but not on 10.8.2. Rather the 10.8.3 that just got released, I dumped Caps/Running to a file if that helps but it's not recognizing anything and NOTHING in Console.app. It shows up in system profiler but no devices when plugged in...

 

It's ASmedia from what I know...

 

Phil

Dump.rtf

Link to comment
Share on other sites

I'm getting nothing, finally got around to trying this, but not on 10.8.2. Rather the 10.8.3 that just got released
I need time to check if GenericUSBXHCI is still binary-compatible with IOUSBFamily in 10.8.3.

 

Edit: Haven't tried to run it yet, but from examination of the header files, should be ok under 10.8.3.

Edit: Verified that GenericUSBXHCI works under 10.8.3. [i also found that I had to remove AppleHDA, because it now blocks VoodooHDA.]

 

, I dumped Caps/Running to a file if that helps but it's not recognizing anything and NOTHING in Console.app. It shows up in system profiler but no devices when plugged in...
The only thing unusual I see in the dump is that the Asmedia 0x1042 does not support 64-bit physical addressing. I haven't really tested that condition. So what I'll do is simulate it with the xhci chip I have, and see if it screwes things up. Edited by Zenith432
  • Like 1
Link to comment
Share on other sites

The only thing unusual I see in the dump is that the Asmedia 0x1042 does not support 64-bit physical addressing. I haven't really tested that condition. So what I'll do is simulate it with the xhci chip I have, and see if it screwes things up.

 

Thats interesting, am I the first Asmedia user? Let me know if you want me to test anything on the actual system if you don't want to simulate anything. Thanks for looking into it :)

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...