Jump to content
186 posts in this topic

Recommended Posts

Thank you, V0.9.3v3 works, and like you mentioned it doesn't show up in system profiler, but it does in IORegistryExplorer and I tested with 2 cards, here are my results.

 

Did a read/write stress test copying a 1GB file then copying the copy, and so on 10 times and then compared checksum to the original and data was identical.

The write speed was between 12MB/S ~ 22MB/S on both cards.

The read speed was ~50MB/s on one card and ~ 70MB/S on the other.

The card reader has problems ejecting a card if the laptop goes to sleep with a card loaded/mounted.

The card reader does not load a card after waking the laptop from sleep. (tested fresh boot->sleep->wake->load card... nothing)

Kext only tested in Catalina, will not load in Mojave.

Link to comment
Share on other sites

1 hour ago, theroadw said:

Thank you, V0.9.3v3 works, and like you mentioned it doesn't show up in system profiler, but it does in IORegistryExplorer and I tested with 2 cards, here are my results.

 

Thanks for your test report.

 

1 hour ago, theroadw said:

The write speed was between 12MB/S ~ 22MB/S on both cards.

The read speed was ~50MB/s on one card and ~ 70MB/S on the other.

 

Most cards have slower write speed.

Did you test your card under other systems?

Are the statistics under macOS similar to those under other systems?

 

1 hour ago, theroadw said:

The card reader has problems ejecting a card if the laptop goes to sleep with a card loaded/mounted.

The card reader does not load a card after waking the laptop from sleep. (tested fresh boot->sleep->wake->load card... nothing)

 

Expected, because power management is not implemented yet.

The card needs to be reinitialized after the computer wakes up, so stay tuned. :)

 

On 6/27/2021 at 1:54 AM, wern apfel said:

Thanks for this driver. I tried it with the RTS522a controller, but  the card initialization fails. See the log. 

 

@wern apfel Your card did not respond to the CMD2 after being switched to 1.8V,

probably because I forgot to set the driving tables for RTS5227 and RTS522A.

 

Please try 0.9.3v4 and see if it resolves the issue.

If not, please attach the kernel log.

RealtekPCIeCardReader_0.9.3v4_DEBUG.zip

Edited by Austere.J
Link to comment
Share on other sites

14 hours ago, Austere.J said:

Most cards have slower write speed.

Did you test your card under other systems?

Are the statistics under macOS similar to those under other systems?

 

The write results are pretty much the same across MacOS Windows and Linux. ~15MB/s

For the 70~75MB/s Card:

Read for Linux is ~80MB/s

Read for Windows is ~85MB/s.

 

It's possible the debug version limits the performance a bit, but overall it's great! can't wait for PM and older versions if possible!

 

Cheers!

Link to comment
Share on other sites

v0.9.4 beta comes with basic power management support.

Link: https://github.com/0xFireWolf/RealtekPCIeCardReader/releases/tag/v0.9.4

 

Please focus on the following scenarios:

 

1) Put the machine to sleep without the card inserted.

Wake up your machine and insert the SD card.

Check whether the card can be recognized and work properly.

 

2) Put the machine to sleep with the card inserted.

Wake up your machine and check whether your SD card shows up.

If not, remove the card and insert it again and see whether the card can be recognized and work properly.

 

In my case, the SD card was initialized properly under macOS Big Sur and Catalina, but the system ejected the card after the machine waked up.

I have to remove the card and insert it back. However, the SD card showed up and was not ejected by the system under macOS Mojave.

Overall, the driver is pretty stable now on my machine with RTS525A.

 

@theroadw I tested the driver under macOS Mojave and it is working fine on my machine. Please give it a try.

Link to comment
Share on other sites

On 7/9/2021 at 2:53 AM, Austere.J said:

1) Put the machine to sleep without the card inserted.

Wake up your machine and insert the SD card.

Check whether the card can be recognized and work properly.

Tested and it works correctly in both Catalina and Mojave.

 

On 7/9/2021 at 2:53 AM, Austere.J said:

2) Put the machine to sleep with the card inserted.

Wake up your machine and check whether your SD card shows up.

If not, remove the card and insert it again and see whether the card can be recognized and work properly.

In both OS the card would not show up on wake, and in Mojave there will be a "device not ejected" notification, but removing and re-inserting the card worked on both.

 

Some odd behavior, in Catalina is that I could remove the drive without ejecting first without any notification, in Mojave the system alerted me of first ejecting the drive, don't know if this is normal.

Also on Mojave I got a early KP when I switched to the Release Version, but the next reboot was fine.

 

Speed is ~13MB/s write and 83MB/s read, awesome!!! Thank you for this Kext.

Link to comment
Share on other sites

The project has been rebranded. :)

 

v0.9.5 beta comes with support for USB-based RTS5129, RTS5139 and RTS5179 card readers.

@b0ltun For those who have aforementioned chips, please give a try and report any issues, as I don't have the hardware to test with.

 

The bonus feature has been reenabled, but you need to the install the companion Lilu plugin (https://github.com/0xFireWolf/RealtekCardReaderFriend).

Check the main post or the repo for details.

 

Link: https://github.com/0xFireWolf/RealtekCardReader/releases/tag/v0.9.5

Edited by Austere.J
  • Thanks 2
Link to comment
Share on other sites

4 hours ago, whatnameisit said:

I have tried v0.9.5 beta with RTS5129 and the kext doesn't seem to load.

 

I forgot to add: the log with boot-arg and DebugEnhancer is empty.


When did you dump your attached IOReg report? Before or after inserting a SD card?


I check your IOReg and surprisingly found that your card reader does not publish the host interface required by this driver.

 

Does the driver load after you insert the card? If not, please attach the IOReg report and the kernel log (if not empty).

Link to comment
Share on other sites

The attached IOReg report was before inserting the card I think.

I'm attaching new reports as you requested. The log is still empty.

IOReg.zip

 

I wonder if this would help.

1. IOReg report from a year ago of a machine with RTS5138 which is natively supported. This I believe is before inserting the card.

2. Alcor 058f6366, works natively. https://www.dropbox.com/s/ykx69y9e6bl379n/2.zip?dl=0

1. before inserting card.ioreg.zip

Edited by whatnameisit
upload more files
Link to comment
Share on other sites

2 hours ago, whatnameisit said:

The attached IOReg report was before inserting the card I think.

I'm attaching new reports as you requested. The log is still empty.

I wonder if this would help.

1. IOReg report from a year ago of a machine with RTS5138 which is natively supported. This I believe is before inserting the card.

2. Alcor 058f6366, works natively.

 

Thank you for the IOReg reports. They are really helpful, and I think I have found the issue.

 

The driver needs to attach to the USB host device itself and find the interface manually

instead of dreaming that someone will create an interface for it. :star_smile:

 

That's why the driver never gets loaded and you cannot find the log.

 

Stay tuned. :cowboy:

  • Like 1
Link to comment
Share on other sites

@Austere.J

thank you for amazing work!.

File 0.9.5 beta debug file.

OS : 12.0 beta 21A5284e

i tested your work. here is log

 

info

USB2.0-CRW:

  제품 ID: 0x0129

  공급업체 ID: 0x0bda  (Realtek Semiconductor Corp.)

  버전: 39.60

  일련 번호: 20100201396000000

  속도: 최대 480Mb/

  제조업체: Generic

  위치 ID: 0x14600000 / 4

  사용 가능한 전류량(mA): 500

  필요한 전류량(mA): 500

  추가 동작 전류(mA): 0

  내장:

 

log

Spoiler

[   15.753024]: RTSX: virtual bool RealtekUSBCardReaderController::start(IOService *) DInfo: ==================================================
[   15.753038]: RTSX: virtual bool RealtekUSBCardReaderController::start(IOService *) DInfo: Starting the Realtek USB card reader controller...
[   15.753045]: RTSX: virtual bool RealtekUSBCardReaderController::start(IOService *) DInfo: ==================================================
[   15.753050]: RTSX: virtual bool RealtekCardReaderController::start(IOService *) DInfo: =======================================================
[   15.753055]: RTSX: virtual bool RealtekCardReaderController::start(IOService *) DInfo: Starting the Realtek PCIe/USB card reader controller...
[   15.753060]: RTSX: virtual bool RealtekCardReaderController::start(IOService *) DInfo: =======================================================
[   15.753093]: RTSX: bool RealtekCardReaderController::setupWorkLoop() DInfo: Creating the workloop and the command gate...
[   15.753111]: RTSX: bool RealtekCardReaderController::setupWorkLoop() DInfo: The workloop and the command gate have been created.
[   15.753116]: RTSX: virtual bool RealtekCardReaderController::start(IOService *) DInfo: =======================================================
[   15.753135]: RTSX: virtual bool RealtekCardReaderController::start(IOService *) DInfo: The base card reader controller started successfully...
[   15.753139]: RTSX: virtual bool RealtekCardReaderController::start(IOService *) DInfo: =======================================================
[   15.753145]: RTSX: bool RealtekUSBCardReaderController::setupUSBInterface() DInfo: Taking the ownership of the USB host interface...
[   15.753167]: RTSX: bool RealtekUSBCardReaderController::setupUSBInterface() DInfo: The card reader controller now owns the host interface.
[   15.753172]: RTSX: bool RealtekUSBCardReaderController::setupUSBInterface() DInfo: Fetching the bulk endpoints...
[   15.753451]: RTSX: bool RealtekUSBCardReaderController::setupUSBInterface() Error: Failed to retrieve the output bulk endpoint.
[   15.753511]: RTSX: virtual bool RealtekUSBCardReaderController::start(IOService *) Error: Failed to setup the host interface.

 

now i can't get sd card reader.

thanks in advance

 

Edited by Sherlocks
Link to comment
Share on other sites

1 minute ago, Sherlocks said:

@Austere.J

thank you for amazing work!.

test file 0.9.5 beta debug file.

i tested your work. here is log

 

info

USB2.0-CRW:

  제품 ID: 0x0129

  공급업체 ID: 0x0bda  (Realtek Semiconductor Corp.)

  버전: 39.60

  일련 번호: 20100201396000000

  속도: 최대 480Mb/

  제조업체: Generic

  위치 ID: 0x14600000 / 4

  사용 가능한 전류량(mA): 500

  필요한 전류량(mA): 500

  추가 동작 전류(mA): 0

  내장:

 

now i can't get sd card reader.

thanks in advance

 

 

Hi Sherlocks,

 

Could you please attach the IOReg reports before and after you insert the card?

 

Thanks.

Link to comment
Share on other sites

20 hours ago, Austere.J said:

 

Hi Sherlocks,

 

Could you please attach the IOReg reports before and after you insert the card?

 

Thanks.

 

here is.

if you want test, i can help you in messenger like skype, element, discord, test. now i have enough time

deleted

 

Edited by Sherlocks
Link to comment
Share on other sites

22 minutes ago, Sherlocks said:

here is.

if you want test, i can help you in messenger like skype, element, discord, test. now i have enough time

 

@Sherlocks Really interesting. Your IOReg dump shows that your RTS5129 has already been configured and exposed the host interface,

while @whatnameisit's card reader needs to be configured by the driver manually.

 

Anyway, I have changed the matching dictionary, so the driver should attach to the host device and configure the card reader if necessary,

so @whatnameisit please try this one.

 

In addition, @Sherlocks the driver cannot find bulk endpoints of your card reader,

probably because their addresses are not the same as the ones on Linux.

I have updated the code to search for them instead of using hard-coded constants from the Linux driver.

Please give a try. I really want to chat with you to speed up testing the driver, but unfortunately I am not available today.

I expect that the driver is buggy since I do not have any USB-based card readers to test with.

 

RealtekCardReader_0.9.6_962337e_DEBUG.zip

Link to comment
Share on other sites

 

19 hours ago, Austere.J said:

 

@Sherlocks Really interesting. Your IOReg dump shows that your RTS5129 has already been configured and exposed the host interface,

while @whatnameisit's card reader needs to be configured by the driver manually.

 

Anyway, I have changed the matching dictionary, so the driver should attach to the host device and configure the card reader if necessary,

so @whatnameisit please try this one.

 

In addition, @Sherlocks the driver cannot find bulk endpoints of your card reader,

probably because their addresses are not the same as the ones on Linux.

I have updated the code to search for them instead of using hard-coded constants from the Linux driver.

Please give a try. I really want to chat with you to speed up testing the driver, but unfortunately I am not available today.

I expect that the driver is buggy since I do not have any USB-based card readers to test with.

 

RealtekCardReader_0.9.6_962337e_DEBUG.zip 207.7 kB · 1 download

 

good signal in log. but still not working(no show any sdcard icon on desktop and finder)

please check log and ioreg

please tell me your messenger id to message for insanelymac messages. i will add your id.

 

deleted

 

more log

deleted

 

Edited by Sherlocks
Link to comment
Share on other sites

18 hours ago, Austere.J said:

@Sherlocks @whatnameisit RealtekCardReader_0.9.6_a0cb167_DEBUG.zip 207.7 kB · 1 download

 

Good, the driver attached to the host device successfully, but I made some stupid and fatal typos in the hardware initialization routine. Try this one.

here is log

no show sd card icon on desktop

deleted

 

Edited by Sherlocks
Link to comment
Share on other sites

Thank you guys for detailed test reports.

 

@Sherlocks It seems that you inserted a non-UHS-I card, so the driver tried to initialize your card at the high speed mode but failed the very last step that switches the bus width to 4-bit. Specifically, the driver was timed out while waiting for the card response to the ACMD6 command. I recalled that the same issue occurred on some RTS5227 chips, but their kernel logs are incomplete, so I am not too sure about that. I don't really have a clue at this moment, but maybe we could try to initialize the card with 1-bit data line and see if things work.

 

RealtekCardReader_0.9.6_3523d8d_1BitBusWidth_DEBUG.zip

 

----------------------------------------------------------------

 

@whatnameisit @b0ltun It seems that both of you inserted the card after the system boots. My previous assumption that the card reader gets connected to the system only when a card is inserted is wrong, so the driver cannot detect any card events after it has started. Please try this one and see if it works when you insert the card AFTER the system boots.

 

RealtekCardReader_0.9.6_3523d8d_DEBUG.zip

 

@b0ltun Regarding to the issue that the card reader is not listed in System Information, I forgot to inject the physical interconnect property to the controller.

Check if you can see the card reader with the above kext.

Link to comment
Share on other sites

@Austere.J will test it now, actually i did insert card only after system fully booted before. I will check it now.

 

P.S. Now it's kinda shown in system report, heh

 

Still no card showing after inserting it, i will attach log

(Booted, inserted card, checked, took log)

 

RTS.txt

 

Screenshot 2021-07-18 at 12.25.51.png

Edited by b0ltun
add info
Link to comment
Share on other sites

10 minutes ago, b0ltun said:

P.S. Now it's kinda shown in system report, heh

 

Still no card showing after inserting it, i will attach log

(Booted, inserted card, checked, took log)

 

@b0ltun What if you boot the system with the card inserted?

Link to comment
Share on other sites

4 minutes ago, b0ltun said:

 

Sure. Here is the log (inserted before booting process)

 

RTS.txt 750.61 kB · 0 downloads

 

[   33.724033]: RTSX: IOReturn IOSDHostDriver::CMD55(UInt32) Error: Failed to initiate the CMD55. Error = 0xe00002d6.
[   33.724036]: RTSX: IOReturn IOSDHostDriver::waitForAppRequest(RealtekSDRequest &, UInt32) Error: Failed to issue a CMD55. Error = 0xe00002d6.
[   33.724039]: RTSX: IOReturn IOSDHostDriver::waitForAppRequest(RealtekSDRequest &, UInt32) Error: Failed to send the application command. Error = 0xe00002d6.
[   33.724043]: RTSX: bool IOSDCard::enable4BitWideBus() Error: Failed to issue the ACMD6 to switch to the 4-bit bus.
[   33.724046]: RTSX: bool IOSDCard::initHighSpeedMode() Error: Failed to enable the 4-bit wide bus.

OK, I see. You encountered the same issue as Sherlocks.

 

Please try the above 1-bit version with your card inserted while the system boots.

Link to comment
Share on other sites

×
×
  • Create New...