HaTaX Posted January 26, 2009 Share Posted January 26, 2009 I apologize if something similar to this has been posted before, but I spent some time looking for it first and have been fighting the problem for a while so I figured I'd post my findings here. I have an Abit IP35 Pro motherboard which has 2 controllers on it, one Intel ICH9R and a JMicron 363. The Intel controller feeds 6 SATA ports on the motherboard while the JMicron feeds 2 eSATA ports and one PATA header on the motherboard. I am using ONLY the JMicron controller currently as I keep my internal HDs loaded with a reliable build of XP 32 bit that I use when I need a working system NOW. By disabling the Intel controller I lose two of my DVD burners but retain the burner on the IDE channel, I do this as it keeps my working OS out of harms way no matter what happens with my quad boot system or the other drive with Windows 7 on it. So on my eSATA ports I have 2 drives attached, a 250GB that is partitioned out for running Vista, XP, OSX, and Ubuntu, and a 1TB that has one 100GB partition for running Win 7 and the remainder partitioned out for storage space. At boot I flip on the drive I wish to use, so the 250GB gets left on while the 1TB drive is left off to boot OSX. Now heres where I encountered some trouble, it seems that the AppleAHCI driver is a little picky and a little to generic to work with the JMicron eSATA ports 100% properly. When I would boot in AHCI mode the HD would pause every so often for 20-30 seconds and then continue on, sometimes freezing after one of those pauses. To get around this problem I locked the 250GB hard drive via a jumper to SATA 1 / 150MB mode, that seemed to solve all of the odd spin downs and pauses I was getting in the OS and the install DVD in AHCI mode. Also worth a note here is that with my 250GB hard drive plugged into the top eSATA port I could not boot OSX at all, either a waiting for root device or a KP. After OSX was stable and not pausing anymore I decided to see what could be done about powering on the 1TB drive and using it in a hot swap / removeable manner. I noticed from a "ioreg -l" that my ports were still being recognized as SATA ports and therefore not removeable. On my system I didn't care much if both ports were recognized as being eSATA ports as they both actually are so this may not work for everyone out there, but it should at least provide a template for what changes need to be made. The kexts that will need to be modified are AppleAHCIPort.kext and IOAHCIFamily.kext, I also modified my JMicronATA.kext so I could use the PATA port. This system was installed from iATKOS v5 and updated to 10.5.6, using all vanilla options with the EFI bootloader. After install I removed the AppleVIAATA.kext as it is known to cause problems, as well as used the AppleAHCIPort and IOAHCIFamily that are patched for systems with 4+GB of ram. In AppleAHCIPort.kext my section for the JMicron in the Info.plist looks like: <key>JMicronAHCI</key> <dict> <key>CFBundleIdentifier</key> <string>com.apple.driver.AppleAHCIPort</string> <key>Chipset Name</key> <string>JMB36x AHCI</string> <key>IOClass</key> <string>AppleAHCI</string> <key>IOPCIClassMatch</key> <string>0x01060100&0xffffff00</string> <key>IOPCIPrimaryMatch</key> <string>0x2368197b 0x2363197b 0x2361197b 0x2360197b</string> <key>IOProbeScore</key> <integer>2000</integer> <key>IOProviderClass</key> <string>IOPCIDevice</string> <key>Vendor Name</key> <string>JMicron</string> <key>Protocol Characteristics</key> <dict> <key>Physical Interconnect</key> <string>ESATA</string> <key>Physical Interconnect Location</key> <string>External</string> </dict> </dict> And in IOAHCIFamily.kext my section for theAppleAHCIDiskDriver in Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/Info.plist looks like: <key>AppleAHCIDiskDriver</key> <dict> <key>CFBundleIdentifier</key> <string>com.apple.iokit.IOAHCIBlockStorage</string> <key>IOClass</key> <string>AppleAHCIDiskDriver</string> <key>IOProviderClass</key> <string>IOAHCIDevice</string> <key>Physical Interconnect</key> <string>ESATA</string> <key>Physical Interconnect Location</key> <string>External</string> <key>Protocol Characteristics</key> <dict> <key>Physical Interconnect</key> <string>ESATA</string> <key>Physical Interconnect Location</key> <string>External</string> </dict> </dict> The changes I made to the Info.plist in the JMicronATA.kext are for making sure the JMicron driver doesn't try to take over the eSATA ports, I'll list it here if anyone would like it: <key>JMicronATA PCI</key> <dict> <key>CFBundleIdentifier</key> <string>com.jmicron.JMicronATA</string> <key>Hardware Vendor</key> <string>JMicron</string> <key>IOClass</key> <string>JMicronATAPCIRoot</string> <key>IOPCIClassMatch</key> <string>0x01010000&0xffff0000</string> <key>IOPCIPrimaryMatch</key> <string>0x2360197b 0x2361197b 0x2363197b 0x2368197b</string> <key>IOProbeScore</key> <integer>10000</integer> <key>IOProviderClass</key> <string>IOPCIDevice</string> </dict> So really what seems to do it is the addition of the External and ESATA strings, after that I am able to power on the 1TB hard drive and it comes right up on the desktop. If I wish to eject it, I open disk utility, select it and press Eject Disk. It dismounts all the partitions and it disappears from the disk utility. If I want, a power cycle brings it right back to life with no drama. So as far as I can tell it's all working properly. Sorry if this had been posted before, hopefully it can help someone that's struggling with their eSATA ports. I'm including some screenshots showing that the drive can be ejected, my ioreg output, and the kexts I'm currently using. If you have any questions on it I'll do my best to help out. AppleAHCIPort.kext.zip IOAHCIFamily.kext.zip JMicronATA.kext.zip ioreg.txt Link to comment https://www.insanelymac.com/forum/topic/149308-esata-hot-plug-working-on-iatkos-v5-updated-to-1056/ Share on other sites More sharing options...
thorazine74 Posted February 6, 2009 Share Posted February 6, 2009 Interesting find, I didnt know you could set that ESATA, I thought that only has an effect on where the ports show up on System Profiler. Anyway I think we dont need to se the protocol characteristics on the AppleAHCIport plist as the IOAHCIBlockStorage.kext is further down the ioreg tree, so anything you set in AppleAHCIport will be changed by IOAHCIBlockStorage. Also I think even your disk are recognized as SATA they should be considered "removable" in the sense that you can unplug them, because the whole port is defined as "hot-pluggable", I mean technically its posible to hotplug internal SATA disks too in AHCI mode. | | | | +-o IDE0@0 <class AppleAHCIPort, registered, matched, active, busy 0, retain 12> | | | | | | { | | | | | | "IOMaximumSegmentCountRead" = 256 | | | | | | "IOMaximumSegmentByteCountWrite" = 4194304 | | | | | | "64-bit" = Yes | | | | | | "IOMaximumSegmentCountWrite" = 256 | | | | | | "AHCI-Ejectable" = No | | | | | | "IOMinimumSegmentAlignmentWrite" = 4 | | | | | | "AHCI Port ALPM" = No | | | | | | "AHCI Request Size" = 4224 | | | | | | "IOMaximumSegmentByteCountRead" = 4194304 | | | | | | "IOMinimumSegmentAlignmentRead" = 4 | | | | | | "IOPowerManagement" = {"ChildrenPowerState"=1,"CurrentPowerState"=1,"DeviceChangePowerState"=1} | | | | | | "AHCI Port SNotification" = No | | | | | | "Controller Characteristics" = {"Vendor Name"="JMicron","Port Description"="AHCI Version 1.00 Supported","Product Name"="JMB36x AHCI","Port Speed"="3 Gigabit"} | | | | | | "AHCI Port ESATA" = No | | | | | | "AHCI Request Alignment" = 128 | | | | | | "AHCI Port Hot Plug" = Yes | | | | | | "acpi-path" = "IOACPIPlane:/_SB/PCI0@0/PEX4@1c0004/JMB0@0/IDE0@0" | | | | | | "Protocol Characteristics" = {"Physical Interconnect"="SATA","Physical Interconnect Location"="Internal/External"} | | | | | | "IOPolledInterface" = "AppleAHCIPortPolledAdapter is not serializable" | | | | | | "AHCI-Built-In" = Yes Even if you set the whole controller as ESATA-External, each port is set on its own as SATA-Internal/External. Link to comment https://www.insanelymac.com/forum/topic/149308-esata-hot-plug-working-on-iatkos-v5-updated-to-1056/#findComment-1071461 Share on other sites More sharing options...
Recommended Posts