Jump to content

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


Sinetek
335 posts in this topic

Recommended Posts

My RTSX device is 10ec:5227 and OS is mojave.

 

When I boot with inserting a sdcard, pci device recognizing and sdcard volume mounting well. Also ejecting and remounting.

 

But, boot with empty slot, pci device not exist and when I insert sdcard, nothing change and volume is not mounted anymore.

 

What can I do for fix this issue? 

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
  • 2 weeks later...

Hello Sinetek thanks for the great work! I have a RTS5250 on a Clevo/Eurocom laptop running sierra ... I got your kext (not sure where is the repository, could only find sources, but found a copy on another thread).. put it in CLOVER/kexts/Other and did not work, kextstat would not even show the kext loaded. Then I edited the Info.plist on your kext and replaced the IOPCIMatch with the right key (I think - got this from lspci on linux:  product: RTS5250 PCI Express Card Reader [10EC:5250])

 

            <key>IOPCIMatch</key>
            <string>0x525010EC</string>

 

Now the kext is definitely loaded, kextstat says:

 

   63    0 0xffffff7f83a25000 0xd000     0xd000     com.sinet3k.Sinetek-rtsx (1) 61964645-BA77-3017-A03C-DFE13E6AD014 <17 12 7 5 4 3 1>

 

but I cannot see any devices in the PCI or Card Readers ... when I plug in a SD card in the slot nothing happens

either ... here is what appears on IOREg ....... this laptop is awesome (6700k chip 64GB memory), sierra works beautifully with it, it is my workhorse but still struggling with Thunderbolt hotplug and the SD slot... if you can tell me any suggestion to make it work, I'd appreciate, thanks!

 

Screen Shot 2019-01-30 at 12.45.46 PM.png

Screen Shot 2019-01-30 at 12.46.00 PM.png

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

Hello,

 

Is this kext working under Mojave? I tried injecting it through Clover and in L/E. Kextstat showed the kext was loaded but my SD card reader was not recognized anywhere.

 

I have 0x522A10EC and saw it was already listed in the info.plist under the IOPCIMatch string along with others. I also tried removing all other values there except for 0x522A10EC but it still didn't work.

 

a2zG0It.jpg

 

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...
On 7/1/2017 at 5:59 PM, MacNB said:

Great initiative Sinetek.

I have an Acer 4830T. It has Realtek RTS5209 (0x520910EC).

 

I have installed your kext in /L/E and rebuild cache. It's loaded but does not work:

post-658617-0-47538800-1498946037_thumb.png

 

No SD cards are recognised.

There's no trace of 'rtsx' in the logs or dmesg output. Found the logs traces:


kernel: rtsx_softc::probe(PXSX)
kernel: rtsx_softc::start(PXSX) <5>
kernel: PXSX: rtsx_softc (0x142ae05d700ca90d) is already a child
kernel: rtsx_softc::probe(pci10ec,5209)
kernel: rtsx_softc::start(pci10ec,5209) <7>
kernel: pci10ec,5209: rtsx_softc (0x142ae05d705fcd0d) is already a child
kernel: pci10ec,5209: rtsx_softc (0x142ae05d705fcd0d) is already a child
kernel: (Sinetek-rtsx) : 4-bit
kernel: (Sinetek-rtsx) rtsx: cannot write phy register
kernel: (Sinetek-rtsx) 
kernel: (Sinetek-rtsx) rtsx: card inserted
kernel: (Sinetek-rtsx) rtsx: attach card
kernel: (Sinetek-rtsx) rtsx: voltage change ocr=0x403c0000
kernel: (Sinetek-rtsx) rtsx: executing cmd 52
kernel: (Sinetek-rtsx) rtsx: soft reset
kernel: (Sinetek-rtsx) rtsx: cmd 52 arg=0x80000c08 data=0x0 dlen=0 flags=0x1c01 proc="" (error 60)
kernel: (Sinetek-rtsx) rtsx: executing cmd 5
kernel: (Sinetek-rtsx) rtsx: soft reset
kernel: (Sinetek-rtsx) rtsx: cmd 5 arg=0 data=0x0 dlen=0 flags=0x1031 proc="" (error 60)
kernel: (Sinetek-rtsx) rtsx: executing cmd 0
kernel: (Sinetek-rtsx) rtsx: cmd 0 arg=0 data=0x0 dlen=0 flags=0x21 proc="" (error 0)
kernel: (Sinetek-rtsx) rtsx: executing cmd 55
kernel: (Sinetek-rtsx) rtsx: soft reset
kernel: (Sinetek-rtsx) rtsx: cmd 55 arg=0 data=0x0 dlen=0 flags=0x1c01 proc="" (error 60)
kernel: (Sinetek-rtsx) rtsx: executing cmd 1
kernel: (Sinetek-rtsx) rtsx: soft reset
kernel: (Sinetek-rtsx) rtsx: cmd 1 arg=0x40000000 data=0x0 dlen=0 flags=0x1031 proc="" (error 60)
kernel: (Sinetek-rtsx) rtsx: can't read memory OCR
kernel: (Sinetek-rtsx) rtsx: voltage change ocr=0x0
kernel: (Sinetek-rtsx) rtsx: host reset
kernel: (Sinetek-rtsx) rtsx: soft reset
kernel: (Sinetek-rtsx) rtsx: can't enable card
kernel: (Sinetek-rtsx) rtsx: detach card
kernel: (Sinetek-rtsx) rtsx: voltage change ocr=0x0
kernel: (Sinetek-rtsx) rtsx: host reset
kernel: (Sinetek-rtsx) rtsx: soft reset

What's strange, is that in the IOREG tree, I see TWO occurrence of rtsx_softc:

post-658617-0-30995600-1498946214_thumb.png

post-658617-0-96269100-1498946177_thumb.png

 

Any suggestions ?

What can I do to debug this kext further ?

@MacNB  I am building an Dell Optiplex 9010 all-in-one which has a 5209 card reader.  I am getting the same result... TWO occurrences of rtsx_softc, and same sequence of messages on the console.   Did you find a solution?  This is nearly the last item on my list to have every component working on this build (Mojave 10.4.3, Clover, i7-3770S, HD4000 with built-in display).

Link to comment
Share on other sites

3 hours ago, BillyGoatGruff said:

@MacNB  I am building an Dell Optiplex 9010 all-in-one which has a 5209 card reader.  I am getting the same result... TWO occurrences of rtsx_softc, and same sequence of messages on the console.   Did you find a solution?  This is nearly the last item on my list to have every component working on this build (Mojave 10.4.3, Clover, i7-3770S, HD4000 with built-in display).

 

No sorry I gave up when there were no responses from the original developer of this code.

It's a dead project. Don't waste your time.

Much easier to use USB-to-SD card reader.

Link to comment
Share on other sites

  • 1 month later...

hey folks! long time no see, but i have some positive news this time. i found out the proper way to implement this driver, so i'll be making a new attempt at it using the latest openbsd source.

to make a long story short, i was instantiating all sorts of iokit objects improperly... dumb.

 

today i worked on a proof of concept thinger to verify the macOS side of things, and that's confirmed working. so ya. like the messaging calls between my driver and the rest of the IOKit stack.

it takes me a lot of time to write these drivers, if you would like to support my work, please kindly consider making a donation. with this driver it is possible we'll be able to boot macOS and use macOS on our SD cards :P
wouldn't go far without all your help, if only testing!!

Edited by Sinetek
  • Like 8
  • Thanks 2
Link to comment
Share on other sites

Booting macOS off an sd card requires BIOS support. I haven’t seen any laptops that can do that. Would’ve been nice though.

 

That aside, thanks for the update. Looking forward to it,

 

 

Link to comment
Share on other sites

23 hours ago, Dr. Hurt said:

Booting macOS off an sd card requires BIOS support. I haven’t seen any laptops that can do that. Would’ve been nice though. 

 

That aside, thanks for the update. Looking forward to it,

 

 

its not impossible but lets not get sidetracked by this now

 

Link to comment
Share on other sites

On 5/4/2019 at 4:25 PM, Sinetek said:

hey folks! long time no see, but i have some positive news this time. i found out the proper way to implement this driver, so i'll be making a new attempt at it using the latest openbsd source.

to make a long story short, i was instantiating all sorts of iokit objects improperly... dumb.

 

today i worked on a proof of concept thinger to verify the macOS side of things, and that's confirmed working. so ya. like the messaging calls between my driver and the rest of the IOKit stack.

it takes me a lot of time to write these drivers, if you would like to support my work, please kindly consider making a donation. with this driver it is possible we'll be able to boot macOS and use macOS on our SD cards :P
wouldn't go far without all your help, if only testing!!

Great news!

I got an HP EliteBook 840 G4 recently and I've mostly accepted that I just won't get SD working in macOS...

Then I stumble upon this

Edited by DanTheMan827
Link to comment
Share on other sites

I did more testing, and the OpenBSD driver sadly doesn't work quite right, even on OpenBSD itself.

I'm getting occasional I/O errors on the card, and so we can't continue using it.
One approach could be to rewrite the driver using reversed-engineered information from the Linux driver, and for that I have the pcie tracing output thankfully. Stuff like the PHY register config differs by chip and i'm not quite sure what's what ... probably i could program the chip blindly and send the commands to read write blocks

Edited by Sinetek
  • Like 2
Link to comment
Share on other sites

On 5/4/2019 at 4:25 PM, Sinetek said:

hey folks! long time no see, but i have some positive news this time. i found out the proper way to implement this driver, so i'll be making a new attempt at it using the latest openbsd source.

to make a long story short, i was instantiating all sorts of iokit objects improperly... dumb.

 

today i worked on a proof of concept thinger to verify the macOS side of things, and that's confirmed working. so ya. like the messaging calls between my driver and the rest of the IOKit stack.

it takes me a lot of time to write these drivers, if you would like to support my work, please kindly consider making a donation. with this driver it is possible we'll be able to boot macOS and use macOS on our SD cards :P
wouldn't go far without all your help, if only testing!!

Great to hear this news! When/if there is a new release, will we find it here on this thread, and/or your Github? Thanks for the excellent work!

Link to comment
Share on other sites

On 10/20/2018 at 9:17 PM, decnova said:

My RTSX device is 10ec:5227 and OS is mojave.

 

When I boot with inserting a sdcard, pci device recognizing and sdcard volume mounting well. Also ejecting and remounting.

 

But, boot with empty slot, pci device not exist and when I insert sdcard, nothing change and volume is not mounted anymore.

 

What can I do for fix this issue? 

 hello sir, can u share sinetek version u using and how u install that, in kext/other or L/E ?

we have same hardware 10ex5227
thanks

On 5/5/2019 at 5:25 AM, Sinetek said:

hey folks! long time no see, but i have some positive news this time. i found out the proper way to implement this driver, so i'll be making a new attempt at it using the latest openbsd source.

to make a long story short, i was instantiating all sorts of iokit objects improperly... dumb.

 

today i worked on a proof of concept thinger to verify the macOS side of things, and that's confirmed working. so ya. like the messaging calls between my driver and the rest of the IOKit stack.

it takes me a lot of time to write these drivers, if you would like to support my work, please kindly consider making a donation. with this driver it is possible we'll be able to boot macOS and use macOS on our SD cards :P
wouldn't go far without all your help, if only testing!!

great news sir,,!!

Link to comment
Share on other sites

  • 2 weeks later...
On 5/15/2019 at 1:15 PM, Sinetek said:

I did more testing, and the OpenBSD driver sadly doesn't work quite right, even on OpenBSD itself.

I'm getting occasional I/O errors on the card, and so we can't continue using it.
One approach could be to rewrite the driver using reversed-engineered information from the Linux driver, and for that I have the pcie tracing output thankfully. Stuff like the PHY register config differs by chip and i'm not quite sure what's what ... probably i could program the chip blindly and send the commands to read write blocks

This is awesome news that you've continued working on this driver.  If you need any testers, be sure to reach out to us since I'm sure a lot of people here would be willing to help out in that manner!

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...

Hey Sinetek. Great job on this project! Any progress to report?

 

Still not able to get 0x525A10EC to work. Tried to install in EFI/Clover/Kexts/Other, S/L/E and L/E with no success. 

 

Any help or direction would be appreciated. Thanks much!

Link to comment
Share on other sites

×
×
  • Create New...