0xFireWolf / RealtekCardReader

An unofficial Realtek PCIe/USB-based SD card reader driver for macOS
BSD 3-Clause "New" or "Revised" License
186 stars 18 forks source link

About RTS5227. #2

Closed CLAY-BIOS closed 3 years ago

CLAY-BIOS commented 3 years ago

Version: RealtekPCIeCardReader.kext 0.9.2 My card reader is RTS5227, but it is not in the supported chip. I noticed that the two chips RTS5227 and RTS5249 are very similar. I added RTS5227 to info.plist and used class RealtekRTS5249Controller to make RTS5227 work. info IORegistryExplorer

  1. RTS5227 can work normally in macOS12, but it will cause kp in macOS10.15. 10.15-kp.md.zip
  2. Since there is no power management, the card reader will not work after sleep wakeup.
0xFireWolf commented 3 years ago

Note that each controller class contains chip-specific initialization routines. RTS5227 is similar but not identical to RTS5249, so you should not use RealtekRTS5249Controller for your card reader.

RTS5227 and RTS522A will be supported as of 0.9.3. I already pushed the code to the repo, so you can compile the driver by yourself and try the new one.

CLAY-BIOS commented 3 years ago

Note that each controller class contains chip-specific initialization routines. RTS5227 is similar but not identical to RTS5249, so you should not use RealtekRTS5249Controller for your card reader.

RTS5227 and RTS522A will be supported as of 0.9.3. I already pushed the code to the repo, so you can compile the driver by yourself and try the new one.

I compiled the latest version, but the card reader did not work. 截屏2021-06-21 下午11 03 03 截屏2021-06-21 下午11 03 20 There will be a large amount of RTSX starting information when booting. IMG_0746 IMG_0747

0xFireWolf commented 3 years ago

I compiled the latest version, but the card reader did not work.

Your IOReg indicated that the chip was initialized successfully.

If your SD card could not be recognized, please refer to the FAQs and attach the kernel log.

Also, please insert your card after the system boots. It is a known issue that the card may not be initialized while the system is booting.

CLAY-BIOS commented 3 years ago

I compiled the latest version, but the card reader did not work.

Your IOReg indicated that the chip was initialized successfully.

If your SD card could not be recognized, please refer to the FAQs and attach the kernel log.

Also, please insert your card after the system boots. It is a known issue that the card may not be initialized while the system is booting.

The SD card cannot be identified,This is my log. rtsx.log

0xFireWolf commented 3 years ago

The SD card cannot be identified,This is my log. rtsx.log

The host driver failed to switch to the 4-bit bus because your card does not respond to ACMD6.
I updated the code to retry up to 10 times if the response to an ACMD is timed out.
Please try v0.9.3b2 and see if it solves the problem.

RealtekPCIeCardReader_0.9.3v2_DEBUG.zip

Also, your kernel log is incomplete.
Please Refer to the FAQs to make sure that it contains all necessary information.

CLAY-BIOS commented 3 years ago

The SD card cannot be identified,This is my log. rtsx.log

The host driver failed to switch to the 4-bit bus because your card does not respond to ACMD6. I updated the code to retry up to 10 times if the response to an ACMD is timed out. Please try v0.9.3b2 and see if it solves the problem.

RealtekPCIeCardReader_0.9.3v2_DEBUG.zip

Also, your kernel log is incomplete. Please Refer to the FAQs to make sure that it contains all necessary information.

The sd card is still not recognized, I added DebugEnhancer. This is my log. rtsx.log

seungjunProgramming commented 3 years ago

Mine is not working too. 5227 Family RTS522A model at macOS12 Monterey Screen Shot 2021-06-25 at 12 09 31 AM The reader is detected successfully, but card the is not readable. (Used the kext that you uploaded here)(RealtekPCIeCardReader_0.9.3v2_DEBUG.zip)

seungjunProgramming commented 3 years ago

Here's the log(kext loaded) rtsx.log Screen Shot 2021-06-25 at 12 14 19 AM

(edit) Hmm... the kext is successfully attached to the reader. Screen Shot 2021-06-25 at 12 16 59 AM

0xFireWolf commented 3 years ago

The sd card is still not recognized, I added DebugEnhancer. This is my log. rtsx.log

Here's the log(kext loaded) rtsx.log

Neither of your kernel logs is complete. Am I supposed to guess what's wrong with a chip that I don't own?

Check the FAQs and see what a complete kernel log looks like at the beginning.
Please make sure that your logs are indeed complete before you upload it next time.

seungjunProgramming commented 3 years ago

Hm... I'm sorry but I have installed the debug enhancer and have put in the msgbuf=10485760 at nvram. But, This gives me an empty log... I'm sorry but what should I do???

seungjunProgramming commented 3 years ago

rtsx.log Here is my log I built my own kext with target OS 12.0 and used it

seungjunProgramming commented 3 years ago

@0xFireWolf Looks like I/O timeout at IOReturn(kIOReturnTimeout) (Just my thought on the log)

0xFireWolf commented 3 years ago

rtsx.log

Here is my log

I built my own kext with target OS 12.0 and used it

Your log is still incomplete.

Anyway, take a look at 0.9.3v4 and see whether it fixes your issue as well. Or you can compile the latest version by yourself. If it does not work, please attach the COMPLETE kernel log.

seungjunProgramming commented 3 years ago

Also, When I tested it, it successfully loads the card present boolean in ioRegisteryexplorer. (When I remove the card: False When I insert the card: True), but card was not readable

seungjunProgramming commented 3 years ago

Oops... Uploaded the wrong log Here's my COMPLETE LOG(I guess) @0xFireWolf rtsx.log

0xFireWolf commented 3 years ago

Hello @CLAY-BIOS, if you are still interested in testing this kext, please check whether the latest version fixes your timeout issue after the driver switches the card clock. You can find compiled version under Artifacts.

VinylNerd commented 3 years ago

i have RTS5227 on T440P

i place RealtekCardReaderFriend.kext in OpenCore Kext folder, add it to config and reboot, it doesnt work, am i missing something???

0xFireWolf commented 3 years ago

Hello @CLAY-BIOS, if you are still interested in testing this kext, please check whether the latest version fixes your timeout issue after the driver switches the card clock. You can find compiled version under Artifacts.

Based on the kernel logs uploaded by other beta testers, the timeout issue after the driver switches the card clock is resolved by the latest 0.9.6 release. Issue closed. If the original poster still has the same issue with RTS5227, please create a new issue with a complete kernel log.