Jump to content

Driver for Realtek's RTL810x Fast Ethernet Series


Mieze
 Share

179 posts in this topic

Recommended Posts

Zythyr and I, we managed to finish the next development release of the driver. I updated the source code and the binaries attached to the first post of this thread a few minutes ago. Everyone is encouraged to test the new release on her/his system.

 

Mieze 

Unfortunately, ethernet failed to work after wake. One thing I notice is that Hurt has ethernet card built-in in system info, but not for mine. Does it matter?

Link to comment
Share on other sites

Unfortunately, ethernet failed to work after wake. One thing I notice is that Hurt has ethernet card built-in in system info, but not for mine. Does it matter?

 

No, I don't think so. Check your BIOS settings. Do you have Network Boot or the UEFI network stack enabled? Please disable it. What happens when you enable/disable the network interface using ifconfig up/down in Terminal? I'm asking because this is almost the same as sleep/wakeup.

 

Mieze

Link to comment
Share on other sites

No, I don't think so. Check your BIOS settings. Do you have Network Boot or the UEFI network stack enabled? Please disable it. What happens when you enable/disable the network interface using ifconfig up/down in Terminal? I'm asking because this is almost the same as sleep/wakeup.

 

Mieze

My BIOS supports UEFI, but I cannot disable network boot since there is no option.

 

I tried ifconfig en0 up/down many times, but there seems no difference. Ethernet will continue work before sleep and fail after wake, and ifconfig up/down is not changing anything. So I guess something is different between ifconfig up/down and actual sleep/wake.

 

I also tried to compare ioreg before and after sleep. I found IOPCIPMCSState is different in these two cases. See attached picture, not sure if it helps though:

post-732552-0-87386600-1393456289_thumb.png

Link to comment
Share on other sites

I tried ifconfig en0 up/down many times, but there seems no difference. Ethernet will continue work before sleep and fail after wake, and ifconfig up/down is not changing anything. So I guess something is different between ifconfig up/down and actual sleep/wake.

 

Sorry, in case my post was inaccurate but this is not what I asked for. Call ifconfig down/up while network is functional and let me know if it resumes operation after ifconfig up.

 

Mieze

Link to comment
Share on other sites

Sorry, in case my post was inaccurate but this is not what I asked for. Call ifconfig down/up while network is functional and let me know if it resumes operation after ifconfig up.

 

Mieze

Mac:~ peter$ sudo ifconfig up
ifconfig: interface up does not exist
Mac:~ peter$ sudo ifconfig down
ifconfig: interface down does not exist
Mac:~ peter$ ifconfig up

I don't think it is the right syntax. Then I tried ifconfig en0 down which successfully disabled my ethernet, the LED in ethernet port also stopped blinking. After ifconfig en0 up, ethernet shows "Connected" and everything is normal.

Link to comment
Share on other sites

I don't think it is the right syntax. Then I tried ifconfig en0 down which successfully disabled my ethernet, the LED in ethernet port also stopped blinking. After ifconfig en0 up, ethernet shows "Connected" and everything is normal.

 

 

Ok, at least we know now that the enable() and disabled() routines are working properly.

 

Mieze

Link to comment
Share on other sites

@lisai9093: I tried to find some background information about IOPCIPMCSState but found nothing. Therefore I checked this property of en0 on my 2011 iMac and it shows a similar behavior. IOPCIPMCSState changed from 0x0 before sleep to 0x2108 after wakeup.

 

Mieze

Link to comment
Share on other sites

@lisai9093: I tried to find some background information about IOPCIPMCSState but found nothing. Therefore I checked this property of en0 on my 2011 iMac and it shows a similar behavior. IOPCIPMCSState changed from 0x0 before sleep to 0x2108 after wakeup.

 

Mieze

uhmm that's strange. i also did some other test on ethernet setting that might be useful to you:

 

i tried to play with DHCP in ethernet setting. Test after wakeup, if DHCP is enabled, the ethernet card cannot get IP address from my router, there is only self-assigned IP instead. Then I double checked my router site (192.168.0.1), under "device table" section where all devices and their IP listed. My machine's ethernet port is not in the list.

 

So I disabled DHCP and assigned IP address myself in Setting. I put 192.168.0.14 as my IP because it is not used to prevent IP conflict. Then I saw this IP showing up in the "Device List". And the MAC address matches with my ethernet card's MAC address.

 

Here is some log lines for one plug-in and out cycle:

Feb 28 17:15:13 Mac kernel[0]: Ethernet [RealtekRTL8100]: Link up on en0, 100-Megabit, Full-duplex, No flow-control
Feb 28 17:15:16 Mac.local configd[19]: network changed: v4(en0+:192.168.0.14, en1) DNS! Proxy! SMB
Feb 28 17:15:18 Mac.local racoon[320]: failed to bind to address fd00::a9e:1ff:fe2b:b425[500] (Can't assign requested address).
Feb 28 17:15:18 Mac.local racoon[320]: failed to bind to address fd00::a9e:1ff:fe2b:b425[500]: because interface address is/was not ready (flags 42).
Feb 28 17:15:18 Mac.local racoon[320]: failed to bind to address fd00::a9e:1ff:fe2b:b425[4500] (Can't assign requested address).
Feb 28 17:15:18 Mac.local racoon[320]: failed to bind to address fd00::a9e:1ff:fe2b:b425[4500]: because interface address is/was not ready (flags 42).
Feb 28 17:15:18 Mac.local racoon[320]: failed to bind to address fd00::a9e:1ff:fe2b:b425[500] (Can't assign requested address).
Feb 28 17:15:18 Mac.local racoon[320]: failed to bind to address fd00::a9e:1ff:fe2b:b425[500]: because interface address is/was not ready (flags 42).
Feb 28 17:15:18 Mac.local racoon[320]: failed to bind to address fd00::a9e:1ff:fe2b:b425[4500] (Can't assign requested address).
Feb 28 17:15:18 Mac.local racoon[320]: failed to bind to address fd00::a9e:1ff:fe2b:b425[4500]: because interface address is/was not ready (flags 42).
Feb 28 17:15:18 Mac.local configd[19]: network changed: v4(en0:192.168.0.14, en1) DNS* Proxy SMB
Feb 28 17:15:18 Mac.local racoon[320]: failed to bind to address fd00::a9e:1ff:fe2b:b425[500] (Can't assign requested address).
Feb 28 17:15:18 Mac.local racoon[320]: failed to bind to address fd00::a9e:1ff:fe2b:b425[500]: because interface address is/was not ready (flags 42).
Feb 28 17:15:18 Mac.local racoon[320]: failed to bind to address fd00::a9e:1ff:fe2b:b425[4500] (Can't assign requested address).
Feb 28 17:15:18 Mac.local racoon[320]: failed to bind to address fd00::a9e:1ff:fe2b:b425[4500]: because interface address is/was not ready (flags 42).
Feb 28 17:15:19 Mac.local configd[19]: network changed.
Feb 28 17:15:23 Mac.local AirPlayUIAgent[876]: 2014-02-28 05:15:23.988534 PM [AirPlayUIAgent] Changed PIN pairing: no
Feb 28 17:15:24 Mac.local AirPlayUIAgent[876]: 2014-02-28 05:15:24.038392 PM [AirPlayUIAgent] Changed PIN pairing: no
Feb 28 17:15:24 Mac.local com.apple.WebKit.Networking[934]: tcp_connection_destination_prepare_complete 5769 connectx to 192.168.0.1#80 failed: 64 - Host is down
Feb 28 17:15:24 Mac.local com.apple.WebKit.Networking[934]: tcp_connection_handle_destination_prepare_complete 5769 failed to connect
Feb 28 17:15:24 Mac.local com.apple.WebKit.Networking[934]: tcp_connection_destination_prepare_complete 5769 connectx to 192.168.0.1#80 failed: 64 - Host is down
Feb 28 17:15:24 Mac.local com.apple.WebKit.Networking[934]: tcp_connection_handle_destination_prepare_complete 5769 failed to connect
Feb 28 17:15:40 Mac kernel[0]: Ethernet [RealtekRTL8100]: Link down on en0
Link to comment
Share on other sites

 

i tried to play with DHCP in ethernet setting. Test after wakeup, if DHCP is enabled, the ethernet card cannot get IP address from my router, there is only self-assigned IP instead. Then I double checked my router site (192.168.0.1), under "device table" section where all devices and their IP listed. My machine's ethernet port is not in the list.

 

So I disabled DHCP and assigned IP address myself in Setting. I put 192.168.0.14 as my IP because it is not used to prevent IP conflict. Then I saw this IP showing up in the "Device List". And the MAC address matches with my ethernet card's MAC address.

 

In the device table on the router? This would mean that after a wakeup packets are going out, i.e. the transmitter is working but the receiver isn't. Maybe I should check the receiver config for your chipset again. There might be a hidden error?

 

Mieze

Link to comment
Share on other sites

Just tested this kext on my U310 (with 8105E) and it work great.  

I did have to configure it manually tho.  Automatic did not work for me (it kept switching between connected and disconnected).
My settings were 
100baseTX
full duplex
standard (1500)

I've tested waking from sleep as well as unplugging and re-plugging the ethernet cable and using both methods, I was able to get an IP and internet access.

  • Like 1
Link to comment
Share on other sites

Just tested this kext on my U310 (with 8105E) and it work great.  

 

I did have to configure it manually tho.  Automatic did not work for me (it kept switching between connected and disconnected).

My settings were 

100baseTX

full duplex

standard (1500)

 

I've tested waking from sleep as well as unplugging and re-plugging the ethernet cable and using both methods, I was able to get an IP and internet access.

 

Which chipset? Please see the kernel logs.

 

Mieze

Link to comment
Share on other sites

Just tested this kext on my U310 (with 8105E) and it work great.  

 

I did have to configure it manually tho.  Automatic did not work for me (it kept switching between connected and disconnected).

My settings were 

100baseTX

full duplex

standard (1500)

 

I've tested waking from sleep as well as unplugging and re-plugging the ethernet cable and using both methods, I was able to get an IP and internet access.

Can you upload ur DSDT? Just wanna check the ethernet part.

Link to comment
Share on other sites

Which chipset? Please see the kernel logs.

 

Mieze

 

do you mean this?

2/28/14 8:37:31.000 PM kernel[0]: Ethernet [RealtekRTL8100]: RTL8105E: (Chipset 12) at 0xffffff80dec3d000,  4:7d:7b:b8: 5:b8

Can you upload ur DSDT? Just wanna check the ethernet part.

 

how do I add attachments?

Link to comment
Share on other sites

do you mean this?

2/28/14 8:37:31.000 PM kernel[0]: Ethernet [RealtekRTL8100]: RTL8105E: (Chipset 12) at 0xffffff80dec3d000,  4:7d:7b:b8: 5:b8

 

how do I add attachments?

You can click "More Reply Option" at bottom right corner. Then attach your file. Thx in advance.

Link to comment
Share on other sites

I did another test: to unload and reload the rtl8100.kext.

 

After sleep, console shows:

Before unload/reload:
Ethernet [RealtekRTL8100]: RTL8105E: (Chipset 12) at 0xffffff80f124e000,  8:9e: 1:2b:b4:25

After:
Ethernet [RealtekRTL8100]: RTL8105E: (Chipset 12) at 0xffffff80e9aa5000,  0: 0: 0: 0: 0: 0

Shows MAC address is not properly initialized.

 

And I tried this procedure before sleep, no problem at all. Wish it is helpful info.

Link to comment
Share on other sites

I did another test: to unload and reload the rtl8100.kext.

 

After sleep, console shows:

Before unload/reload:
Ethernet [RealtekRTL8100]: RTL8105E: (Chipset 12) at 0xffffff80f124e000,  8:9e: 1:2b:b4:25

After:
Ethernet [RealtekRTL8100]: RTL8105E: (Chipset 12) at 0xffffff80e9aa5000,  0: 0: 0: 0: 0: 0

Shows MAC address is not properly initialized.

 

And I tried this procedure before sleep, no problem at all. Wish it is helpful info.

 

Yeah, got an idea! Are you able to build from source?

 

Mieze

  • Like 1
Link to comment
Share on other sites

 Just returned home. I'll send you a new version to test soon.

 

Mieze

Please try the attached version and report back.

 

Good luck!

 

Mieze

Thx. Unfortunately it is still not working. Unload/reload shows:

Before:
Ethernet [RealtekRTL8100]: RTL8105E: (Chipset 12) at 0xffffff80f136d000,  8:9e: 1:2b:b4:25

After:
Ethernet [RealtekRTL8100]: RTL8105E: (Chipset 12) at 0xffffff80f136d000,  0: 0: 0: 0: 0: 0
Link to comment
Share on other sites

@lisai9093: Can you please send me your DSDT. It might be as well something outside of thee driver which causes the failure after wakeup.

 

Mieze

Link to comment
Share on other sites

Here it is:attachicon.gifdsdt.aml.zip

 

I've tried @ikkoku's DSDT without success.  :(

 

I've checked your DSDT and found no problem. It's really strange but it seems as if your NIC doesn't get powered on completely after wakeup.

 

As ikkoku has no problems with sleep/wakeup using the same chipset, I assume that the cause of the problem isn't located inside the driver. Have you verified that there is no other driver for your NIC installed. I recently had a user reporting a funny problem with the RTL8111 driver and finally it turned out that he had forgotten to remove Realtek's own driver before installing mine.

 

You should also review your BIOS settings very carefully. Is energy saving and suspension (sleep = S3 state) configured correctly? Are PCIe devices allowed to generate wakeup events? What entity is handling wakeup events: the BIOS or OS X?

 

Mieze

Link to comment
Share on other sites

 Share

×
×
  • Create New...