Jump to content

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


  • Please log in to reply
160 replies to this topic

#1
Sinetek

Sinetek

    InsanelyMac Sage

  • Coders
  • 395 posts
  • Gender:Male

*
POPULAR

macOS kext_rtsx

 

Hi, making a new thread. This driver is for Realtek SDHC card readers on a pci/pcie bus, most commonly found in laptops.

I would like to get testers. The driver is not yet finalized, but I'm making the tread now anyway since there was interest. expect this post to change in the future.

 

[read below for current status]

 

 

-- sinetek

 

 

things to fix eventually

 

- get more pci id's in plist

- async task in its own thread instead of blocking the os

- prealloc DMA buffer?

- cards with sector_size != 512, haven't been tested at all.

- clean up src. git push.

- power management? what happens when you sleep the machine?

- the eject button in finder is broken, do not use for now.

- spams the syslog with debug messages. release config?

- basic namespace pollution a bit out of hand

 

Update 1:

 

Power management support on the way: see post #43.



#2
Sinetek

Sinetek

    InsanelyMac Sage

  • Coders
  • 395 posts
  • Gender:Male

well okay, now it's working with fast DMA and big blocks.

 

2024e00835.pngdo

 

do these numbers look right to you? how fast is an SDHC I class 10 card supposed to be?



#3
Allan

Allan

    V.I.P. Member

  • Supervisors
  • 11,553 posts
  • Gender:Male

I'll collaborate!  ;)



#4
Sinetek

Sinetek

    InsanelyMac Sage

  • Coders
  • 395 posts
  • Gender:Male

I'll collaborate!  ;)

great i need testers. have fun. if a card gets stuck try ejecting and inserting back.

 

Attached File  Sinetek-rtsx.kext-0.1-btest.zip   35.25KB   421 downloads


just realized, you'll need to edit the plist to add your pci id, mine is  5227, that's the only one i bothered to add in.
report back if the driver loads on your hardware after that. thx


For more information just see the OpenBSD man page for rtsx, since that's what the driver is based from.



#5
Micky1979

Micky1979

    I realized that I am lucky

  • Retired
  • 4,864 posts
  • Gender:Male
  • Location:a 100m dal Tevere, vicino a Peppe

My Sd mounted as expected!

S2Controller (1.8.24) 0D7A1F2C-5FEA-3536-857C-5F96AA30476B <10 7 5 4 3 1>
   49    0 0xffffff7f826c7000 0xd000     0xd000     com.sinet3k.Sinetek-rtsx (1) EFE6D4FF-6B04-3C18-BAB7-6EB08D406227 <15 11 7 5 4 3 1>

thaaaaaaaaaaaaankssssss :D  :thumbsup_anim:  :thumbsup_anim:  :thumbsup_anim:  :thumbsup_anim:  :D  :drool:  :drool:
 
What program are you using to test speed? ... a link please I want test with same condition as you :lol:
 
ps tested a copy of some file... ok!
 
EDIT
device id is 10de 5229. Why not add the "IOPCIClassMatch" instead of the "IOPCIMatch"?
 
EDIT 2
System profiler:

test Enoch:

  Disponibile:	7,57 GB (7.570.780.160 byte)
  Capienza:	7,6 GB (7.604.232.192 byte)
  Punto di attivazione:	/Volumes/test Enoch
  File System:	Journaled HFS+
  Scrivibile:	Sì
  Ignora proprietari:	Sì
  Nome BSD:	disk3s2
  UUID Volume:	CECD4C00-F946-3E1E-BD16-8FA9B0B42905
  Unità fisica:
  Nome supporto:	RTSX SD Card Reader Media Media
  Tipo mappa partizione:	GPT (GUID Partition Table, Tabella di partizione GUID)

EDIT 3

the eject button inside the left bar in Finder here works well

 

EDIT 4

after ejecting it physically a kp happened (see edit 3)

 

EDIT 5
the system sleep for some seconds than wakeup by itself

 

EDIT 6

the system is a bit laggy (so good for the first time of this driver!!)

 

Good job!



#6
Sinetek

Sinetek

    InsanelyMac Sage

  • Coders
  • 395 posts
  • Gender:Male

@Micky1979   very cool!  I'm surprised hah.
The program I'm using to test disk speed is blackmagic Disk Speed Test.


EDIT
device id is 10de 5229. Why not add the "IOPCIClassMatch" instead of the "IOPCIMatch"?

 

Well, this chip is not a generic SDHCI device so it's a bad idea to match on anything. i'll go with adding all the id's the openbsd driver tries to match on, that should do it. there's at most 5-6 of them i think.



#7
Micky1979

Micky1979

    I realized that I am lucky

  • Retired
  • 4,864 posts
  • Gender:Male
  • Location:a 100m dal Tevere, vicino a Peppe

@Micky1979   very cool!  I'm surprised hah.
The program I'm using to test disk speed is blackmagic Disk Speed Test.

 

I assure you this is a slow and old SD card:

 

Attached File  b.png   695.87KB   30 downloads

so the test is really good!

 


Well, this chip is not a generic SDHCI device so it's a bad idea to match on anything. i'll go with adding all the id's the openbsd driver tries to match on, that should do it. there's at most 5-6 of them i think.

 

you're right!



#8
Sinetek

Sinetek

    InsanelyMac Sage

  • Coders
  • 395 posts
  • Gender:Male

:robot: :frantics:


that's good to see. the speed I'm seeing seems pretty constant around 4/9. I don't have one of these super fancy fast sd cards, can't test that.
in theory since we're attached to a pci bus the driver could go blazing fast. it depends on what clocking the driver configures



#9
Micky1979

Micky1979

    I realized that I am lucky

  • Retired
  • 4,864 posts
  • Gender:Male
  • Location:a 100m dal Tevere, vicino a Peppe

Tomorrow I'll test wiht a class 10 sd card..


aaah!

mine is only a 4 class SD:

Attached File  20170212_025851.png   1.82MB   37 downloads



#10
gujiangjiang

gujiangjiang

    An Orthopedic Graduate Student In Medical University.

  • Members
  • PipPipPipPipPip
  • 267 posts
  • Gender:Male
  • Location:Changzhou,China

Thanks for your hard work but i test this kext with no result.

 

My ID is 0x525A10EC.



#11
Sinetek

Sinetek

    InsanelyMac Sage

  • Coders
  • 395 posts
  • Gender:Male

Thanks for your hard work but i test this kext with no result.

 

My ID is 0x525A10EC.

next revision should have support for your chip



#12
Micky1979

Micky1979

    I realized that I am lucky

  • Retired
  • 4,864 posts
  • Gender:Male
  • Location:a 100m dal Tevere, vicino a Peppe

Topic pinned!



#13
Allan

Allan

    V.I.P. Member

  • Supervisors
  • 11,553 posts
  • Gender:Male

Here didn't work... :(

 

Attached File  Screen Shot 2017-02-12 at 11.14.56.png   41.88KB   47 downloads

 

<key>IOPCIMatch</key>

<string>0x01290BDA</string>


EDIT: Used in Clover/kexts folder.



#14
Micky1979

Micky1979

    I realized that I am lucky

  • Retired
  • 4,864 posts
  • Gender:Male
  • Location:a 100m dal Tevere, vicino a Peppe

EDIT: Used in Clover/kexts folder.

me too, not that the problem. Maybe because is USB instead of PCI?



#15
Sinetek

Sinetek

    InsanelyMac Sage

  • Coders
  • 395 posts
  • Gender:Male

Sorry folks, this is only for PCI/PCIe chips!


the good news for USB is that it's a generic mass storage chip, so it should work out of the box with the proper matching injection.
I can't help with that much, don't have the hardware



#16
Micky1979

Micky1979

    I realized that I am lucky

  • Retired
  • 4,864 posts
  • Gender:Male
  • Location:a 100m dal Tevere, vicino a Peppe

Hi found this:

Attached File  sdhc.png   17.75KB   20 downloads

 

https://kb.sandisk.c...d-speed-ratings

 

Apparently the driver is +/- aligned :lol:  (consider mine is 10 y old)

 



#17
Sinetek

Sinetek

    InsanelyMac Sage

  • Coders
  • 395 posts
  • Gender:Male

Hi found this:

attachicon.gifsdhc.png

 

https://kb.sandisk.c...d-speed-ratings

 

Apparently the driver is +/- aligned :lol:  (consider mine is 10 y old)

i would compare with my macbook air, but the sd port blew up lol



#18
Micky1979

Micky1979

    I realized that I am lucky

  • Retired
  • 4,864 posts
  • Gender:Male
  • Location:a 100m dal Tevere, vicino a Peppe

:blowup:  :hysterical:



#19
syscl

syscl

    InsanelyMac Sage

  • Coders
  • 296 posts
  • Gender:Male

Nice Sinetek,


I was wondering how long PCIE card reader can be available on macOS, not too long!  :thumbsup_anim:

 

So w/ your driver, why necessary buy a new MacBookPro13,x now?  :hysterical:

 

Though, I've tested this driver(0.1) on 0x524910EC(Dell Precision M3800), but did not work. I don't think it's hard to implement 0x524910EC, because I saw there's slightly difference between 0x523710EC and 0x524910EC, expect some different register values. So, could you please pm me the source code such that I can see if I can improve this driver(especially for RTS5249)?

 

Again, thank you for making this happen!

 

syscl



#20
Allan

Allan

    V.I.P. Member

  • Supervisors
  • 11,553 posts
  • Gender:Male

Sorry folks, this is only for PCI/PCIe chips!

Hmmm, but mine Card Reader is not USB, if are, that would be good.

 

Is possible discover more info in IOReg?







1 user(s) are reading this topic

1 members, 0 guests, 0 anonymous users


© 2017 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy