Help - Search - Members - Calendar
Full Version: Generic USB2.0 (EHCI) Driver
InsanelyMac Forum > OSx86 Project > Hardware and Drivers > Other Peripheral Devices
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
orByte
/****************************** INFO BAR ************************************

Edit: Last Modified: 24/12/08, Link to Slice's post added + signing off on this driver


*** Thanks to SLICE there is now an updated version of the USBEHCI driver, which also includes sleep support. Please go here for details: Slice's Post ***

PS: I am signing off on this driver. It was an enjoyable exercise. Thanks to everybody who contributed to its development. Anybody needing drivers for Kernel's 8.4.1 (10.4.6), 8.8.1 (10.4.8), 8.9.1 (10.4.9), 9.0.0 (10.5), 9.1.0 (10.5.1) pls. see below links.

LEOPARD READ FIRST: The 10.5.0/10.5.1 version is now ready. All kexts come as is without any warranty. Try them at your own risk. On my current MB, the EHCI ownership error does not happen - so I could not fully test, but nevertheless the version is working and should be OK. It should have compiled with 32/64 bit support.

Files
----------------------------------
1. Darwin 9.0.0/9.1.0 - Click to view attachment - Any support queries must include the output of 'kextstat' and 'dmesg | grep -i USB'. After the test phase, I will release full sources etc.

SOURCE - PCGen-303.4.5-src (1.3MB, MD5 (PCGen-303.4.5.zip) = 69c29c39850e50c5d27e774ed076d399)



TIGER READ FIRST: The 10.4.9/8.9.1 version is now ready and includes full source. All kexts come as is without any warranty. Try them at your own risk. On my current MB, the EHCI ownership error does not happen - so I could not fully test, but nevertheless the 10.4.9/8.9.1 version is working should be OK. Best.

Files
----------------------------------
1. Darwin 8.9.1 - PCGenUSBEHCI-2.7.0.zip
MD5 (PCGenUSBEHCI-2.7.0.zip) = f28159b35fe4bf5dcc755fad10917c8d
2. Darwin 8.8.1 - PCGenUSBEHCI-261.4.2a.zip
MD5 (PCGenUSBEHCI-2.6.1a.zip) = 6fb66c0c36e37a01e751f321d54e8957
3. Darwin 8.4.1 - PCGenUSBEHCI-256.4.2a.zip
MD5 (PCGenUSBEHCI-2.5.6a.zip) = 364f268a209709fc8dcf451ac61ddc31


Compatibility Guidelines, 22/12/06
----------------------------------
** Version <...>a fixes buggy SMI-bit13 handling ** (Thanks to mac fly for suggesting the solution)

** In practical terms, this extends support to machines that tried the reset but failed to do so. E.g., HP Pavillion 8000t NOW WORKS.

** See thread: for details.

1. For Darwin 8.9.1: USB 270.4.1 & 10.4.9 - use PCGenUSBEHCI-270.4.1 .
2. For Darwin 8.8.1: USB 261.4.2 & 10.4.8 - use PCGenUSBEHCI-261.4.2a .
2. For Darwin 8.4.1: USB 2.4.6 & 10.4.6; USB 256.4.2 & 10.4.7; USB 256.4.2 & 10.4.8 - use PCGenUSBEHCI-256.4.2a .
3. Thanks for all the reports! It seems to be working fine on DFI Lanparty now.

Not Working
with ATI SB200 chipset (cause -couldn't replicate this on an ECS board, likely only a laptop issue).

******************************************************************************/

DISCUSSION THREAD STARTS BELOW:

Hi all,

I have finally overcome teething problems and can now compile the Darwin, Open Source 256.4.2 IOUSBFamily kext AND get a usable kext.

However, I have been focusing on writing a version of AppleUSBEHCI.kext that will address the following problem(s):

(1) ON REBOOT/RESET one gets:
CODE
USBF:   20.136  EHCI controller unable to take control from BIOS


The problem appears to originate from a pci-quirk, which has to do with managing OS/BIOS ownership of the EHCI controller, and is not implemented in the Apple code. Not all systems may exhibit this error. Again, we are lucky to have the benefit of Linux - an excellent open source implementation - for a viable approach to dealing with this problem.

Briefly, while Apple implements
CODE
#define EHCI_USBLEGSUP_BIOS    (1 << 16)    /* BIOS semaphore */
#define EHCI_USBLEGSUP_OS    (1 << 24)    /* OS semaphore */
, they do not IMPLEMENT
CODE
#define EHCI_USBLEGCTLSTS    4        /* legacy control/status */
#define EHCI_USBLEGCTLSTS_SOOE    (1 << 13)    /* SMI on ownership change */
, which is actually a critical part of the management state machine (consequently on restart/reset BIOS reclaims but OS does not let go - so when you restart - no one gets it in the end). Well, in an unquirky world it would be taken care of by the BIOS, but hey! You know how it goes...


Oh yes, and the legacy part... Turning off legacy support in your BIOS may or may not make a difference. SO the best solution is porting these few lines + a few more over.


I shall keep you posted. Working title is: GenPCUSBEHCI.kext .


Best,
orByte
I am pleased to announce that this issue is now resolved. And I will make a kext available over the next few days - once I have all the licensing headers appropriately updated/added etc. Hopefully someone will also update the Darwin sources.


Discussion
The linux code proved helpful, but did not work, in the end the solution was (I ll post a proper diff later), in file AppleUSBEHCI.cpp, AppleUSBEHCI::AcquireOSOwnership(void)

We need something like
CODE
     // orByte 26/9/06, check to see that EHCI ownership state machine is operating mutually exclusive
     // as it should be... if not reset OS ownership, and hope for the best.
     if ((data & kEHCI_USBLEGSUP_OSOwned) && (data & kEHCI_USBLEGSUP_BIOSOwned))
        {
            USBError(1, "EHCI - Ownership conflict - attempting to resolve ...");
            USBError(1, "EHCI - Resetting OS Ownership to 0");
            _device->configWrite32(eecp, data ^ kEHCI_USBLEGSUP_OSOwned);
                for (int i = 0; i < 25; i++)
                {
                    data = _device->configRead32(eecp);
                    if ((data & kEHCI_USBLEGSUP_OSOwned) == 0)
                        break;
                    IOSleep(10);            
                }
        }


Resetting the OS owned bit, generates the SMI event which then sorts out the rest of the registers properly after restart/reset. We need to do this check prior to writing an OS owned bit.


Best
Black Knight
This is excellent news! This problem has been frustrating me ever since I got my Asus A8R-MVP and Asus A8R32-MVP motherboards, which is about 5-6 months. Glad to hear someone has finally attacked this issue. Thanks.

Paul
hp8327
QUOTE(Black Knight @ Sep 27 2006, 09:39 AM) *
This is excellent news! This problem has been frustrating me ever since I got my Asus A8R-MVP and Asus A8R32-MVP motherboards, which is about 5-6 months. Glad to hear someone has finally attacked this issue. Thanks.

Paul


I'm hoping for an update soon! smile.gif I'm running 10.4.6 on an HP dv8327cl and have been having problems with USB from the start. Let us know as soon as you have a kext ready to test. I'm ready!
orByte
Cheers guys, here it is:


Edit
From now on link is posted on the topmost post of page 1 of this thread.
End Edit


One note: I say below that 10.4.7 is required, however, 10.4.6 may be fine. Basically if your system can run the Apple OSX USB 'Debug' kext 256.4.2, you ll be fine. However, read the instructions below first.

General and important Info, APSL terms in dmg:
------------------------------------------

README.1st
**********************************
PCGenUSBEHCI v. 2.5.6, 30/6/06
---------------------------------------------------------

RELEASED UNDER APSL 2.0.
READ THE ENCLOSED LICENSE. BY USING THIS SOFTWARE, YOU ARE AGREEING TO THE TERMS OF APSL 2.0. IF YOU DO NOT AGREE WITH THOSE TERMS THEN DO NOT USE THIS SOFWARE.


- Modified By: orByte
- Scope: PCGenUSBEHCI.kext replaces AppleUSBEHCI.kext
- Requires: x86 based platform, Darwin 10.4.7, Intel IOUSBFamily.kext version 256.4.2

which is obtainable from developer.apple.com in binary form, or from the Darwin Source tree in source form.



NOTES
---------------------------------------------------------

* Fixes on x86 based systems: 'EHCI controller unable to take control from BIOS' on restart/reset of system.



KNOWN ISSUES
---------------------------------------------------------

* If you reboot while you have a USB2.0 disk attached which has a corrupt MBR, the system might hang.
Likely to occur when rebooting from Hiren's Boot CD after MBR operations.
Resolution: Disconnect the USB2.0 drive and try again.



UNRESOLVED ISSUES
---------------------------------------------------------

* D3Cold/Hot Power Management, Severity: Low; Priority: Low
* USB EHCI Clock Registration, Severity: Low; Priority: Low



INSTALL
*************************************
PCGenUSBEHCI v. 2.5.6, 30/6/06
---------------------------------------------------------


** INSTALLATION INSTRUCTIONS **

*****************************************
CAUTION: If the incorrect version of the IOUSBFamily kernel extension is installed, the system may panic on startup. It is also possible that your system does not require or is not compatible with this fix. Make sure that you have a way to correct the problem (i.e. system not booting), before beginning the installation.

Make sure that you do not have any operation critical peripherals connected to the high speed USB bus during installation. Make sure that you have a way of reverting to your existing installation.
*****************************************


CRITICAL:
---------------------------------------------------

Obtain and Install IOUSBFamily.kext version 256.4.2, available from Apple. Requires Darwin 10.4.7.
Search Google for 'Mac OS X USB Debug Kits Downloads'

Note: I have been using the 'debug' version.


(A). The risk takers approach
---------------------------------------------------

sudo su
rm -R /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins/AppleUSBEHCI.kext
cp -R <path to>/PCGenUSBEHCI.kext /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins
chown -R root:wheel /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins/PCGenUSBEHCI.kext
chmod -R 755 /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins/PCGenUSBEHCI.kext
touch /System/Library/Extensions
shutdown -r now


(cool.gif. Piano, piano
---------------------------------------------------

- Read (or skim through) the Apple Public Source Licence file.
- Read the README.1st file.
- Read the CAUTION note at least TWICE.
- Read the troubleshooting section below.
- Remove all mission critical USB from the EHCI port(s).
- Obtain and Install IOUSBFamily.kext version 256.4.2
- Reboot + verify OHCI (USB 1.1) operations
- Check to see if EHCI is working - look under 'About this Mac/More Info/USB' for High Speed USB. If it is already there (after above reboot) you do not need the fix.
- If you have no high speed USB, do sudo dmesg | grep EHCI look for 'EHCI controller unable to take control from BIOS.' If you see this line, then you are a good candidate for this fix.
- Now we run some additional tests:
sudo su
cp -R <path to>/PCGenUSBEHCI.kext /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins/
chown -R root:wheel /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins/PCGenUSBEHCI.kext
chmod -R 755 /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins/PCGenUSBEHCI.kext

kextload -v -t /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins/PCGenUSBEHCI.kext

- Look at the kextload output: Because AppleUSBEHCI is loaded, it will not load but it should say:
kextload: extension /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins/PCGenUSBEHCI.kext appears to be valid

If the kext is not valid make sure you followed the instructions. If it is valid, proceed to:
rm -R /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins/AppleUSBEHCI.kext
touch /System/Library/Extensions
shutdown -r now


TROUBLESHOOTING
---------------------------------------------------
1. I cannot install the IOUSBFamily version 256.4.2.
Solution: Upgrade to 'Darwin' version 10.4.7

2. I installed the fix and I still cannot get EHCI.

Solution: Delete or rename AppleUSBEHCI.kext in the /System/Library/Extensions/... folder. AppleUSBEHCI and GenPCUSBEHCI do the same thing and will cause conflicts if they are both present in the System Folder.

2a. I tried the above and the fix still does not work,
Solution: There may be no solution for this... According to ehci r-10 specifications, resetting OS ownership should get BIOS to reinitialize via an SMI signal after restart/reboot. But then this fix itself is patching a buggy ehci implementation. Sorry, you might be out of luck.

3. Do I really need this fix?
Solution: Read README.1st, and INSTALL. Additionally, on some machines, this problem goes away when legacy USB is disabled in BIOS.
If you need to have legacy USB enabled, then you can try this fix to get EHCI. I could not test this on my system, but it should work.

4. How do I compile the IOUSBFamily 256.4.2 from source?
Solution: Try XCode 2.3, and the apple mailing lists for common typecasting problems relating to clock.h . You may have to use the ...HibernatePrivate.h file from the xnu 10.4.7 kernel. Be prepared to spend some hours, days, weeks, months...

5. Will you release fixes for versions earlier than 10.4.7?
Solution: I won't, but you can use the diffs to help you modify earlier source code.

6. Can I use the 'patch' command on the diffs?
Solution: The diffs are generated from the 256.4.2 Darwin source. You can patch against those sources. You ll find the sources under the PPC branch. However, these are live sources subject to change so the patch may not apply.

7. Why did you change the name of AppleUSBEHCI.kext?
Solution: As my release is not officially from Apple, it is good practice to change the name. Also it gives you the opportunity to backup the original.
hp8327
QUOTE(orByte @ Sep 30 2006, 03:58 PM) *
Cheers guys, here it is:


AWESOME! I'm going to try this later today or early tomorrow! Very exciting. Very detailed instructions, and this thread deserves a sticky! Thanks for your work on this, I'll reply back when I get it working.

Can't wait to have USB for flash and Wireless working!!!!!!! biggrin.gif
Black Knight
Ok, so this worked great for me... after I hosed my OSX install. The problem is in the instructions. I noticed after my computer stopped working that there is a space after "rm -R /System/Library/" which appears in several lines of your instructions. If you copy and paste this line into terminal, guess what happens... it removes everything in /System/Library/. After a quick reinstall, I tried your method again and removed the spaces in the commands and sure enough, it worked great. Thank you so much, though please edit your instructions so nobody who doesn't know how to fix their install does the same thing I did. Maybe that's why nobody has yet responded after doing this fix.

Paul
hp8327
QUOTE(Black Knight @ Oct 3 2006, 02:14 PM) *
Ok, so this worked great for me... after I hosed my OSX install. The problem is in the instructions. I noticed after my computer stopped working that there is a space after "rm -R /System/Library/" which appears in several lines of your instructions. If you copy and paste this line into terminal, guess what happens... it removes everything in /System/Library/. After a quick reinstall, I tried your method again and removed the spaces in the commands and sure enough, it worked great. Thank you so much, though please edit your instructions so nobody who doesn't know how to fix their install does the same thing I did. Maybe that's why nobody has yet responded after doing this fix.

Paul


I'm hoping to have time tonight to check this out. I am on the road and have been busy as heck. Thanks for the heads up though Black Night!
Black Knight
No problem. I hope it does work for you since it works so well for me.
SaxMachine
He works but without "debug kit"... I have an other problem my wifi and hd LaCie usb works but mouse and pendrive don' t works, why?

Ps. I have a notebook and I cannot disable "Usb Legacy" in my bios... look my sign for hardware components.
orByte
Hi Black Knight, thanks for pointing out the error for the instructions & sorry that your system got hosed - poster_oops.gif here are the corrected ones. I shall also update the fileshare later in the day.

(A). The risk takers approach
---------------------------------------------------

sudo su
rm -R /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins/AppleUSBEHCI.kext
cp -R <path to>/PCGenUSBEHCI.kext /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins
chown -R root:wheel /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins/PCGenUSBEHCI.kext
chmod -R 755 /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins/PCGenUSBEHCI.kext
touch /System/Library/Extensions
shutdown -r now
(. Piano, piano
---------------------------------------------------

- Read (or skim through) the Apple Public Source Licence file.
- Read the README.1st file.
- Read the CAUTION note at least TWICE.
- Read the troubleshooting section below.
- Remove all mission critical USB from the EHCI port(s).
- Obtain and Install IOUSBFamily.kext version 256.4.2
- Reboot + verify OHCI (USB 1.1) operations
- Check to see if EHCI is working - look under 'About this Mac/More Info/USB' for High Speed USB. If it is already there (after above reboot) you do not need the fix.
- If you have no high speed USB, do sudo dmesg | grep EHCI look for 'EHCI controller unable to take control from BIOS.' If you see this line, then you are a good candidate for this fix.
- Now we run some additional tests:
sudo su
cp -R <path to>/PCGenUSBEHCI.kext /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins/
chown -R root:wheel /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins/PCGenUSBEHCI.kext
chmod -R 755 /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins/PCGenUSBEHCI.kext

kextload -v -t /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins/PCGenUSBEHCI.kext

- Look at the kextload output: Because AppleUSBEHCI is loaded, it will not load but it should say:
kextload: extension /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins/PCGenUSBEHCI.kext appears to be valid

If the kext is not valid make sure you followed the instructions. If it is valid, proceed to:
rm -R /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins/AppleUSBEHCI.kext
touch /System/Library/Extensions
shutdown -r now




QUOTE(SaxMachine @ Oct 4 2006, 11:14 AM) *
He works but without "debug kit"... I have an other problem my wifi and hd LaCie usb works but mouse and pendrive don' t works, why?

Ps. I have a notebook and I cannot disable "Usb Legacy" in my bios... look my sign for hardware components.


I am not sure. It is fine, if you cannot disable legacy bios. Do you get any error messages?

Best.
SaxMachine
QUOTE(orByte @ Oct 4 2006, 02:49 PM) *
I am not sure. It is fine, if you cannot disable legacy bios. Do you get any error messages?

Best.



With debug kit
"Failed to load extension com.apple.drive.appleUSBEHCI"

"AppleUSBOHCI Found a transaction wich hasn't moved in 5 second bla bla bla"

Without debug kit load extensions but i have "AppleUSBOHCI Found a transaction wich hasn't moved in 5 second bla bla bla"
Black Knight
QUOTE(orByte @ Oct 4 2006, 08:49 AM) *
Hi Black Knight, thanks for pointing out the error for the instructions & sorry that your system got hosed - poster_oops.gif here are the corrected ones. I shall also update the fileshare later in the day.

(A). The risk takers approach
---------------------------------------------------

sudo su
rm -R /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins/AppleUSBEHCI.kext
cp -R <path to>/PCGenUSBEHCI.kext /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins
chown -R root:wheel /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins/PCGenUSBEHCI.kext
chmod -R 755 /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins/PCGenUSBEHCI.kext
touch /System/Library/Extensions
shutdown -r now
(. Piano, piano
---------------------------------------------------

- Read (or skim through) the Apple Public Source Licence file.
- Read the README.1st file.
- Read the CAUTION note at least TWICE.
- Read the troubleshooting section below.
- Remove all mission critical USB from the EHCI port(s).
- Obtain and Install IOUSBFamily.kext version 256.4.2
- Reboot + verify OHCI (USB 1.1) operations
- Check to see if EHCI is working - look under 'About this Mac/More Info/USB' for High Speed USB. If it is already there (after above reboot) you do not need the fix.
- If you have no high speed USB, do sudo dmesg | grep EHCI look for 'EHCI controller unable to take control from BIOS.' If you see this line, then you are a good candidate for this fix.
- Now we run some additional tests:
sudo su
cp -R <path to>/PCGenUSBEHCI.kext /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins/
chown -R root:wheel /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins/PCGenUSBEHCI.kext
chmod -R 755 /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins/PCGenUSBEHCI.kext

kextload -v -t /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins/PCGenUSBEHCI.kext

- Look at the kextload output: Because AppleUSBEHCI is loaded, it will not load but it should say:
kextload: extension /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins/PCGenUSBEHCI.kext appears to be valid

If the kext is not valid make sure you followed the instructions. If it is valid, proceed to:
rm -R /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins/AppleUSBEHCI.kext
touch /System/Library/Extensions
shutdown -r now
I am not sure. It is fine, if you cannot disable legacy bios. Do you get any error messages?

Best.


It's not a problem really, I'm just glad that I was the first to try it and not someone who is new to OSX. Great work on the driver though. Keep up the good work.

Paul
hp8327
Alright. I had sub'd to this thread, and all the activity this AM made me want to go get this working and installed. Works flawlessly using the directions provided. Thanks so much for getting this thing created. I swear this was a heck of a lot easier than what I had to do to get my network card to work on this laptop! Cheers, and thanks again!

Edit: I also think this should be a sticky
orByte
I have now uploaded the corrected instructions. Here is the link:

edit: outdated link - current link at top of this page.
PCGenUSBEHCI
MD5: C61ABD7DB7E6067765B9985879DA7AB4

robot.gif

QUOTE(SaxMachine @ Oct 4 2006, 01:56 PM) *
With debug kit
"Failed to load extension com.apple.drive.appleUSBEHCI"

"AppleUSBOHCI Found a transaction wich hasn't moved in 5 second bla bla bla"

Without debug kit load extensions but i have "AppleUSBOHCI Found a transaction wich hasn't moved in 5 second bla bla bla"


Hi, AppleUSBEHCI and PCGenUSBEHCI should not be used together, there can be conflicts. If you are using, PCGenUSBEHCI, you would need to delete (or rename) AppleUSBEHCI. So try that first.


The OHCI transcation one, I am not too sure about. Well anyhow, try the above first and see if it works. Yeah try that with the debug kit.

Best.
Black Knight
Btw, I would suggest editing your instructions in your first post as well since that is the one people will more than likely read first. Just a suggestion.
hp8327
Yeah, I linked to this thread from the osx86 wiki for my laptop model, so that might be helpful.

QUOTE(Black Knight @ Oct 4 2006, 02:49 PM) *
Btw, I would suggest editing your instructions in your first post as well since that is the one people will more than likely read first. Just a suggestion.
SaxMachine
Your driver work fine but my problem is AppeUSBOHCI and i don't have a conflict with PCGenUSBEHCI but my usb mouse and pendrive don't works. Wifi and HD works...When I plug my mouse in verbose mode i have "AppleUSBOHCI Found a transaction wich hasn't moved in 5 second bla bla bla"
orByte
QUOTE(Black Knight @ Oct 4 2006, 08:49 PM) *
Btw, I would suggest editing your instructions in your first post as well since that is the one people will more than likely read first. Just a suggestion.


Oh cool! I can edit the posts (a Matrix moment) hysterical.gif .


QUOTE(SaxMachine @ Oct 4 2006, 09:37 PM) *
Your driver work fine but my problem is AppeUSBOHCI and i don't have a conflict with PCGenUSBEHCI but my usb mouse and pendrive don't works. Wifi and HD works...When I plug my mouse in verbose mode i have "AppleUSBOHCI Found a transaction wich hasn't moved in 5 second bla bla bla"


OK, there is some info on this on the Apple mailing lists. On google search for 'Found a transaction which hasn't moved in 5 seconds' . People seem to think that it is caused when an OHCI device that gets detected as a EHCI device. But someone else tried 10.4.3 here the link. Perhaps it will work for you as well. Have you tried it through an OHCI hub? I remember having some success with troublesome OHCi devices when I ran them through an Apple keyboard (just mouse though - not enough power for a pendrive on the Apple keyboard).
SaxMachine
I have try all kext of 10.4.1 and 10.4.3...Don't work for me...
mka101
Hmm tried your method and it didn't work. After the reboot i still got the same error message with EHCI not able to take ownership and when i physically turn on the device it slows down the comp big time. If i disable legacy USB everything works fine and runs smoothly. Have any suggestions why this isn't working for me?


This is what i keep getting

USBF: 16.991 EHCI controller unable to take control from BIOS
USBF: 16.991 AppleUSBEHCI[0x2c56000]: unable to obtain ownership: 0xe00002be
USBF: 16.991 AppleUSBEHCI[0x2c56000]::UIMInitialize - Error occurred (0xe00002be)
USBF: 16.993 AppleUSBEHCI[0x2c56000]: UIMFinalize 0 0 0x2c98700
USBF: 16.993 AppleUSBEHCI: unable to initialize UIM


I am running 10.4.8 and i ran your instructions 100% to the tee.

Any help would be greatly appreciated smile.gif

BTW i have a Intel D915GUX motherboard and i know most new motherboards has the option to hand off EHCI in the bios , mine does not have that option as it is older and i do have Legacy USB enabled or else my USB keyboard does not work in the bootloader screen.


Not sure if this has anything to do with it but this is what i see in my USB section of the system profiler

Host Controller Location: Built In USB
Host Controller Driver: AppleUSBUHCI
PCI Device ID: 0x265a
PCI Revision ID: 0x0003
PCI Vendor ID: 0x8086
Bus Number: 0x5d

and lastly this is what it shows for the kext being loaded.

PCGenUSBEHCI:

Version: 2.5.6
Last Modified: 04/10/06 9:52 PM
Get Info String: Based on 2.5.6 AppleUSBEHCI Copyright © 2000-2006 Apple Computer Inc., All Rights Reserved, orByte:Modified under APSL 2.0
Location: /System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/PCGenUSBEHCI.kext
kext Version: 2.5.6
Load Address: 0x2a45b000
Valid: Yes
Authentic: Yes
Dependencies: Incomplete
Dependency Errors:
com.apple.iokit.IOUSBFamily: No valid version of this dependency can be found
Integrity: Unknown


Now when i have legacy USB disabled this is what i get.

USB Bus:

Host Controller Location: Built In USB
Host Controller Driver: AppleUSBUHCI
PCI Device ID: 0x2659
PCI Revision ID: 0x0003
PCI Vendor ID: 0x8086
Bus Number: 0x3d

psc 1310 series:

Version: 1.00
Bus Power (mA): 500
Speed: Up to 12 Mb/sec
Manufacturer: hp
Product ID: 0x3f11
Serial Number: CN483B21W4O2
Vendor ID: 0x03f0

PCGenUSBEHCI:

Version: 2.5.6
Last Modified: 04/10/06 9:52 PM
Get Info String: Based on 2.5.6 AppleUSBEHCI Copyright © 2000-2006 Apple Computer Inc., All Rights Reserved, orByte:Modified under APSL 2.0
Location: /System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/PCGenUSBEHCI.kext
kext Version: 2.5.6
Load Address: 0x29d23000
Valid: Yes
Authentic: Yes
Dependencies: Incomplete
Dependency Errors:
com.apple.iokit.IOUSBFamily: No valid version of this dependency can be found
Integrity: Unknown

And the system run's fast still. No change in speed when it's disabled. One thing that i did notice as well is the following. I have a seperate card that is usb 2.0 and i believe on the intel board the ports can be both 1.1 or 2.0 (depending if it is enabled in the bios or not).

this is what shows up

USB High-Speed Bus:

Host Controller Location: Built In USB
Host Controller Driver: AppleUSBEHCI
PCI Device ID: 0x265c
PCI Revision ID: 0x0003
PCI Vendor ID: 0x8086
Bus Number: 0xfd


Didn't have this one before (only when USB legacy is disabled)
orByte
QUOTE(mka101 @ Oct 5 2006, 04:45 AM) *
Hmm tried your method and it didn't work. After the reboot i still got the same error message with EHCI not able to take ownership and when i physically turn on the device it slows down the comp big time.


Notice the following
Cold Start - Working
CODE
1. USBF:   20.697  Attempting to get EHCI Controller from BIOS
2. USBF:   20.698  Found USBLEGSUP_ID - value 0x10001 - writing OSOwned
3. USBF:   22.887  acquireOSOwnership done - value 0x1000001
USBF:   22.929  AppleUSBEHCI[0x3537800]::start EHCI controller will be unloaded across sleep
USBF:   22.953  AppleUSBOHCI[0x3502000]::start OHCI controller will be unloaded across sleep
USBF:   22.954  AppleUSBOHCI[0x3526000]::start OHCI controller will be unloaded across sleep
USBF:   22.955  AppleUSBOHCI[0x3527800]::start OHCI controller will be unloaded across sleep



Restart - Working
CODE
1. USBF:      26.816  Attempting to get EHCI Controller from BIOS
1a. USBF:      26.816  EHCI - Ownership conflict - attempting to resolve ...
1b. USBF:      26.825  EHCI - Try resetting OS Ownership to 0
2. USBF:      26.826  Found USBLEGSUP_ID - value 0x10001 - writing OSOwned
3. USBF:      29.  5  acquireOSOwnership done - value 0x1000001
USBF:      29. 62  AppleUSBEHCI[0x41bf000]::start EHCI controller will be unloaded across sleep
USBF:      29.107  AppleUSBOHCI[0x4435800]::start OHCI controller will be unloaded across sleep
USBF:      29.108  AppleUSBOHCI[0x4436000]::start OHCI controller will be unloaded across sleep
USBF:      29.109  AppleUSBOHCI[0x44e2800]::start OHCI controller will be unloaded across sleep



Not -working (PCGenUSBEHCI)
CODE
1. USBF:      27.291  Attempting to get EHCI Controller from BIOS
2. USBF:      27.291  Found USBLEGSUP_ID - value 0x1010001 - writing OSOwned
ERR. USBF:      27.699  EHCI controller unable to take control from BIOS
USBF:      27.700  AppleUSBEHCI[0x41cf000]: unable to obtain ownership: 0xe00002be
USBF:      27.701  AppleUSBEHCI[0x41cf000]::UIMInitialize - Error occurred (0xe00002be)
USBF:      27.722  AppleUSBEHCI[0x41cf000]: UIMFinalize 0 0 0x441b600
USBF:      27.722  AppleUSBEHCI: unable to initialize UIM


Do you get (1) & (2)? If not, then based on execution branching, you are not running PCGenUSBEHCI. If you get (ERR) only and NOT (1) & (2) then you must be running AppleUSBEHCI.

With PCGenUSBEHCI, with Legacy USB disabled you should get (1), and with legacy enabled you should get (1) & (2)

If you got (1) & (2), and are still having problems, then you have a problem with the Intel controller. You can try a BIOS upgrade if available, or disable legacy BIOS. Sorry that I do not have any better news for you. But I could be wrong of course. Best.
mka101
hmm yeah i still only get

USBF: 16.991 EHCI controller unable to take control from BIOS
USBF: 16.991 AppleUSBEHCI[0x2c56000]: unable to obtain ownership: 0xe00002be
USBF: 16.991 AppleUSBEHCI[0x2c56000]::UIMInitialize - Error occurred (0xe00002be)
USBF: 16.993 AppleUSBEHCI[0x2c56000]: UIMFinalize 0 0 0x2c98700
USBF: 16.993 AppleUSBEHCI: unable to initialize UIM

With legacy enabled. ahd PCGenUSBEHCI is running, AppleUSBEHCI is not running as I removed it from IOUSBFamily. Doesn't even show up in the loaded extensions in system profiler. PCGenUSBEHCI does though. I believe there is another thing that might be loading up for me.

AppleUSBUHCI? does that make a difference? what is that if you know what it is
orByte
QUOTE(mka101 @ Oct 7 2006, 05:58 PM) *
hmm yeah i still only get

USBF: 16.991 EHCI controller unable to take control from BIOS
USBF: 16.991 AppleUSBEHCI[0x2c56000]: unable to obtain ownership: 0xe00002be
USBF: 16.991 AppleUSBEHCI[0x2c56000]::UIMInitialize - Error occurred (0xe00002be)
USBF: 16.993 AppleUSBEHCI[0x2c56000]: UIMFinalize 0 0 0x2c98700
USBF: 16.993 AppleUSBEHCI: unable to initialize UIM

With legacy enabled. ahd PCGenUSBEHCI is running, AppleUSBEHCI is not running as I removed it from IOUSBFamily. Doesn't even show up in the loaded extensions in system profiler. PCGenUSBEHCI does though. I believe there is another thing that might be loading up for me.

AppleUSBUHCI? does that make a difference? what is that if you know what it is


That's odd. The first thing the code does is to issue
CODE
Attempting to get EHCI Controller from BIOS
. You should really be seeing that message. The AppleUSBUHCI should not be causing a conflict as it is for low/full speed usb devices on Intel & VIA units. I am wondering whether this could be related to 10.4.8. PCGen was compiled against 10.4.7. Sorry mate, that's the only other thing I could think of.
mka101
alright no worries. For now i don't mind disabling Legacy as everything works when i do that. But who knows maybe once IOUSBFamily 10.4.8 comes out you might compile a PCGen for 10.4.8 and it might work smile.gif

Thanks for the help though. I do appreciate it.
pincopanco
[quote name='orByte' date='Sep 30 2006, 08:58 PM' post='199042']
kextload -v -t /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins/PCGenUSBEHCI.kext

- Look at the kextload output: Because AppleUSBEHCI is loaded, it will not load but it should say:
kextload: extension /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins/PCGenUSBEHCI.kext appears to be valid

If the kext is not valid make sure you followed the instructions. If it is valid, proceed to:
rm -R /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins/AppleUSBEHCI.kext
touch /System/Library/Extensions
shutdown -r now

10.4.7 appear this "kextload: extension /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins/PCGenUSBEHCI.kext appears to be valid
kextload: kmod_control/start failed for com.orByte.driver.PCGenUSBEHCI; destroying kmod
kextload: a link/load error occured for kernel extension /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins/PCGenUSBEHCI.kext
load failed for extension /System/Library/Extensions/IOUSBFamily.kext/Contents/Plugins/PCGenUSBEHCI.kext"
kjur
Hi all!
I was working on 10.5.2 version for a couple of months and the last weekend I've installed 10.5.6 (JaS version). I have had some problems with LAN, sound and video, but all is fine now.

Yesterday after couple of restarts I got message:

USBF: xx.xxx AppleUSBOHCI[0xxxxxxxx::start OHCI controller will be unloaded across sleep

(the 'x' letter means there sould be an address there, but I'm at work now and don't remember. I got this message twice with different address)

The wierd thing is I have two OS X partition. I always make full partition backup of the last working configuration. Now I can't boot from both main and backup partition.

In meantime (before crash) I tried if my MP3 player works as USB storage disk (it was!!), and then I got the error message after reboot.
I don't remember if I made backup before or after connecting the MPŁ player.
Could the connecting activate any extension to support USB which makes this crash?

I got this message before when I tried to patch ATA extension, but I could boot or recover everything from the backup partition. Now I can't!! sad.gif

My system is AMD 64 Sempron (SSE3), Gigabyte K8-NS motherboard, nForce3 250 chipset, nVidia 6200 video card.

Is is possible to run OS X in something like 'safe mode' without any unneccesary extensions? to check what is wrong?

Many thanks for you help
Greg
kjur
Hi All

Ok, last night I'he tried safe mode ( -x) and it was OK. Finally I found out theat I need to add -f in boot line to rebuild the extension cache. I don't know why!!! Has anyone got the same problem?

PS. Of course my system is 10.4.6, not 10.5.6 smile.gif

Regards
macprodan
why did you remove the file. any chance you can repost it , id like to try.. ive had this problem since 10.4.3
orByte
QUOTE(itmandan @ Oct 17 2006, 12:09 PM) *
why did you remove the file. any chance you can repost it , id like to try.. ive had this problem since 10.4.3



Hi thanks, I just realized the file is no longer there! Will re-upload in the evening. I have also had success using the PCGen kext under 10.4.6 . Will post link later. Best.

Edit:
And, pincopanco - if you get this message AND AppleUSBEHCI is loaded, then you should be fine to proceed. However, if you get this message and you have already deleted AppleUSBEHCI - then it looks like and incompatibility.
macprodan
You had a chance to repost the file.? , anyone else got a copy they could post.?
orByte
QUOTE(itmandan @ Oct 17 2006, 07:20 PM) *
You had a chance to repost the file.? , anyone else got a copy they could post.?


The link has now been posted on the top of PAGE 1: Quick Link

Best. happymac.GIF
macprodan
Thank you very much. smile.gif will try asap
macprodan
Still unable to take ownership from bios.. sad.gif
orByte
QUOTE(itmandan @ Oct 18 2006, 12:31 PM) *
Still unable to take ownership from bios.. sad.gif



Bummer ... Have you got any BIOS legacy settings? Do they make a difference? Do you get the 'EHCI Ownership Conflict' message? Another possibility: is there a BIOS upgrade available for your MB - this works sometimes.

Best.
meattattat
QUOTE(orByte @ Oct 18 2006, 08:09 PM) *
Bummer ... Have you got any BIOS legacy settings? Do they make a difference? Do you get the 'EHCI Ownership Conflict' message? Another possibility: is there a BIOS upgrade available for your MB - this works sometimes.

Best.

I am using DFI Lanparty nF4-D,
no such option in the bios setting...
just "USB Park Mode"... something like that
macprodan
Legacy Mode on this bios is done by Disabling USB Keyboard Support and Disabling USB Mouse Support in Bios. This way they work in OS X at boot up no probs. but then they do not work in Darwin boot selector or in Dos Mode. Most of the time I have to get round the Back and Unplug em, then plug em, this is With them Two USB K/B / Mouse Options Enabled.

Weird Prob...

Cant really change Bios as this is the best one for this Hardware, Overclocking Wise.
meattattat
QUOTE(itmandan @ Oct 20 2006, 05:42 AM) *
Legacy Mode on this bios is done by Disabling USB Keyboard Support and Disabling USB Mouse Support in Bios. This way they work in OS X at boot up no probs. but then they do not work in Darwin boot selector or in Dos Mode. Most of the time I have to get round the Back and Unplug em, then plug em, this is With them Two USB K/B / Mouse Options Enabled.

Weird Prob...

Cant really change Bios as this is the best one for this Hardware, Overclocking Wise.

BTW, can u use high speed usb device?
orByte
QUOTE(itmandan @ Oct 19 2006, 10:42 PM) *


Cant really change Bios as this is the best one for this Hardware, Overclocking Wise.


I checked out the motherboard on the net. It is definitely a very good one for overclocking. I do not want to raise any hopes but I have another trick up my sleeve, which I will go ahead and try it out (no timetable though...) However, it is a bit risky as it attempts direct access to the SMI registers. Risky in terms of potential crashing to fry-ups ! (Though fry-up would be unlikely...) Unless you wanted to have an egg or two on the side, heh, heh - nothing like a good fry up (on occasion and when it is not the CPU). Best. idea.gif
deathr
Hi! I have such a same problem. While booting in verbose mode OS shows:

USBF: xx.xxx AppleUSBOHCI[xxxxxxxxx]::start OHCI controller will be unloaded across sleep

My BIOS hasn't "legacy USB support" option. All my USB 2.0 devices work correctly and USB 1.0 (1.1) such as mice, modems etc. are not(
Help Please! I use JaS 10.4.7 and i have SiS 7001 OHCI controller. New apple IOUSBFanily.kext didn't do anything(((
orByte
QUOTE(deathr @ Nov 6 2006, 10:08 AM) *
Hi! I have such a same problem. While booting in verbose mode OS shows:

USBF: xx.xxx AppleUSBOHCI[xxxxxxxxx]::start OHCI controller will be unloaded across sleep

My BIOS hasn't "legacy USB support" option. All my USB 2.0 devices work correctly and USB 1.0 (1.1) such as mice, modems etc. are not(
Help Please! I use JaS 10.4.7 and i have SiS 7001 OHCI controller. New apple IOUSBFanily.kext didn't do anything(((


Hi could you pls. be precise about the errors. If you get 'OHCI controller will be unloaded across sleep', this means that your OHCI (i.e. USB 1.1) controller has been recognised. Try posting
CODE
ioreg -w0 -bl | grep USB, and

cat /var/log/system.log | grep USB (this is a long file, so just the latest reboot pls.)


At what point in the boot process, is your mice not being recognised? What happens when you plug it in/out.

Are you using Apple USB family 256.4.2? This family works quite well with generic intel stuff.

PCGEN is for USB 2.0 only.

Best.
deathr
Thank you for your reply! Since last week in many threads noone replied me sad.gif. Someone advised me to use 10.4.3 IOUSBFamily kexts. These files i've attached are made using 10.4.3 usb kexts, but nothing works again. My USB 1.1 devices are recognized after several seconds after starting Mac OS X. And start from "will be unloaded across sleep" message. When i plug my mouse it hust says something like "wasn't able to enumerate device connected to this bus". Anyway i attach two files. Excuse me but their are RTF format. I will be very appreciated if could help me to solve my problrm! sorcerer.gif
P.S. new 10.4.7 Apple drivers didn't help me too
orByte
QUOTE(deathr @ Nov 6 2006, 10:08 AM) *
Hi! I have such a same problem. While booting in verbose mode OS shows:

USBF: xx.xxx AppleUSBOHCI[xxxxxxxxx]::start OHCI controller will be unloaded across sleep

My BIOS hasn't "legacy USB support" option. All my USB 2.0 devices work correctly and USB 1.0 (1.1) such as mice, modems etc. are not(
Help Please! I use JaS 10.4.7 and i have SiS 7001 OHCI controller. New apple IOUSBFanily.kext didn't do anything(((


Hmmm... It looks like the OHCI (USB 1.1) is being recognised as EHCI (USB 2.0) - then the speed mismatch is causing timeout errors. This may or may not be fixable. It is funny that there is no AppleUSBOHCI entry in ioreg, when the module appears loaded based on the system log. Could you run
CODE
kextstat, and

ioreg -l | grep AppleUSBOHCI, and

ioreg -l | grep AppleUSBUHCI
after a cold start, i.e. after you have unplugged system power lead for more than 10 seconds, or if laptop removed battery...
Just to be sure. I ll also compare your kexstat against mine as I am also on 10.4.7. What's your motherboard make?

Best.
deathr
Made these two files using 10.4.7 Official Apple usb drivers. ioreg -l | grep AppleUSBUHCI showed me nothing.
I don't know exactly which motherboard i use. I have Asus A2500L Laptop. CPU-Z said that it's called A2H/L
Andrei
I also have problems with USB 1.1 devices in 10.4.8 with IOUSBFamily-261.4.2: after wake up they are not reconnected automaticaly.
Interesting that I have also a USB 2.0 hub connected to the system and it works fine. When I connect USB 1.1 devices through the hub they continue working after wake up.
deathr
orByte, is it possible to fix my OHCI?
orByte
QUOTE(deathr @ Nov 13 2006, 07:01 PM) *
orByte, is it possible to fix my OHCI?


Hi, sorry for the late reply. The relevant sections of the kexts appear fine. I did not notice anything glaring that could be causing problems. I am not sure that this is a simple fix. However, you may wish to try Andrei's suggestion. It could work. I have used a similar solution for running USB 2.0 through a USB 1.1 hub but you would need to try a USB 2.0 hub. So if you have one lying around try it out. If not, you could buy one, but it is probably not worthwhile breaking the bank - as the result of the test is uncertain. Maybe a friend could loan you one.

On other news, the Sis7001 controller appears to have had a troubled life even in the windows world. Here is a configuration link maybe it will have some useful info.

edit: You could also check to see if there is a BIOS upgrade available from Asus.

Best.
deathr
I think i should try a USB hub from Apple Store. I'm going to test it there. If everything will be fine i'll post. Anyway thanks for your reply! smile.gif
orByte
QUOTE(deathr @ Nov 14 2006, 06:08 PM) *
I think i should try a USB hub from Apple Store. I'm going to test it there. If everything will be fine i'll post. Anyway thanks for your reply! smile.gif


A most excellent strategy! I ll keep my fingers crossed.
deathr
Tested the USB 2.0 hub with it's own power supply. It worked!!! orByte, Andrei thank you all very much!!! Tomorrow i'll buy this hub. The last thing is to make work UDMA properly and everything will be fine! Thanks! smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.