Jump to content
Sinetek

Sinetek's Driver for Realtek "RTSX" SDHC Card Readers

248 posts in this topic

Recommended Posts

 

Doesn't work for me (anyway thank you :) ).

 

From linux terminal:

04:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS522A PCI Express Card Reader [10ec:522a] (rev 01)

it should, next version.

 

Guys I haven't even made 1st release yet, this is just a test for 5227 chips. Please check first post :-)

But news are good overall

Share this post


Link to post
Share on other sites
Advertisement

it should, next version.

 

Guys I haven't even made 1st release yet, this is just a test for 5227 chips. Please check first post :-)

But news are good overall

 

Well I can confirm it's working for 522A anyway with that plist tweak, so I look forward to the next test where it'll be supported as standard :)

Share this post


Link to post
Share on other sites

It works! My findings...

 

  1. Like marco below, my card reader is 10EC:522A. I was able to get it working by altering the value in the plist.

    <key>IOPCIMatch</key>
    <string>0x522A10EC</string>
  2. Card loaded, was able to get full access to it no problem. Changed the card name and loaded it on a real Mac, name had been saved as well as files I'd copied over to it. Yaaaay!
  3. Copying speed was very slow but I think that was just the card itself... I'm at work so can only test with an ancient one I found in a draw which I think is probably Class 2! Will test with my class 10 SDHC when I get home
  4. When I physically ejected without dismounting, no problems, but like some of the other testers here I received a kernel panic and forced reboot when I physically ejected AFTER dismounting in Finder.

Couple of small issues I guess but generally this is excellent. Thank you Sinetek for developing this and I look forward to a second beta :D

 

I changed info.plist as Popyura, but it doesn't work. :(

in System info, it shows no PCI devices.

Kext is in EFI.

Share this post


Link to post
Share on other sites

What is your machine? Just the pci listing would work too.

I have a Laptop, Lenovo G480.

 

If you want I can send my IOReg for you, or others info via PM.

Share this post


Link to post
Share on other sites

I changed info.plist as Popyura, but it doesn't work. :(

in System info, it shows no PCI devices.

Kext is in EFI.

 

I had to install to S/L/E for it to work. Also it doesn't appear in PCI devices or Card Reader in System Report, but it works as soon as I insert a card.

Share this post


Link to post
Share on other sites

Update: tried with my Class 10 and am getting good speeds both reading and writing from the card!

 

Have also found that if I eject the card's volume from Disk Utility or Terminal I'm able to remove it physically without the kernel panic I get when ejecting from Finder. It seems like the Finder eject method is getting rid of the entire device (which makes the system go "wtf i thought i already got rid of you!" when it's physically removed), whereas doing it from Disk Utility or Terminal allows me to remove the Volume only...

 

...but you've already mentioned the eject button is broken and not to use for now so i guess you're on top of this :D

 

seriously thanks again, very nice to know that I might not have to just accept that reader won't work. a great start to the week.

Share this post


Link to post
Share on other sites

Wow, thanks for this driver.

 

I modified the plist to work with my RTS5287 (0x528710EC), and it works!

 

If I remove the SD Card without injecting, my system is fine, but when using eject in Finder it Kernel panics my system, but I know you are working on this. After sleep the sd card slot doesn't recognise anything anymore.

 

I am very happy that the card reader will work some time in future.

 

Many thanks

 

bildschirmfoto2017-02-14um10.3.png

Share this post


Link to post
Share on other sites

This worked for me.  Thank you!!!

 

0x522910EC

 

Installed to S/L/E.  No KP when ejected in the OS.  It does stop working after my laptop wakes from sleep.

Share this post


Link to post
Share on other sites

not work AsusX451CA not work RTS5286 PCIe card reader

Confuse this one with VooDooSdhc.

Your kext works.

I just edit info.plist and drop it in clover/kexts/10.12 and it works

BTW system crash when I eject the card. Not sure what is the cause, will test more.

post-1646976-0-25453200-1487168391_thumb.png

Share this post


Link to post
Share on other sites

I had to install to S/L/E for it to work. Also it doesn't appear in PCI devices or Card Reader in System Report, but it works as soon as I insert a card.

 

I couldn't find the card reader in PCI Devices or Card Reader either.  But it does show up in Storage.

 

post-270804-0-49041400-1487363213_thumb.png

Share this post


Link to post
Share on other sites

One more bug to report...

 

The driver appears to break after sleep/wake. If the machine wakes from sleep with the card still inserted, it'll initially seem as if you can access it, but it just hangs when you try to do anything with it. If the machines wakes from sleep without the card inserted, the card isn't recognised when it's put back in and you have to reboot to use it again.

 

On a lighter note, I've put together a small app - Eject RTSX - which unmounts all volumes on the loaded SD card and makes it safe to physically eject without kernel panic. This is to use instead of the broken Finder eject button until Sinetek gives us another beta. Obviously you can do this from Disk Utility or the command line too but this is just a one-click timesaver that I made cos I was bored  :rofl: I hope one or two of you find it useful!

Eject RTSX 1.0.zip

Share this post


Link to post
Share on other sites

Sorry for late reply, but I was very very busy.

It works for me only putting in S/L/E and changing info.plist in:

<key>IOPCIMatch</key><string>0x522A10EC</string>
Not tested speed. No kp removing the SD card. Thank you!

Share this post


Link to post
Share on other sites

This worked for me.  Thank you!!!

 

0x522910EC

 

Installed to S/L/E.  No KP when ejected in the OS.  It does stop working after my laptop wakes from sleep.

Can you actually put the machine to sleep?

 

 

The sleep issues can be worked out, it's not a lot of work but I have to read more on the sleep/resume path and then call the rtsx_suspend and such, then it should work.

 

I still need to make the driver use the proper work queue for block I/O so it will stop crashing so damn much. But other than that, I added all y'all's PCI ID's to the driver already.

 

Thanks for patience and testing, we'll get there

One more bug to report...

 

The driver appears to break after sleep/wake. If the machine wakes from sleep with the card still inserted, it'll initially seem as if you can access it, but it just hangs when you try to do anything with it. If the machines wakes from sleep without the card inserted, the card isn't recognised when it's put back in and you have to reboot to use it again.

 

On a lighter note, I've put together a small app - Eject RTSX - which unmounts all volumes on the loaded SD card and makes it safe to physically eject without kernel panic. This is to use instead of the broken Finder eject button until Sinetek gives us another beta. Obviously you can do this from Disk Utility or the command line too but this is just a one-click timesaver that I made cos I was bored  :rofl: I hope one or two of you find it useful!

Haha well, you can use the system just fine if you eject the card physically, that should work just fine.

 

Make sure to

 

1)  Terminal: type 'sync' and enter. This will sync all disk I/O and store the latest changes to all your disks.

2)  Make sure you're not doing heavy I/O on the card. Then physically eject it, the OS will destroy the IOBlockStorage device by itself and all should be well.

3) Then insert again, and you can use the card again.

macOS uses a lot of RAM for disk I/O buffering, so sometimes if you don't 'sync' the changes will only exist in system RAM.

As a temporary workaround for the sleep issues, you can do kextunload / kextload cycles and it will reset the controller chip.

At least it should, the problem is that the chip doesn't keep it's register values when you kill power to it.

Share this post


Link to post
Share on other sites

Can you actually put the machine to sleep?

 

 

The sleep issues can be worked out, it's not a lot of work but I have to read more on the sleep/resume path and then call the rtsx_suspend and such, then it should work.

 

I still need to make the driver use the proper work queue for block I/O so it will stop crashing so damn much. But other than that, I added all y'all's PCI ID's to the driver already.

 

Thanks for patience and testing, we'll get there

 

So yes, my laptop goes to sleep with no problem with my SD Card still in the reader.  When it wakes up, it shows the SD Card still on my desktop and I can see it in Finder but I cannot see anything that is on the SD Card in Finder.  I can eject the SD Card using the OS after it wakes from sleep but that makes Finder hang for a while.  I can either relaunch Finder or I can wait for Finder to eject the SD Card that it cannot read.  Basically, I can keep my SD Card in the reader all the time now and, if I need to access it, I just need to reboot.

 

P.S. - The driver has never once crashed on me or caused a KP.

Share this post


Link to post
Share on other sites

Hi folks!

 

little update:

 

I'm working on the power management support, so that you call can put your laptops in suspend/resume.
Nothing is crashing but the driver is not calling my save/resume state routine, and I'm not sure why yet.


if someone wants to help with testing, here's the latest (debug) build of this thing.

let me know if you see the text "rtsx_softc::setPowerState" in the dmesg log output.

 

For the record my machine is a X240 thinkpad.

List of supported ID's:  0x520910EC 0x522710EC 0x522910EC 0x522A10EC 0x524910EC 0x528610EC 0x528710EC 0x528910EC

If yours is different try adding it manually to plist and then report.

 

thanks!

 

Sinetek-rtsx.kext.zip

Share this post


Link to post
Share on other sites

I tried out your newest version.  I am not getting any messages in Console regarding the rtsx_soft power state.  The kext works just as good as before but it still does not work after I wake my laptop from sleep.  After wake from sleep, I can see the device in IORegExplorer but not the SD card and not the IOBlockStorageDriver entry I see when the device is working.  Also, any attempt to unload the kext produces instant KP.

Share this post


Link to post
Share on other sites

I tried out your newest version.  I am not getting any messages in Console regarding the rtsx_soft power state.  The kext works just as good as before but it still does not work after I wake my laptop from sleep.  After wake from sleep, I can see the device in IORegExplorer but not the SD card and not the IOBlockStorageDriver entry I see when the device is working.  Also, any attempt to unload the kext produces instant KP.

For our envy is better to stay with the old kext?

Share this post


Link to post
Share on other sites

For our envy is better to stay with the old kext?

 

I'm not seeing any difference between the original kext and the newer one.

Share this post


Link to post
Share on other sites

Thanks for your work, but this kext not work for me. 0x520910EC

strange, should work out of the box.

	switch (device_id) {
		case PCI_PRODUCT_REALTEK_RTS5209:
			flags = RTSX_F_5209;
			break;

I tried out your newest version.  I am not getting any messages in Console regarding the rtsx_soft power state.  The kext works just as good as before but it still does not work after I wake my laptop from sleep.  After wake from sleep, I can see the device in IORegExplorer but not the SD card and not the IOBlockStorageDriver entry I see when the device is working.  Also, any attempt to unload the kext produces instant KP.

Yeah I don't understand why my power saving states don't power save. What happens is that the chip loses all context when you put it to sleep (cut power). I think it's quite close, i'll be looking at intelmausi and other projects tonight to see how they do it

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×