Jump to content

RealtekR1000 v3


Slice
 Share

136 posts in this topic

Recommended Posts

This kext is way better than the older ones, no more lag or loose of signal during normal use.

Also sleep seems to work fine.

Thank you, this really completes my stable build using an otherwise already well supported GA-Z68X-UD3H board.

Link to comment
Share on other sites

THANKS!

 

I use (since 9 months) the Lnx2Mac Realtek RTL81xx driver for my LAN (EP-35 Board) - worked fine (also has sleep / speed fixes) , but i always try some new things.

 

http://lnx2mac.blogs...osx-driver.html (v0.0.90) Lnx2Mac's Realtek RTL81xx Driver... Due to the shortcomings of the current Realtek 81xx Hackintosh drivers (such as lack of or limited support of 8111E, 32/64-bit, sleep issues), I endeavored to port the Linux RTL81xx driver to Mac OS X.)

 

Problem with rtl8168 ( Hersteller-ID: 0x10ec, Geräte-ID: 0x8168, Subsystem-Hersteller-ID: 0x1458, Subsystem-ID: 0xe000, Versions-ID: 0x0001)

Your kext get loaded : org.chucko.driver.RealtekR1000 (3.0.0d1)

but no Ethernet available. OS X 10.8.3 dev D76, Gigabyte EP35

 

system.log (yours):

10.03.13 10:45:20,000 kernel[0]: RealtekR1000: init

10.03.13 10:45:20,000 kernel[0]: RealtekR1000: start

10.03.13 10:45:20,000 kernel[0]: RealtekR1000: R1000InitBoard @ PCI 0x4,00

10.03.13 10:45:20,000 kernel[0]: RTL8xxx@0xd000: Found chip reg=bb500700 // = val32 = ReadMMIO32(TxConfig);

10.03.13 10:45:20,000 kernel[0]: RTL8xxx@0xd000: Unknown device type, reg = 0xb8000000

// code section in voidRealtekR1000::R1000GetMacVersion(). mfg not set in case ...

bb500700 // u32 val32 = ReadMMIO32(TxConfig);

bb500700 & 0xFC800000 = 0xB8000000 // u32 reg = val32 & 0xFC800000; // was 0x7C800000

But there is no case for 0xB8000000 !

SOLUTION:

But if you would use // was 0x7C800000 vs 0xFC800000 for the & , then it would be in case as 0x38000000

0xbb500700 & 0x7C800000 = 0x38000000 (vs bb500700 & 0xFC800000 = 0xB8000000 ), and case 0x3800000, or change value the case to B8000000, it would work - side effects fpor others unknown of course.

 

void RealtekR1000::R1000GetMacVersion()
{
u32 val32 = ReadMMIO32(TxConfig);
u32 reg = val32 & 0xFC800000; // was 0x7C800000
u32 ICVerID = val32 & 0x00700000;
DLog("Found chip reg=%08x\n", val32);
switch (reg)
{
.......
case 0x38000000:
if(ICVerID == 0x00000000) {
mcfg = MCFG_8168B_2;
} else if(ICVerID == 0x00500000) {
mcfg = MCFG_8168B_3;
} else {
mcfg = MCFG_8168B_3;
}
break;
....
default:
mcfg = -1;
break;
}

if (mcfg < 0)
{
DLog("Unknown device type, reg = %#08x\n", reg);
}
else
{
...
}

 

10.03.13 10:45:20,000 kernel[0]: RTL8xxx@0xd000: R1000InitBoard: **** Ethernet chip unrecognized ****

10.03.13 10:45:20,000 kernel[0]: RTL8xxx@0xd000: start: Failed, R1000ProbeAndStartBoard returned false

10.03.13 10:45:20,000 kernel[0]: RTL8xxx@0xd000: start: returning '0'

 

 

system.log with working (v0.0.90) Lnx2Mac's Realtek RTL81xx Driver:

10.03.13 02:06:28,000 kernel[0]: [RealtekRTL81xx:init] RealtekRTL81xx.kext v0.0.90 ©2010-2011 by Lnx2Mac (lnx2mac@gmail.com)

10.03.13 02:06:28,000 kernel[0]: [RealtekRTL81xx:init] _logLevel is now 132 (0x0084)

10.03.13 02:06:28,000 kernel[0]: [RealtekRTL81xx:init] Using updated PHY config method

10.03.13 02:06:28,000 kernel[0]: [RealtekRTL81xx:init] init completed

10.03.13 02:06:28,000 kernel[0]: [RTL81xx@0xd000:rtl8168_init_board] NIC identified as RTL8168B/8111B mcfg=2

Link to comment
Share on other sites

OK, thank you for the note. Will correct.

lnx2mac driver doesn't work for me, I don't remember exactly what is the problem, like my chip 8111F is not supported.

Link to comment
Share on other sites

 

But if you would use // was 0x7C800000 vs 0xFC800000 for the & , then it would be in case as 0x38000000

0xbb500700 & 0x7C800000 = 0x38000000 (vs bb500700 & 0xFC800000 = 0xB8000000 ), and case 0x3800000, or change value the case to B8000000, it would work - side effects fpor others unknown of course.

 

The reason is an attempt to join with 8169

 case 0x98000000:
  mcfg = MCFG_8169SC_2;
  break;

I will add case 0xB8000000

Link to comment
Share on other sites

Slice,

 

I start to love this driver as it is first RTL driver which offers me working WOL on my GA-P35-DS4 under ML 10.8.2!

I just started to play with it and currently I see there is problem with idle sleep.

With LNX2MAC driver sleep works perfectly - so it looks my system is OK.

Also - when system is woken via WOL, wakeup reason is undefined:

 

 

Mar 10 21:28:27 Piotr-Desktop kernel[0]: en0: disable
Mar 10 21:28:27 Piotr-Desktop kernel[0]: en0: setActivationLevel(0)
Mar 10 21:28:27 Piotr-Desktop kernel[0]: en0: setPowerState(0)
Mar 10 21:28:27 Piotr-Desktop kernel[0]: en0: R1000Suspend
Mar 10 21:28:27 Piotr-Desktop kernel[0]: Wake reason: ?
Mar 10 21:28:56 Piotr-Desktop kernel[0]: Previous Sleep Cause: 5
Mar 10 21:28:56 Piotr-Desktop kernel[0]: en0: setPowerState(1)
Mar 10 21:28:56 Piotr-Desktop kernel[0]: en0: R1000Resume
Mar 10 21:28:56 Piotr-Desktop kernel[0]: en0: R1000ResetTask
Mar 10 21:28:56 Piotr-Desktop kernel[0]: en0: enable
Mar 10 21:28:56 Piotr-Desktop kernel[0]: en0: setActivationLevel(2)
Mar 10 21:28:56 Piotr-Desktop kernel[0]: en0: Selected medium index 5
Mar 10 21:28:56 Piotr-Desktop kernel[0]: en0: selectMedium, index=5
Mar 10 21:28:56 Piotr-Desktop kernel[0]: en0: R1000SetMedium(0x3, 0x2, 0x2)
Mar 10 21:28:56 Piotr-Desktop.local configd[19]: network changed: v4(en0-:192.168.1.1) DNS- Proxy- SMB 

 

Maybe this explains why WOL wake system with monitor off for 15-20sec and next system returns to sleep.

Setting ttyspreventsleep not helps, but using caffeination -s allows to keep system ON.

 

Anyway - million thx for excellent work!

Link to comment
Share on other sites

Hi Slice,

Thanks for your efforts.

Tried to use your kext (3.0.1) for device 10ec:8136 in lenovo z560, but it won't work.

 

 

11.03.13 08:34:47,000 kernel[0]: RealtekR1000: init

11.03.13 08:34:47,000 kernel[0]: RealtekR1000: start

11.03.13 08:34:47,000 kernel[0]: RealtekR1000: R1000InitBoard @ PCI 0x7,00

11.03.13 08:34:47,000 kernel[0]: com_chucko_RealtekR1000: Ethernet address XX:XX:XX:XX:XX:XX

11.03.13 08:34:47,000 kernel[0]: RTL8xxx@0x2000: attaching as en0

11.03.13 08:34:47,000 kernel[0]: en0: start: returning '1'

11.03.13 08:34:47,000 kernel[0]: en0: enable

11.03.13 08:34:47,000 kernel[0]: en0: setActivationLevel(2)

11.03.13 08:34:47,000 kernel[0]: en0: Selected medium is NULL, forcing to autonegotiation

11.03.13 08:34:47,000 kernel[0]: en0: selectMedium, index=6

11.03.13 08:34:47,000 kernel[0]: en0: R1000SetMedium(0x2, 0x2, 0x1)

11.03.13 08:34:47,000 kernel[0]: en0: RTLN8101NicReset

11.03.13 08:34:47,000 kernel[0]: en0: RTL8100DSM

11.03.13 08:34:47,000 kernel[0]: en0: RTL8100DisableEEE called on an unsupported chip.

 

Is this device supported? ID was in plist.

 

Regards

Link to comment
Share on other sites

Slice,

I don't know what things are improved in 3.0.2 but I decided give you just small update after going to 3.0.2:

-idle sleep is still not working

-WOL still gives "wake reason: ?" and turns-off PC after 15sec

-the same like previous version driver auto detects my GE network like 100Mb/s. Manual selection to 1GE works OK.

Link to comment
Share on other sites

I've been testing this version on my MSI Z77MA-G45 mobo and so far it works flawlessly! Latency seems down, downloads about 10% faster - sleep/wake is problem free. LNX2MAC has issues on my mobo when waking sometimes the network is dead and the OS needs to be rebooted to get the network going again. Nice job, thanks!

Link to comment
Share on other sites

Hi, Slice! Congratulations for your work! :D

 

Will your driver also work for the RTL8105E (10/100), which i think is a variation of the 8139? Or, better yet, can you add support for it in your driver (which i can personally confirm it works for the 8111).

 

Best regards!

  • Like 1
Link to comment
Share on other sites

Hi Slice,

Thanks for your efforts.

Tried to use your kext (3.0.1) for device 10ec:8136 in lenovo z560, but it won't work.

 

 

11.03.13 08:34:47,000 kernel[0]: RealtekR1000: init

11.03.13 08:34:47,000 kernel[0]: RealtekR1000: start

11.03.13 08:34:47,000 kernel[0]: RealtekR1000: R1000InitBoard @ PCI 0x7,00

11.03.13 08:34:47,000 kernel[0]: com_chucko_RealtekR1000: Ethernet address XX:XX:XX:XX:XX:XX

11.03.13 08:34:47,000 kernel[0]: RTL8xxx@0x2000: attaching as en0

11.03.13 08:34:47,000 kernel[0]: en0: start: returning '1'

11.03.13 08:34:47,000 kernel[0]: en0: enable

11.03.13 08:34:47,000 kernel[0]: en0: setActivationLevel(2)

11.03.13 08:34:47,000 kernel[0]: en0: Selected medium is NULL, forcing to autonegotiation

11.03.13 08:34:47,000 kernel[0]: en0: selectMedium, index=6

11.03.13 08:34:47,000 kernel[0]: en0: R1000SetMedium(0x2, 0x2, 0x1)

11.03.13 08:34:47,000 kernel[0]: en0: RTLN8101NicReset

11.03.13 08:34:47,000 kernel[0]: en0: RTL8100DSM

11.03.13 08:34:47,000 kernel[0]: en0: RTL8100DisableEEE called on an unsupported chip.

 

Is this device supported? ID was in plist.

 

Regards

Hi, Slice! Congratulations for your work! :D

 

Will your driver also work for the RTL8105E (10/100), which i think is a variation of the 8139? Or, better yet, can you add support for it in your driver (which i can personally confirm it works for the 8111).

 

Best regards!

Sorry guys, I made no new support for 8105/8136 series cards although it is possible.

Just some work needed. If someone do this....

The new sources include a folder with recent linux driver for those.

RealtekR1000SL_12.03.2013-src-with8101.zip

Link to comment
Share on other sites

Slice, with the latest version it gets an ip even though the cable is not even connected. The one before that worked great. It's a RTL8111E.

 

3.0.2d1:

12/03/13 19:58:52,000 kernel[0]: en0: setActivationLevel(2)
12/03/13 19:58:52,000 kernel[0]: en0: Selected medium index 6
12/03/13 19:58:52,000 kernel[0]: en0: selectMedium, index=6
12/03/13 19:58:52,000 kernel[0]: en0: R1000SetMedium(0x2, 0x2, 0x1)
12/03/13 19:58:52,000 kernel[0]: en0: setLinkStatus but no PHYStatus

 

 

Older (2.0.0d1?):

 

12/03/13 20:00:55,000 kernel[0]: en0: setActivationLevel(2)
12/03/13 20:00:55,000 kernel[0]: en0: Selected medium is NULL, forcing to autonegotiation
12/03/13 20:00:55,000 kernel[0]: en0: selectMedium, index=6
12/03/13 20:00:55,000 kernel[0]: en0: R1000SetMedium(0x2, 0x2, 0x1)

Link to comment
Share on other sites

Thank you, Slice! I'm going to see what can i do!

 

Best regards!

 

EDIT: Slice, are you sure the new Linux drivers for the 8136/8105 are included with your sources? In Which folder are they? I only found 8101, 8102, 8103 and 8139: are these the drivers?

Link to comment
Share on other sites

Thank you, Slice! I'm going to see what can i do!

 

Best regards!

 

EDIT: Slice, are you sure the new Linux drivers for the 8136/8105 are included with your sources? In Which folder are they? I only found 8101, 8102, 8103 and 8139: are these the drivers?

As I see

static const struct {
const char *name;
u8 mcfg;
u32 RxConfigMask; /* Clears the bits supported by this chip */
} rtl_chip_info[] = {
_R("RTL8101E", CFG_METHOD_1, 0xff7e1880),
_R("RTL8101E", CFG_METHOD_2, 0xff7e1880),
_R("RTL8101E", CFG_METHOD_3, 0xff7e1880),
_R("RTL8102E", CFG_METHOD_4, 0xff7e1880),
_R("RTL8102E", CFG_METHOD_5, 0xff7e1880),
_R("RTL8103E", CFG_METHOD_6, 0xff7e1880),
_R("RTL8103E", CFG_METHOD_7, 0xff7e1880),
_R("RTL8103E", CFG_METHOD_8, 0xff7e1880),
_R("RTL8401E", CFG_METHOD_9, 0xff7e1880),
_R("RTL8105E", CFG_METHOD_10, 0xff7e1880),
_R("RTL8105E", CFG_METHOD_11, 0xff7e1880),
_R("RTL8105E", CFG_METHOD_12, 0xff7e1880),
_R("RTL8105E", CFG_METHOD_13, 0xff7e1880),
_R("RTL8402", CFG_METHOD_14, 0xff7e1880),
_R("RTL8106E", CFG_METHOD_15, 0xff7e1880),
_R("RTL8106E", CFG_METHOD_16, 0xff7e1880)
};

Link to comment
Share on other sites

Hi Slice,

 

I have tried your kext, everything works OK, but I need to set it to 1000BaseT manually.

 

Do you need any debug-info?

 

Thanks for your kext! :)

Yes, show me part of kernel.log (system.log) concerning R1000 and en0:

But I don't know why it is happen. May be the card is not ready for 1000Mbit at start? Heating?

 

There is last revision compiled as release. No debug messages but may be it will work faster. Check, please.

RealtekR1000SL.kext-v303.zip

Link to comment
Share on other sites

 Share

×
×
  • Create New...