radargb Posted August 30, 2013 Share Posted August 30, 2013 Hey! Just tried new version and still no success. Can only boot in safe mode. Getting these on boot: 30.08.2013 09:02:08,000 kernel[0]: USBF: 1.702 Attempting to get EHCI Controller from BIOS 30.08.2013 09:02:08,000 kernel[0]: USBF: 1.707 USBLEGCTLSTS value 0xe0000000 30.08.2013 09:02:08,000 kernel[0]: USBF: 1.711 acquireOSOwnership done - value 0x1000001 30.08.2013 09:02:08,000 kernel[0]: USBF: 1.722 AppleUSBEHCI[0xffffff8008517000]::CheckSleepCapability - forced ON 30.08.2013 09:02:08,000 kernel[0]: USBF: 1.804 Attempting to get EHCI Controller from BIOS 30.08.2013 09:02:08,000 kernel[0]: USBF: 1.809 USBLEGCTLSTS value 0xe0000000 30.08.2013 09:02:08,000 kernel[0]: USBF: 1.813 acquireOSOwnership done - value 0x1000001 30.08.2013 09:02:08,000 kernel[0]: USBF: 1.824 AppleUSBEHCI[0xffffff800897e000]::CheckSleepCapability - forced ON 30.08.2013 09:02:08,000 kernel[0]: HWSensors Project Copyright 2013 netkas, slice, usr-sse2, kozlek, navi, THe KiNG, RehabMan. All rights reserved. 30.08.2013 09:02:08,000 kernel[0]: FakeSMCDevice: 15 preconfigured keys added 30.08.2013 09:02:08,000 kernel[0]: FakeSMCDevice: 5 keys exported by Clover EFI 30.08.2013 09:02:08,000 kernel[0]: SMC: successfully initialized 30.08.2013 09:02:08,000 kernel[0]: CPUSensors: CPU family 0x6, model 0x2a, stepping 0x7, cores 2, threads 4, TJmax 100 30.08.2013 09:02:08,000 kernel[0]: CPUSensors: setting platform to k62 30.08.2013 09:02:08,000 kernel[0]: SuperIODevice: [Fatal] found unsupported ship ID=0xffff 30.08.2013 09:02:08,000 kernel[0]: PTIDSensors: started 30.08.2013 09:02:08,000 kernel[0]: mbinit: done [96 MB total pool size, (64/32) split] 30.08.2013 09:02:08,000 kernel[0]: Pthread support ABORTS when sync kernel primitives misused 30.08.2013 09:02:08,000 kernel[0]: USBF: 2. 43 AppleUSBXHCI[0xffffff80c7de8000]::CheckSleepCapability - forced ON Any clues? Link to comment Share on other sites More sharing options...
giacomoleopardo Posted August 30, 2013 Share Posted August 30, 2013 As for ASM1042: I noticed in GenericUSBXHCI that it uses 32bit registers instead of 64bit ones. This will need more work... As a matter of fact V9 doesn't work on ASM1042 (ML 10.8.4 - ASRock Z77E-ITX) Link to comment Share on other sites More sharing options...
bcc9 Posted August 30, 2013 Share Posted August 30, 2013 V9 doesn't work for me. Upon resume from sleep, same setPowerState() timeout as always. Then, 1 minute later: Aug 30 13:41:47 hostname kernel[0]: [0xffffff8011443000](0)/(5) Device not responding and the disk unmounts. Update: V8 is failing for me this same way too. I don't know why it worked on that 1 previous attempt. Link to comment Share on other sites More sharing options...
Slice Posted August 31, 2013 Share Posted August 31, 2013 Hi Andy! Great work! I took your sources V9, added errata for my VIA VL800 controller and it works! Read 420Mb from USB3 stick is about 7sec. Aug 31 13:19:53 localhost kernel[0]: USBF: 4614.150 AppleUSBXHCI[0xffffff80d7093000]::CheckSleepCapability - forced ON Aug 31 13:19:53 localhost kernel[0]: USBMSC Identifier (non-unique): 000000000000000044 0x1f75 0x916 0xd Aug 31 13:19:54 localhost kernel[0]: USBF: 4615.101 AppleUSBXHCI[0xffffff80d7093000]::WaitForCMD (Configure Endpoint Command) - Command failed:-1017 (num interrupts: 81, num primary: 81, inactive:0, unavailable:0, is controller available:1) Aug 31 13:19:54 localhost kernel[0]: USBF: 4615.101 AppleUSBXHCI[0xffffff80d7093000]::PrintInterrupter WaitForCMD IRQ:0 - IMAN: 00000002 IMOD: 000000a0 ERDP: 7c361690 Aug 31 13:19:54 localhost kernel[0]: USBF: 4615.101 AppleUSBXHCI[0xffffff80d7093000]::ClearEndpoint - configure endpoint failed:-1017 Aug 31 13:19:54 localhost kernel[0]: USBF: 4615.101 AppleUSBXHCI[0xffffff80d7093000]::ClearEndpoint - Input Context 0 Aug 31 13:19:54 localhost kernel[0]: USBF: 4615.101 AppleUSBXHCI[0xffffff80d7093000]::ClearEndpoint - Input Context 1 Aug 31 13:19:54 localhost kernel[0]: USBF: 4615.101 AppleUSBXHCI[0xffffff80d7093000]::ClearEndpoint - Input Context X Aug 31 13:19:54 localhost fseventsd[51]: check_vol_last_mod_time:XXX failed to get mount time (25; &mount_time == 0x10d058518) Aug 31 13:19:54 localhost fseventsd[51]: log dir: /Volumes/NO NAME/.fseventsd getting new uuid: 50721F07-F6D7-42B8-B39E-E15AAE719885 I think some more sources tuning is needed. PS. I have no patches in DSDT concerning XHCI. I think we may exclude acpi calls from the driver. 1 Link to comment Share on other sites More sharing options...
pokenguyen Posted August 31, 2013 Share Posted August 31, 2013 Your kext works with Renesas controller in my laptop: 9/1/13 1:35:43.000 AM kernel[0]: USBF: 0.233 Attempting to get EHCI Controller from BIOS 9/1/13 1:35:43.000 AM kernel[0]: USBF: 0.233 USBLEGCTLSTS value 0xe0000000 9/1/13 1:35:43.000 AM kernel[0]: USBF: 0.233 acquireOSOwnership done - value 0x1000001 9/1/13 1:35:43.000 AM kernel[0]: USBF: 0.240 Attempting to get EHCI Controller from BIOS 9/1/13 1:35:43.000 AM kernel[0]: USBF: 0.240 USBLEGCTLSTS value 0xe0000000 9/1/13 1:35:43.000 AM kernel[0]: USBF: 0.240 acquireOSOwnership done - value 0x1000001 9/1/13 1:35:43.000 AM kernel[0]: USBF: 0.240 AppleUSBXHCI[0xffffff80d16f3000]::CheckSleepCapability - forced ON 9/1/13 1:35:43.000 AM kernel[0]: USBF: 0.241 AppleUSBEHCI[0xffffff8011afd000]::CheckSleepCapability - forced ON 9/1/13 1:35:43.000 AM kernel[0]: USBF: 0.249 AppleUSBEHCI[0xffffff8011d51000]::CheckSleepCapability - forced ON However, after sleep, all the usb 3.0 ports do not work anymore, even after plugging in again. The device names in System Profiler don't refresh. Here are the log after sleep: 9/1/13 1:40:16.609 AM com.apple.usbmuxd[30]: DeviceRequestAsync failed: 0xe0004057 9/1/13 1:40:17.000 AM kernel[0]: USBF: 240.130 IOUSBHIDDriver(IOUSBHIDDriver)[0xffffff801310b400]::RearmInterruptRead returning error 0xe0004057 (Endpoint does not exist), not issuing any reads to device 9/1/13 1:40:21.610 AM com.apple.usbmuxd[30]: DeviceRequestAsync failed: 0xe0004057 9/1/13 1:40:23.108 AM com.apple.usbmuxd[30]: SCEDeviceSocketCallback 0x101803400-iTunes/com.apple.iTunes remote peer closed connection for sce 0x101803400. 9/1/13 1:40:26.610 AM com.apple.usbmuxd[30]: DeviceRequestAsync failed: 0xe0004057 9/1/13 1:40:27.162 AM com.apple.usbmuxd[30]: _heartbeat_failed heartbeat detected detach for device 0x2-192.168.1.7:0! 9/1/13 1:40:31.610 AM com.apple.usbmuxd[30]: DeviceRequestAsync failed: 0xe0004057 9/1/13 1:40:36.611 AM com.apple.usbmuxd[30]: DeviceRequestAsync failed: 0xe0004057 9/1/13 1:40:39.528 AM com.apple.usbmuxd[30]: WriteAsyncInternal USB write error on 0x3-6ae2335bca842c6308ed1d7dcce38f4ac43ce726@0xfc200000: 0xe0004057 9/1/13 1:40:39.529 AM com.apple.usbmuxd[30]: MuxInterfaceSend send failed on 0x3-6ae2335bca842c6308ed1d7dcce38f4ac43ce726@0xfc200000: 0xe0004057 9/1/13 1:40:39.529 AM com.apple.usbmuxd[30]: HandleUSBMuxConnect Client 0x101a030a0-iTunes/com.apple.iTunes MuxTCPInitiateConnect failed 9/1/13 1:40:41.611 AM com.apple.usbmuxd[30]: DeviceRequestAsync failed: 0xe0004057 9/1/13 1:40:46.613 AM com.apple.usbmuxd[30]: DeviceRequestAsync failed: 0xe0004057 The GenericXHCI works perfectly with my system. Link to comment Share on other sites More sharing options...
Slice Posted September 1, 2013 Share Posted September 1, 2013 And vice versa. GenericXHCI don't work for me after sleep while V9 works with some problems. I am going to correct them. EDITED. At now I have two problems: where to get sources for IsPortMuxed and HandleLinkState. Apple's sources are just incomplete. Link to comment Share on other sites More sharing options...
Andy Vandijck Posted September 1, 2013 Author Share Posted September 1, 2013 And vice versa. GenericXHCI don't work for me after sleep while V9 works with some problems. I am going to correct them. EDITED. At now I have two problems: where to get sources for IsPortMuxed and HandleLinkState. Apple's sources are just incomplete. They are part of IOUSBFamily's IOUSBController. They are not open source. You can use the original IOUSBFamily and only replace AppleUSB*HCI.kext in the kext's plugins. HandleLinkstate is part of AppleUSBHub.kext @Slice: New diff. (V10 patch) This version can build a mostly working IOUSBFamily. - SetPortPower and GetPortPower is implemented. However - 2 issues remain. - HandleLinkState only crudely implemented (but seems to work) - IsPortMuxed is implemented but the underlying ACPI method doesn't work yet (don't know for which ACPI method to check, etc) It works but USB2 on USB3 port doesn't work in case of a multiplexed controller (like Intel Panther Point) IsPortMuxed's ACPI check method needs to be implemented... Other than that it works... I still recommend only using AppleUSB*HCI.kext with original IOUSBFamily.kext Link to comment Share on other sites More sharing options...
Slice Posted September 1, 2013 Share Posted September 1, 2013 Andy,I also make implementations for AppleUSBHub::SetPortPower, AppleUSBHub::HandleLinkState,AppleUSBXHCI::IsPortMuxed,AppleUSBEHCI::GetErrataBits, IOUSBControllerV3::GetErrataBits,And after that I am able to use full IOUSBFamily.kext as created from the project. With V9 I had repeating follow message after wake: now it will not appear. But again. I can't mount USB stick after wake. See my diff compared to vanilla project. It includes your diff v9. IOUSBFamily-560.4.2-SL.diff.zip May be we create a project on sf.net and will commit our changes? In Clover I made and tested the follow DSDT fix (rev 1996): Originally it was Device (RP06) { Name (_ADR, 0x001C0005) // _ADR: Address ... Device (PXSX) { Name (_ADR, Zero) // _ADR: Address Name (_PRW, Package (0x02) // _PRW: Power Resources for Wake { 0x09, 0x04 }) } My PCIe USB3 adapter occupies this slot and PXSX becomes to be XHCI device. So Clover find where the adapter inserted and made renaming to XHC1 and add _DSM method with properties as you said Device (XHC1) { Name (_ADR, Zero) Name (_PRW, Package (0x02) { 0x09, 0x04 }) Method (_DSM, 4, NotSerialized) { Store (Package (0x13) { "device-id", Buffer (0x04) ... For properties XHCA, XHCB, ... I made additional SSDT. One have to change names in it to correspond his configuration. DefinitionBlock ("SSDT-1.aml", "SSDT", 1, "USB3", "XHCIDEV", 0x00030000) { External (\_SB_.PCI0.RP06.XHC1, DeviceObj) Scope (\_SB.PCI0.RP06.XHC1) { OperationRegion (XH1C, PCI_Config, 0xD0, 0x10) Field (XH1C, ByteAcc, NoLock, Preserve) { PAHC, 1, PBHC, 1, PCHC, 1, PDHC, 1, Offset (0x08), PASS, 1, PBSS, 1, PCSS, 1, PDSS, 1 } Instead of _SB.PCI0.RP06.XHC1 one must write his name. SSDT-10.dsl.zip No need to make fix ownership because Clover and Chameleon already did this. Link to comment Share on other sites More sharing options...
Andy Vandijck Posted September 1, 2013 Author Share Posted September 1, 2013 Andy, I also make implementations for AppleUSBHub::SetPortPower, AppleUSBHub::HandleLinkState,AppleUSBXHCI::IsPortMuxed, AppleUSBEHCI::GetErrataBits, IOUSBControllerV3::GetErrataBits, And after that I am able to use full IOUSBFamily.kext as created from the project. With V9 I had repeating follow message after wake: Screen Shot 2013-08-31 at 18.01.00.png now it will not appear. But again. I can't mount USB stick after wake. See my diff compared to vanilla project. It includes your diff v9. IOUSBFamily-560.4.2-SL.diff.zip May be we create a project on sf.net and will commit our changes? In Clover I made and tested the follow DSDT fix (rev 1996): Originally it was Device (RP06) { Name (_ADR, 0x001C0005) // _ADR: Address ... Device (PXSX) { Name (_ADR, Zero) // _ADR: Address Name (_PRW, Package (0x02) // _PRW: Power Resources for Wake { 0x09, 0x04 }) } My PCIe USB3 adapter occupies this slot and PXSX becomes to be XHCI device.So Clover find where the adapter inserted and made renaming to XHC1 and add _DSM method with properties as you said Device (XHC1) { Name (_ADR, Zero) Name (_PRW, Package (0x02) { 0x09, 0x04 }) Method (_DSM, 4, NotSerialized) { Store (Package (0x13) { "device-id", Buffer (0x04) ...For properties XHCA, XHCB, ... I made additional SSDT. One have to change names in it to correspond his configuration. DefinitionBlock ("SSDT-1.aml", "SSDT", 1, "USB3", "XHCIDEV", 0x00030000) { External (\_SB_.PCI0.RP06.XHC1, DeviceObj) Scope (\_SB.PCI0.RP06.XHC1) { OperationRegion (XH1C, PCI_Config, 0xD0, 0x10) Field (XH1C, ByteAcc, NoLock, Preserve) { PAHC, 1, PBHC, 1, PCHC, 1, PDHC, 1, Offset (0x08), PASS, 1, PBSS, 1, PCSS, 1, PDSS, 1 } Instead of _SB.PCI0.RP06.XHC1 one must write his name.SSDT-10.dsl.zip No need to make fix ownership because Clover and Chameleon already did this. Great, good work.I think making an sf page for the project is a great plan. Link to comment Share on other sites More sharing options...
Mirone Posted September 1, 2013 Share Posted September 1, 2013 Still not working for me. Andy made new changes to Asmedia 1042? with GenericXHCI.kext or Caldigit.kext for the sleep function normally use this method in Device RP04/PSXS: Device (RP04) { Name (_ADR, 0x001C0003) Name (_HPP, Package (0x04) { 0x08, 0x40, One, Zero }) OperationRegion (PXCS, PCI_Config, 0x40, 0xC0) Field (PXCS, AnyAcc, NoLock, Preserve) { Offset (0x10), L0SE, 1, Offset (0x11), Offset (0x12), , 13, LASX, 1, Offset (0x14), , 6, HPCE, 1, Offset (0x1A), ABPX, 1, , 2, PDCX, 1, , 2, PDSX, 1, Offset (0x1B), Offset (0x20), Offset (0x22), PSPX, 1, Offset (0x98), , 30, HPEX, 1, PMEX, 1 } Field (PXCS, AnyAcc, NoLock, WriteAsZeros) { Offset (0x94), , 1, EIFD, 1, Offset (0x95), Offset (0x9C), , 30, HPSX, 1, PMSX, 1 } Device (PXSX) { Name (_ADR, Zero) Name (_PRW, Package (0x02) { 0x09, 0x04 }) Method (_DSM, 4, NotSerialized) { Store (Package (0x12) { "AAPL,clock-id", Buffer (One) { 0x02 }, "AAPL,device-internal", Buffer (One) { 0x00 }, "name", "ASMedia XHCI Controller", "model", Buffer (0x28) { "ASMedia ASM1042 USB 3.0 xHCI Controller" }, "device_type", Buffer (0x0F) { "USB Controller" }, "AAPL,current-available", 0x0834, "AAPL,current-extra", 0x0898, "AAPL,current-extra-in-sleep", 0x0640, "AAPL,max-port-current-in-sleep", 0x0834 }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) } } Link to comment Share on other sites More sharing options...
Slice Posted September 2, 2013 Share Posted September 2, 2013 Hi Andy, I merged your changes V10 with my and have no questions. Thank you for the "include" corrections. Will test and debug the new version. I noticed some strange thing. IOUSBFamily(logging) works better then "deployment". Why? It means some of USBLog() make a significant change if present. But I can't find what is it. 1 Link to comment Share on other sites More sharing options...
Andy Vandijck Posted September 2, 2013 Author Share Posted September 2, 2013 Hi Andy, I merged your changes V10 with my and have no questions. Thank you for the "include" corrections. Will test and debug the new version. I noticed some strange thing. IOUSBFamily(logging) works better then "deployment". Why? It means some of USBLog() make a significant change if present. But I can't find what is it. Maybe because there is that delay when it passes it to the log. Some of the USB functions work better when they are delay for a few msecs. If you are done with it, will you upload a diff or will we just make a project page? Let me know please EDIT: Also just updated to Clover R2010. I like the new structure of the config.plist. Just updated my old config.plist and it works well... Thx for that too Could you take a peek if you have time to see if I did the new config.plist I uploaded here right? Thanks in advance config.plist.zip Link to comment Share on other sites More sharing options...
Slice Posted September 3, 2013 Share Posted September 3, 2013 Hi Andy, New observation with my latest version: After wake it can't make it working inactive:0, unavailable:0, is controller available:1) USBF: 879.956 AppleUSBXHCI[0xffffff80d2f1c000]::PrintInterrupter WaitForCMD IRQ:0 - IMAN: 00000002 IMOD: 000000a0 ERDP: 7c002e10 USBF: 879.956 AppleUSBXHCI[0xffffff80d2f1c000]::SetTRDQPtr - slot context error USBF: 880.483 AppleUSBXHCI[0xffffff80d2f1c000]::WaitForCMD (Set TR Dequeue Pointer Command) - Command not completed in 502ms USBF: 886.143 AppleUSBXHCI[0xffffff80d2f1c000]::WaitForCMD (Set TR Dequeue Pointer Command) - abort, command ring did not stop, count = 5000.1000, ret: -1 USBF: 886.143 AppleUSBXHCI[0xffffff80d2f1c000]::WaitForCMD (Set TR Dequeue Pointer Command) - Command failed:-1 (num interrupts: 19353, num primary: 19353, inactive:0, unavailable:0, is controller available:1) USBF: 886.144 AppleUSBXHCI[0xffffff80d2f1c000]::PrintInterrupter WaitForCMD IRQ:0 - IMAN: 00000002 IMOD: 000000a0 ERDP: 7c002e10 USBF: 886.144 AppleUSBXHCI[0xffffff80d2f1c000]::SetTRDQPtr - slot context error USBF: 888.671 AppleUSBXHCI[0xffffff80d2f1c000]::WaitForCMD (Set TR Dequeue Pointer Command) - Command not completed in 502ms USBF: 894.329 AppleUSBXHCI[0xffffff80d2f1c000]::WaitForCMD (Set TR Dequeue Pointer Command) - abort, command ring did not stop, count = 5000.1000, ret: -1 USBF: 894.329 AppleUSBXHCI[0xffffff80d2f1c000]::WaitForCMD (Set TR Dequeue Pointer Command) - Command failed:-1 (num interrupts: 19353, num primary: 19353, But then I make sudo kextunload -v /System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBXHCI.kext and then load again sudo kextutil -v /System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBXHCI.kext And victory! The USB stick is working again! The log of the action: USBF: 963.719 AppleUSBXHCI[0xffffff80d2f1c000]::PrintInterrupter WaitForCMD IRQ:0 - IMAN: 00000002 IMOD: 000000a0 ERDP: 7c002e10 USBF: 963.719 AppleUSBXHCI[0xffffff80d2f1c000]::UIMCreateControlEndpoint 2 - Enable slot failed:-1 USBF: 963.719 AppleUSBXHCI[0xffffff80d2f1c000]::UIMCreateControlTransfer 2 - unallocated slot ID: fn 0, returning kIOUSBEndpointNotFound USBF: 963.750 AppleUSBXHCI[0xffffff80d2f1c000]::UIMCreateControlTransfer 2 - unallocated slot ID: fn 0, returning kIOUSBEndpointNotFound USBF: 963.781 AppleUSBXHCI[0xffffff80d2f1c000]::UIMCreateControlTransfer 2 - unallocated slot ID: fn 0, returning kIOUSBEndpointNotFound USBF: 963.785 AppleUSBXHCI[0xffffff80d2f1c000]::UIMCreateControlTransfer 2 - unallocated slot ID: fn 0, returning kIOUSBEndpointNotFound USBF: 963.815 AppleUSBXHCI[0xffffff80d2f1c000]::UIMCreateInterruptEndpoint 2 - Unused slot ID for functionAddress: 1 USBF: 963.815 AppleUSBXHCI[0xffffff80d2f1c000]::UIMCreateControlEndpoint 2 - unknown function number: 1 USBF: 963.815 AppleUSBXHCI[0xffffff80d2f1c000]::UIMAbortStream - unknown function number: 1 USBF: 963.815 AppleUSBXHCI[0xffffff80d2f1c000]::UIMAbortStream - unknown function number: 1 USBF: 964.775 AppleUSBXHCI[0xffffff80d2f1c000]::WaitForCMD (Enable Slot Command) - Command not completed in 502ms USBF: 970.431 AppleUSBXHCI[0xffffff80d2f1c000]::WaitForCMD (Enable Slot Command) - abort, command ring did not stop, count = 5000.1000, ret: -1 USBF: 970.431 AppleUSBXHCI[0xffffff80d2f1c000]::WaitForCMD (Enable Slot Command) - Command failed:-1 (num interrupts: 19353, num primary: 19353, inactive:0, unavailable:0, is controller available:1) USBF: 970.431 AppleUSBXHCI[0xffffff80d2f1c000]::PrintInterrupter WaitForCMD IRQ:0 - IMAN: 00000002 IMOD: 000000a0 ERDP: 7c002e10 USBF: 970.431 AppleUSBXHCI[0xffffff80d2f1c000]::UIMCreateControlEndpoint 2 - Enable slot failed:-1 USBF: 975.517 AppleUSBXHCI[0xffffff80d2f1c000]::UIMFinalize USBF: 1346.527 AppleUSBXHCI[0xffffff80d2f2f000]::CheckSleepCapability - forced ON USBF: 1347.373 AppleUSBXHCI[0xffffff80d2f2f000]::WaitForCMD (Configure Endpoint Command) - Command failed:-1017 (num interrupts: 35, num primary: 35, inactive:0, unavailable:0, is controller available:1) USBF: 1347.373 AppleUSBXHCI[0xffffff80d2f2f000]::PrintInterrupter WaitForCMD IRQ:0 - IMAN: 00000002 IMOD: 000000a0 ERDP: 7c022300 USBF: 1347.373 AppleUSBXHCI[0xffffff80d2f2f000]::ClearEndpoint - configure endpoint failed:-1017 USBF: 1347.373 AppleUSBXHCI[0xffffff80d2f2f000]::ClearEndpoint - Input Context 0 USBF: 1347.373 AppleUSBXHCI[0xffffff80d2f2f000]::ClearEndpoint - Input Context 1 USBF: 1347.373 AppleUSBXHCI[0xffffff80d2f2f000]::ClearEndpoint - Input Context X USBF: 1442.594 AppleUSBXHCI[0xffffff80d2f2f000]::RestartStreams - called on non streams endpoint 2, 1 USBF: 1449.599 AppleUSBXHCI[0xffffff80d2f2f000]::RestartStreams - called on non streams endpoint 2, 1 USBF: 1463.611 AppleUSBXHCI[0xffffff80d2f2f000]::RestartStreams - called on non streams endpoint 2, 1 USBF: 1470.615 AppleUSBXHCI[0xffffff80d2f2f000]::RestartStreams - called on non streams endpoint 2, 1 USBF: 1484.628 AppleUSBXHCI[0xffffff80d2f2f000]::RestartStreams - called on non streams endpoint 2, 1 USBF: 1491.633 AppleUSBXHCI[0xffffff80d2f2f000]::RestartStreams - called on non streams endpoint 2, 1 USBF: 1506.636 AppleUSBXHCI[0xffffff80d2f2f000]::RestartStreams - called on non streams endpoint 2, 1 USBF: 1513.638 AppleUSBXHCI[0xffffff80d2f2f000]::RestartStreams - called on non streams endpoint 2, 1 USBF: 1520.673 AppleXHCIAsyncEndpoint[0xffffff8016f43200]::free 12 ATDs in doneQueue returning as 0xe00002eb USBMSC Identifier (non-unique): 000000000000000044 0x1f75 0x916 0xd It mean procedures for init controller are different for Start and for Wake. I think we can correct this. May latest sources: IOUSBFamily-560.4.2-Sl10.diff.zip Link to comment Share on other sites More sharing options...
bcc9 Posted September 3, 2013 Share Posted September 3, 2013 Hi Andy, New observation with my latest version: After wake it can't make it working Welcome to the club Nice observation that it works with kextunload/kextload. So we could work around this bug with sleepwatcher doing the unload/load automatically. Link to comment Share on other sites More sharing options...
Slice Posted September 3, 2013 Share Posted September 3, 2013 Maybe because there is that delay when it passes it to the log. Some of the USB functions work better when they are delay for a few msecs. If you are done with it, will you upload a diff or will we just make a project page? Let me know please EDIT: Also just updated to Clover R2010. I like the new structure of the config.plist. Just updated my old config.plist and it works well... Thx for that too Could you take a peek if you have time to see if I did the new config.plist I uploaded here right? Thanks in advance Sorry but apianti is not finished the revolution. Don't use 2010. Last working revision is 1999. Welcome to the club Nice observation that it works with kextunload/kextload. So we could work around this bug with sleepwatcher doing the unload/load automatically. I think I am able to do this in driver. I don't know about some keys in Info.plist introduced by AnV. May be they help? Link to comment Share on other sites More sharing options...
Andy Vandijck Posted September 3, 2013 Author Share Posted September 3, 2013 Sorry but apianti is not finished the revolution. Don't use 2010. Last working revision is 1999. I think I am able to do this in driver. I don't know about some keys in Info.plist introduced by AnV. May be they help? Yes it should be possible to unload the UIM, and reinitialize the UIM.On some USB controllers this doesn't work however and I did put in a Force... key in AppleUSBXHCI's Info.plist. When this key is set, it won't do regular sleep, it unloads the controller when sleeping and loads the controller back after sleep. One problem: when a disk is mounted it will say it was badly unmounted. So for these controllers it needs more work. Link to comment Share on other sites More sharing options...
Mirone Posted September 3, 2013 Share Posted September 3, 2013 @Andy Some progress towards chips Asmedia 1042? All the best!! 1 Link to comment Share on other sites More sharing options...
Slice Posted September 3, 2013 Share Posted September 3, 2013 Yes it should be possible to unload the UIM, and reinitialize the UIM. On some USB controllers this doesn't work however and I did put in a Force... key in AppleUSBXHCI's Info.plist. When this key is set, it won't do regular sleep, it unloads the controller when sleeping and loads the controller back after sleep. One problem: when a disk is mounted it will say it was badly unmounted. So for these controllers it needs more work. Yes, Andy. As my controller is PCIe it probably can't sleep so I correct my Info.plist to have SleepFix=NO NoSleepForce=Yes Additionally I made many declarations into my SSDT for XHCI according to the guide. This is the result And I made new correction to HCSelect and Muxed support to be non-acpi method, I used Pci methods configRead... Victory!!! The driver works at full speed after sleep/wake. For those who doesn't know yet: I have 4-ports USB3.0 PCIe controller "Orient VA-3U4PE" with chip VIA VL800-Q8 DeviceID=0x3432 VendorID=0x1106 Revision=3 PS. Why I can't upload files here? Link to comment Share on other sites More sharing options...
Andy Vandijck Posted September 3, 2013 Author Share Posted September 3, 2013 Yes, Andy. As my controller is PCIe it probably can't sleep so I correct my Info.plist to have SleepFix=NO NoSleepForce=Yes Additionally I made many declarations into my SSDT for XHCI according to the guide. This is the result And I made new correction to HCSelect and Muxed support to be non-acpi method, I used Pci methods configRead... Victory!!! The driver works at full speed after sleep/wake. For those who doesn't know yet: I have 4-ports USB3.0 PCIe controller "Orient VA-3U4PE" with chip VIA VL800-Q8 DeviceID=0x3432 VendorID=0x1106 Revision=3 PS. Why I can't upload files here? Cool.If it works right we should share it with everybody. If you would share the diff we could compile it and modify the first post. Great work on the mux methods. I look forward to test it on my Intel Panther Point I have... Link to comment Share on other sites More sharing options...
Slice Posted September 4, 2013 Share Posted September 4, 2013 My files SSDT-10.aml.zip IOUSBFamily-560.4.2-Sl11.diff.zip AppleUSBXHCI.kext.zip All is fine now. Just cold start is slow with messages USBF: 91.305 AppleUSBXHCI[0xffffff80fbee4000]::RestartStreams - called on non streams endpoint 1, 1 USBF: 98.308 AppleUSBXHCI[0xffffff80fbee4000]::RestartStreams - called on non streams endpoint 1, 1 USBF: 112.314 AppleUSBXHCI[0xffffff80fbee4000]::RestartStreams - called on non streams endpoint 1, 1 USBF: 119.316 AppleUSBXHCI[0xffffff80fbee4000]::RestartStreams - called on non streams endpoint 1, 1 USBF: 133.323 AppleUSBXHCI[0xffffff80fbee4000]::RestartStreams - called on non streams endpoint 1, 1 USBF: 140.325 AppleUSBXHCI[0xffffff80fbee4000]::RestartStreams - called on non streams endpoint 1, 1 USBF: 154.330 AppleUSBXHCI[0xffffff80fbee4000]::RestartStreams - called on non streams endpoint 1, 1 After 8 restarts all work. 1 Link to comment Share on other sites More sharing options...
Andy Vandijck Posted September 4, 2013 Author Share Posted September 4, 2013 My files SSDT-10.aml.zip IOUSBFamily-560.4.2-Sl11.diff.zip AppleUSBXHCI.kext.zip All is fine now. Just cold start is slow with messages USBF: 91.305 AppleUSBXHCI[0xffffff80fbee4000]::RestartStreams - called on non streams endpoint 1, 1 USBF: 98.308 AppleUSBXHCI[0xffffff80fbee4000]::RestartStreams - called on non streams endpoint 1, 1 USBF: 112.314 AppleUSBXHCI[0xffffff80fbee4000]::RestartStreams - called on non streams endpoint 1, 1 USBF: 119.316 AppleUSBXHCI[0xffffff80fbee4000]::RestartStreams - called on non streams endpoint 1, 1 USBF: 133.323 AppleUSBXHCI[0xffffff80fbee4000]::RestartStreams - called on non streams endpoint 1, 1 USBF: 140.325 AppleUSBXHCI[0xffffff80fbee4000]::RestartStreams - called on non streams endpoint 1, 1 USBF: 154.330 AppleUSBXHCI[0xffffff80fbee4000]::RestartStreams - called on non streams endpoint 1, 1 After 8 restarts all work. Just took a look to the new HCSelect and IsPortMuxed methods. I like them. Looks like it checks if the port is attached to an EHCI or XHCI controller rather than doing ACPI lookup. This has to be really efficient. Gonna build and upload full IOUSBFamily for everybody this evening as I'm not home right now. I also have the chance to test it on Intel Panther Point myself (as I have one of these). Really great work EDIT: You are right... my uploads fail too... Odd... 1 Link to comment Share on other sites More sharing options...
doof Posted September 4, 2013 Share Posted September 4, 2013 560.4 works well for me on p8p67 pro. GenericUSB3 didn't pick up the second hub. Link to comment Share on other sites More sharing options...
Andy Vandijck Posted September 4, 2013 Author Share Posted September 4, 2013 The new version with our combined work is available from the first post. Also the new diff to build it... @Slice: Thanks, I'll test it now on my Intel Panther Point (muxing). Ow... I just saw that with your diff sleep support is disabled by default and sleep is forced off... Just uploaded version of AppeUSBXHCI.kext with PM re-enabled below... EDIT3: V12: Default is now sleep enabled... also in patch... EDIT: @Slice: just tested. No USB2 device functions on Intel Panther Point and the power state keeps in LOW mode. So on Intel Panther Point controllers we need original IOUSBFamily.kext with only AppleUSBXHCI, AppleUSBOHCI, AppleUSBUHCI and AppleUSBEHCI replaced. Otherwise also always low power state... see below: EDIT2: Hmm... still no go... seems to be the power parameters... gonna fix them... EDIT3: Ok, gonna test new version (V12). This should fix the USB3 problems on Intel Panther Point. I modded the default current in AppleUSBXHCI and removed the added errata from IOUSBController's errata (seems not to work right)... EDIT4: Aaargh! what's wrong with this picture... still LOW POWER even with no device plugged... very frustrating... No... no go on Intel Panther Point decently... reverted to V9... The device keeps getting stuck on LOW POWER, even with no device plugged in... EDIT5: Ok... now I've got it to work installed only new AppleUSB*HCI kexts with original IOUSBFamily, unplugged everything, complete shutdown after clearing caches and boot again. Now it works but it still complains about power when I plug in a USB2 device. If I unplug it, it works again... EDIT6: No succes with HSUserClient, see .ioreg file (XHC1). If I plug in a USB2 device (like my USB2 stick), it switched the status to ON however: it keeps on making new HSUserClients and never mounts the device. USB3 HD works however... EDIT7: With V9, if I plug in a USB2 device into USB3 port, it works and auto attaches on the correct EHCI port within seconds... Did something change to the mux methods in AppleUSBXHCI? They don't seem to work right for Intel Panther Point on V11/V12... So for now, if you have Intel Panther Point, use V9... we need to sift this out... @Slice, could you please check? Second uploaded pic is with V9 (USB2 Flash Memory plugged into USB3 port and muxed on EHCI hub)... It attached on EHC1 properly... IOReg file with proper function is the second... iMac van Andy - look at AppleHSHubUserClient.zip iMac van Andy - Proper muxing.zip 1 Link to comment Share on other sites More sharing options...
Slice Posted September 5, 2013 Share Posted September 5, 2013 Ya, strange. I see LOW POWER too but stick is working. Then I press "Eject" and power becomes "ON". Error is in the USBProber? Related messages Sep 4 23:21:58.423 [3] AppleUSBXHCI[0xffffff80fbee4000]::UIMRootHubStatusChange got bitmap (0x20) Sep 4 23:21:58.423 [3] AppleUSBHub[0xffffff803d00c000]::ChangeRaisedPowerState(+) now (1) Sep 4 23:21:58.423 [3] AppleUSBXHCI[0xffffff80fbee4000]::GetRootHubPortStatus port: 5, portSC: 0x0e001203, status: 0x0203, change: 0x0000, portIsDebouncing: 0 Sep 4 23:21:58.459 [3] AppleUSBHub[0xffffff803d00c000]::HubAreAllPortsDisconnectedOrSuspended - port 4 still initing, status changing, or adding a device (0/1/0) Sep 4 23:21:58.524 [3] AppleUSBHub[0xffffff803d00c000]::ChangeRaisedPowerState(+) now (2) Sep 4 23:21:58.524 [3] AppleUSBHub[0xffffff803d00c000]::ChangeRaisedPowerState(-) now (1) Sep 4 23:21:58.524 [3] AppleUSBHub[0xffffff803d00c000]::DecrementOutstandingIO(363), outstandingIO(0), _interruptReadPending(false) - rearming read Sep 4 23:21:58.524 [3] AppleUSBXHCI[0xffffff80fbee4000]::UIMCreateInterruptTransfer - root hub interrupt transfer - clearing unneeded memDesc (0xffffff803d01f500) from dmaCommand (0xffffff803ce4e780) Sep 4 23:21:58.525 [3] AppleUSBXHCI[0xffffff80fbee4000]::GetRootHubPortStatus port: 5, portSC: 0x0e201203, status: 0x0203, change: 0x0010, portIsDebouncing: 0 Sep 4 23:21:58.525 [3] AppleUSBHub[0xffffff803d00c000]::ChangeRaisedPowerState(-) now (0) Sep 4 23:21:58.556 [3] AppleUSBXHCI[0xffffff80fbee4000]::UIMRootHubStatusChange got bitmap (0x20) Sep 4 23:21:58.556 [3] AppleUSBHub[0xffffff803d00c000]::ChangeRaisedPowerState(+) now (1) Sep 4 23:21:58.589 [3] AppleUSBXHCI[0xffffff80fbee4000]::UIMRootHubStatusChange got bitmap (0x20) Link to comment Share on other sites More sharing options...
Andy Vandijck Posted September 5, 2013 Author Share Posted September 5, 2013 Ya, strange. I see LOW POWER too but stick is working. Then I press "Eject" and power becomes "ON". Error is in the USBProber? Related messages Sep 4 23:21:58.423 [3] AppleUSBXHCI[0xffffff80fbee4000]::UIMRootHubStatusChange got bitmap (0x20) Sep 4 23:21:58.423 [3] AppleUSBHub[0xffffff803d00c000]::ChangeRaisedPowerState(+) now (1) Sep 4 23:21:58.423 [3] AppleUSBXHCI[0xffffff80fbee4000]::GetRootHubPortStatus port: 5, portSC: 0x0e001203, status: 0x0203, change: 0x0000, portIsDebouncing: 0 Sep 4 23:21:58.459 [3] AppleUSBHub[0xffffff803d00c000]::HubAreAllPortsDisconnectedOrSuspended - port 4 still initing, status changing, or adding a device (0/1/0) Sep 4 23:21:58.524 [3] AppleUSBHub[0xffffff803d00c000]::ChangeRaisedPowerState(+) now (2) Sep 4 23:21:58.524 [3] AppleUSBHub[0xffffff803d00c000]::ChangeRaisedPowerState(-) now (1) Sep 4 23:21:58.524 [3] AppleUSBHub[0xffffff803d00c000]::DecrementOutstandingIO(363), outstandingIO(0), _interruptReadPending(false) - rearming read Sep 4 23:21:58.524 [3] AppleUSBXHCI[0xffffff80fbee4000]::UIMCreateInterruptTransfer - root hub interrupt transfer - clearing unneeded memDesc (0xffffff803d01f500) from dmaCommand (0xffffff803ce4e780) Sep 4 23:21:58.525 [3] AppleUSBXHCI[0xffffff80fbee4000]::GetRootHubPortStatus port: 5, portSC: 0x0e201203, status: 0x0203, change: 0x0010, portIsDebouncing: 0 Sep 4 23:21:58.525 [3] AppleUSBHub[0xffffff803d00c000]::ChangeRaisedPowerState(-) now (0) Sep 4 23:21:58.556 [3] AppleUSBXHCI[0xffffff80fbee4000]::UIMRootHubStatusChange got bitmap (0x20) Sep 4 23:21:58.556 [3] AppleUSBHub[0xffffff803d00c000]::ChangeRaisedPowerState(+) now (1) Sep 4 23:21:58.589 [3] AppleUSBXHCI[0xffffff80fbee4000]::UIMRootHubStatusChange got bitmap (0x20) Gonna add a option like GenericUSBXHCI has.Not to use PPT muxing with an option in Info.plist. I think on Intel panther point it gets lost between controllers. Going to test it this evening. Link to comment Share on other sites More sharing options...
Recommended Posts