Jump to content

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


Sinetek
335 posts in this topic

Recommended Posts

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!

 

attachicon.gifSinetek-rtsx.kext.zip

 

Wooooo! Works for my 0x522A10EC out of the box. Eject button in finder now working and no more kernel panics on physical ejection.

 

Obviously still not working after sleep but I've taken your advice and am using kextload and kextunload for the time being and to be honest that's fine with me.

 

Cheers Sinetek, will look forward to more betas and eventually a final version. Keep up the good work :)

  • Like 2
Link to comment
Share on other sites

doesn't work Acer 3750g 0x520910EC

 

rtsx: attach card

rtsx: cmd 52 arg=0x80000c08 data=0 dlen=0 flags=0x1c01 proc="" (error 60)

rtsx: cmd 5 arg=0 data=0 dlen=0 flags=0x1031 proc="" (error 45)

rtsx: cmd 0 arg=0 data=0 dlen=0 flags=0x21 proc="" (error 0)

rtsx: cmd 55 arg=0 data=0 dlen=0 flags=0x1c01 proc="" (error 60)

rtsx: cmd 1 arg=0x40000000 data=0 dlen=0 flags=0x1031 proc="" (error 60)

rtsx: can't read memory OCR

rtsx: can't enable card

rtsx: detach card

Link to comment
Share on other sites

Sinetek, do you have a version of this kext that will work in El Capitan.  

 

I have a second HP laptop that has the same Realtek card reader  0x522710ec, but it had too many other issues when I tried to upgrade it to MacOS Sierra so it needs to stay on El Capitan.

 

Thanks for your great work on this kext.

Link to comment
Share on other sites

Hi Sinetek,

 

Great job! But it doesn't work on my Lenovo T540P. I notice the status of the sd card in console.app. When I inserted the card, rtsx shows "card ejected" and when I rejected the card, rtsx shows "card inserted". 

 

Is there any easy solution about this issue?

 

Thanks,

James

 

Card ejected:

 

 

10:25:12.620950 +0800 kernel rtsx: card inserted

10:25:12.822149 +0800 kernel rtsx: attach card
10:25:12.822166 +0800 kernel rtsx: voltage change ocr=0x403c0000
10:25:13.074173 +0800 kernel rtsx: executing cmd 52
10:25:14.075400 +0800 kernel rtsx: soft reset
10:25:14.075514 +0800 kernel rtsx: cmd 52 arg=0x80000c08 data=0x0 dlen=0 flags=0x1c01 proc="" (error 60)
10:25:14.075518 +0800 kernel rtsx: executing cmd 5
10:25:15.076648 +0800 kernel rtsx: soft reset
10:25:15.076829 +0800 kernel rtsx: cmd 5 arg=0 data=0x0 dlen=0 flags=0x1031 proc="" (error 60)
10:25:15.076857 +0800 kernel rtsx: executing cmd 0
10:25:15.077956 +0800 kernel rtsx: cmd 0 arg=0 data=0x0 dlen=0 flags=0x21 proc="" (error 0)
10:25:15.077970 +0800 kernel rtsx: executing cmd 55
10:25:16.079110 +0800 kernel rtsx: soft reset
10:25:16.079303 +0800 kernel rtsx: cmd 55 arg=0 data=0x0 dlen=0 flags=0x1c01 proc="" (error 60)
10:25:16.079321 +0800 kernel rtsx: executing cmd 1
10:25:17.080451 +0800 kernel rtsx: soft reset
10:25:17.080628 +0800 kernel rtsx: cmd 1 arg=0x40000000 data=0x0 dlen=0 flags=0x1031 proc="" (error 60)
10:25:17.080645 +0800 kernel rtsx: can't read memory OCR
10:25:17.080698 +0800 kernel rtsx: voltage change ocr=0x0
10:25:17.080994 +0800 kernel rtsx: host reset
10:25:17.080997 +0800 kernel rtsx: soft reset
10:25:17.081560 +0800 kernel rtsx: can't enable card
10:25:17.081568 +0800 kernel rtsx: detach card
10:25:17.081587 +0800 kernel rtsx: voltage change ocr=0x0
10:25:17.081877 +0800 kernel rtsx: host reset
10:25:17.081880 +0800 kernel rtsx: soft reset

 

 

 
Card inserted:

10:27:22.594163 +0800 kernel rtsx: card ejected
10:27:22.795319 +0800 kernel rtsx: detach card
10:27:22.795427 +0800 kernel rtsx: voltage change ocr=0x0
10:27:22.795821 +0800 kernel rtsx: host reset

Edited by Allan
Spoiler tag - added
Link to comment
Share on other sites

 

Hi Sinetek,

 

Great job! But it doesn't work on my Lenovo T540P. I notice the status of the sd card in console.app. When I inserted the card, rtsx shows "card ejected" and when I rejected the card, rtsx shows "card inserted". 

 

Is there any easy solution about this issue?

 

Thanks,

James

 

Card ejected:

 

 

10:25:12.620950 +0800 kernel rtsx: card inserted

10:25:12.822149 +0800 kernel rtsx: attach card
10:25:12.822166 +0800 kernel rtsx: voltage change ocr=0x403c0000
10:25:13.074173 +0800 kernel rtsx: executing cmd 52
10:25:14.075400 +0800 kernel rtsx: soft reset
10:25:14.075514 +0800 kernel rtsx: cmd 52 arg=0x80000c08 data=0x0 dlen=0 flags=0x1c01 proc="" (error 60)
10:25:14.075518 +0800 kernel rtsx: executing cmd 5
10:25:15.076648 +0800 kernel rtsx: soft reset
10:25:15.076829 +0800 kernel rtsx: cmd 5 arg=0 data=0x0 dlen=0 flags=0x1031 proc="" (error 60)
10:25:15.076857 +0800 kernel rtsx: executing cmd 0
10:25:15.077956 +0800 kernel rtsx: cmd 0 arg=0 data=0x0 dlen=0 flags=0x21 proc="" (error 0)
10:25:15.077970 +0800 kernel rtsx: executing cmd 55
10:25:16.079110 +0800 kernel rtsx: soft reset
10:25:16.079303 +0800 kernel rtsx: cmd 55 arg=0 data=0x0 dlen=0 flags=0x1c01 proc="" (error 60)
10:25:16.079321 +0800 kernel rtsx: executing cmd 1
10:25:17.080451 +0800 kernel rtsx: soft reset
10:25:17.080628 +0800 kernel rtsx: cmd 1 arg=0x40000000 data=0x0 dlen=0 flags=0x1031 proc="" (error 60)
10:25:17.080645 +0800 kernel rtsx: can't read memory OCR
10:25:17.080698 +0800 kernel rtsx: voltage change ocr=0x0
10:25:17.080994 +0800 kernel rtsx: host reset
10:25:17.080997 +0800 kernel rtsx: soft reset
10:25:17.081560 +0800 kernel rtsx: can't enable card
10:25:17.081568 +0800 kernel rtsx: detach card
10:25:17.081587 +0800 kernel rtsx: voltage change ocr=0x0
10:25:17.081877 +0800 kernel rtsx: host reset
10:25:17.081880 +0800 kernel rtsx: soft reset

 

 

 
Card inserted:

10:27:22.594163 +0800 kernel rtsx: card ejected
10:27:22.795319 +0800 kernel rtsx: detach card
10:27:22.795427 +0800 kernel rtsx: voltage change ocr=0x0
10:27:22.795821 +0800 kernel rtsx: host reset

 

The chip in your laptop is the 5227, same as in my X240. I have seen this a bunch of times, could you try a few different cards, and try shutting down power completely and rebooting.

Link to comment
Share on other sites

Thanks for your great work. But the reader not working properly (0x520910EC). Kext loaded, but card is not loading.

 

it seams to recognize the card, but there are errors (console details):

 

 

 

rtsx: attach card

rtsx: voltage change ocr=0x403c0000

rtsx: executing cmd 52

rtsx: soft reset

rtsx: cmd 52 arg=0x80000c08 data=0x0 dlen=0 flags=0x1c01 proc="" (error 60)

rtsx: executing cmd 5

rtsx: soft reset

rtsx: cmd 5 arg=0 data=0x0 dlen=0 flags=0x1031 proc="" (error 60)

rtsx: executing cmd 0

rtsx: cmd 0 arg=0 data=0x0 dlen=0 flags=0x21 proc="" (error 0)

rtsx: executing cmd 55

rtsx: soft reset

rtsx: cmd 55 arg=0 data=0x0 dlen=0 flags=0x1c01 proc="" (error 60)

rtsx: executing cmd 1

rtsx: soft reset

rtsx: cmd 1 arg=0x40000000 data=0x0 dlen=0 flags=0x1031 proc="" (error 60)

rtsx: can't read memory OCR

rtsx: voltage change ocr=0x0

rtsx: host reset

rtsx: soft reset

rtsx: can't enable card

rtsx: detach card

rtsx: voltage change ocr=0x0

rtsx: host reset

rtsx: soft reset

 

Link to comment
Share on other sites

My PCIE-Card reader is RTS5209, it doesn't work with your kext.

This is the log.

17/3/26 下午11:14:14.000 kernel[0]: inetek-rtsx - library kext com.apple.kpi.bsd not compatible with requested version 16.4.
17/3/26 下午11:14:14.000 kernel[0]: Can't load kext com.sinet3k.Sinetek-rtsx - failed to resolve library dependencies.
17/3/26 下午11:14:14.000 kernel[0]: Kext com.sinet3k.Sinetek-rtsx failed to load (0xdc00800e).
17/3/26 下午11:14:14.000 kernel[0]: Failed to load kext com.sinet3k.Sinetek-rtsx (error 0xdc00800e).
17/3/26 下午11:14:14.000 kernel[0]: Couldn't alloc class "rtsx_softc"
17/3/26 下午11:14:15.420 com.apple.kextd[46]: Kext id com.sinet3k.Sinetek-rtsx not found; removing personalities from kernel.

Link to comment
Share on other sites

Hi Sinetek,

 

Great work so far buddy ... theres been a huge gap in running osx on laptops that use PCIe bus for SD card reader's and your project is looking like it can fill that gap. Its very encouraging to read that some people are having reasonable success with your kext even at this early stage of the project.

 

I wish you all the best with the project it am happy to help test and supply feedback for you  ....

 

I just tried it on a new laptop hackingtosh i'm currently working ... its seems to have yet another new Realtek SD Card Reader / variant 

 

Vendor ID: 10EC (VID)

Device ID: 525A (PID)

 

post-861268-0-43868100-1490876790_thumb.jpg

 

I did add the PID-VID it to the appropriate line in info.plist in your kext but it failed to work.

Would appreciate if you could add this one to your ever growing list 

 

Cheers

Jay

 

Link to comment
Share on other sites

Thanks for the kind words, I appreciate it since it takes a lot of energy to make it happen, and I've been busy with an NVME driver. I love open source and every driver we release for hackintoshes are a step in this direction, perhaps. Insanelymac has a good community though from what I see.
I'll see what I can do for your chip. Maybe I can take some of the extra support that has been added in NetBSD and include them, since I'm using a base of OpenBSD for the driver and SDMMC core. Apple's OS itself has no conception of SD cards since they use exclusively USB abstraction chips to do that work.
 

 

And here's the sources:  https://github.com/sinetek/Sinetek-rtsx

 

It's a bit messy and not in the state I would like it to be, but that's nothing unfixable

  • Like 5
Link to comment
Share on other sites

Sinetek, Thanks for the great job.

 

I found patch for my SD reader Vendor ID: 10EC (VID); Device ID: 525A (PID), but I don`t know Xcode well and can`t apply this part of code to your project.

Can somebody help me with this job?

Thanks in advance

that's for Linux. I can't do much until the openbsd or netbsd driver is updated to support your chip.

  • Like 1
Link to comment
Share on other sites

Hello, I'm afraid my kext won't load either. At first I had an error telling me about a kext signature validation error and dependency failures, but I went to the Info.plist and changed (com.apple.kpi.bsd, com.apple.kpi.iokit, com.apple.kpi.libkern, and com.apple.kpi.mach), their values from 16.4 to 15.0 and that was resolved. But I still have the kext signature validation error (Code -67030). Please, can someone lend a hand?


I have also checked if I have disabled SIP, I did.

post-1163883-0-67714800-1491197313_thumb.png

post-1163883-0-58585200-1491197740_thumb.png

Link to comment
Share on other sites

Thanks for the kind words, I appreciate it since it takes a lot of energy to make it happen, and I've been busy with an NVME driver. I love open source and every driver we release for hackintoshes are a step in this direction, perhaps. Insanelymac has a good community though from what I see.

I'll see what I can do for your chip. Maybe I can take some of the extra support that has been added in NetBSD and include them, since I'm using a base of OpenBSD for the driver and SDMMC core. Apple's OS itself has no conception of SD cards since they use exclusively USB abstraction chips to do that work.

 

 

And here's the sources:  https://github.com/sinetek/Sinetek-rtsx

 

It's a bit messy and not in the state I would like it to be, but that's nothing unfixable

I think you didn't push the changes of post 43 yet, right?

Link to comment
Share on other sites

×
×
  • Create New...