Jump to content

PCGenRTL8139Ethernet v1.1.0 (8.4.1) & v1.2.0 (8.8.1) released


  • Please log in to reply
128 replies to this topic

#1
orByte

orByte

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 182 posts
/****************************** INFO BAR ************************************

Edit: Last Modified: 31/12/07, Leo Link Added.

FOR LEOPARD:
---------------------------------
Thanks to John Stormdrake, a driver for Leopard is now available here.

Files
----------------------------------
1. Darwin 8.8.1 - PCGenRTL8139Ethernet-1.2.0.zip
MD5 (PCGenRTL8139Ethernet-1.2.0.zip) = c2e4ac081c855e95ee4a3af52c2df63c
2. Darwin 8.4.1 - PCGenRTL8139Ethernet-1.1.0.zip
MD5 (PCGenRTL8139Ethernet-1.1.0.zip) = a7cec7c9ec113c41126de8ba877715b8


Compatibility Guidelines
----------------------------------
(10.4.9) = Reported to work with Tubgirl's AMD release - pls. see this thread.

For Kernel 8.8.1

(10.4.8) + IONetworkingFamily (1.5.1)

For Kernel 8.4.1

(10.4.6) + IONetworkingFamily (1.5.0)
(10.4.7) + IONetworkingFamily (1.5.0)
(10.4.8) + IONetworkingFamily (1.5.0)

Other configurations may work, but these are the ones I have tested.

******************************************************************************/

DISCUSSION THREAD STARTS BELOW:

Hi all,

I am pleased to announce the release of PCGenRTLEthernet8139.kext - another addition to the 'Generic PC drivers' project for Darwin.

This driver is based on the AppleRTL8139Ethernet-3 and AppleRTL8139Ethernet-4 sources and extends functionality to include ON-BOARD RTL 8139/810x Fast Ethernet Family devices, which were previously unworkable. The driver will continue to work for add-on devices. It should be backwards compatible with the Apple versions.

CHANGES
---------------------------------------------------------

10/01/07
* Changes on x86 based systems:
(+) Added MMIO access mode (adds support for on-board RTL8139/810x family devices)
(+) To override PIO mode, added ForceMMIOAccess (true/false) key to Info.plist, default false.
(+) Added hard chip reset if soft reset fails logic.


CREDITS
---------------------------------------------------------

- Thanks to Owen Wei for the original Apple Realtek code. This was invaluable.
- Thanks to cremes' OSX tulip driver.
- Thanks to Linux. In my case. Gentoo 2.6.17.



discussion

Problem: On-board RTL8139/810x devices are not detected by the AppleRTL8139Ethernet driver.

Cause: The Apple driver only used PIO access to speak to the RTL chip. But PIO access fails to initialize for on-board devices.

Solution: Using MMIO acces mode works for on-board devices.

Implementation Options Considered:

0. Make 2 versions of the kext using a compiler directive selecting PIO/MMIO at compile time (e.g. Linux).
Advantages: Simple to do.
Disadvantages: Two kext versions, user specifies which one.

1. Make 1 version of the kext using MMIO only.
Advantages: Simple to do, tested and works.
Disadvantages: Breaks compatibility with existing code base.

2. Make 1 version of the kext with run-time PIO/MMIO allocation.
Advantages: Single kext, retains backwards compatibility.
Disadvantages: Need to create fast coding model.


We could have done something like:
inline UInt32 csrRead32( UInt16 offset )
	{ 
	  if (ioAccessMode == kIOAccessModeIsPIO) return pciNub->ioRead32(offset, csrMap); 
	  else return OSReadLittleInt32( ( void * ) csrBase, offset );
	 }

But this is not true run-time allocation. Instead, this is a good case for using the features of C++ - in particular, the ability the cast a derived class to a base class. For interested parties, the details are in the code, but the final implementation is class based:
class ioAccessor : public OSObject
 {
 
	OSDeclareAbstractStructors ( ioAccessor )
	
	public:
	
	virtual void				csrWrite32 ( UInt16 offset, UInt32 value ) = 0;
	   virtual void				csrWrite16 ( UInt16 offset, UInt16 value ) = 0;
	   virtual void				csrWrite8 (  UInt16 offset, UInt8 value ) = 0;
	virtual void				csrWrite32Slow ( UInt16 offset, UInt32 value ) = 0;
	   virtual void				csrWrite16Slow ( UInt16 offset, UInt16 value ) = 0;
	   virtual void				csrWrite8Slow (  UInt16 offset, UInt8 value ) = 0;
	   virtual UInt32				csrRead32 ( UInt16 offset ) = 0;
	   virtual UInt16				csrRead16 ( UInt16 offset ) = 0;
	   virtual UInt8				csrRead8 (  UInt16 offset ) = 0;
	
	protected:
	virtual bool				init ( );

 };
 
as the abstract base class, then

  class ioAccessorPIO : public ioAccessor
 {
 
...
	
 };
 
  class ioAccessorMMIO : public ioAccessor
 {

...

  };

which implement the appropriate access methods and variables.

Best

#2
onelove

onelove

    InsanelyMac Protégé

  • Members
  • Pip
  • 14 posts
:unsure: Thanks orByte for this new release driver it actually work with my OnBoard Realtek RTL8100C on Kernel 8.8.1 with (10.4.8) + IONetworkingFamily (1.5.1)...

Edited by onelove, 10 January 2007 - 04:27 PM.


#3
donh

donh

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 100 posts
Thanks works on my compaq V5000 laptop. wireless also works. Tubgirl final with latest semthex kernel.

donlaptop:~ root# dmesg | grep 8139
com_orByte_driver_RTL8139: vendorID = 0x10ec deviceID = 0x8139 revisionID = 0x0010
com_orByte_driver_RTL8139: found PIO accessor at a001
com_orByte_driver_RTL8139: found MMIO accessor at D0202000
com_orByte_driver_RTL8139: could not initialize PIO mode, switching to MMIO mode...
com_orByte_driver_RTL8139: using MMIO access mode...
com_orByte_driver_RTL8139: io access at csrBase=1fc25000.
com_orByte_driver_RTL8139: Ethernet address 00:16:d4:43:37:b3

Don

If it posted ethernet is working.

Edited by donh, 11 January 2007 - 01:13 AM.


#4
orByte

orByte

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 182 posts
Cheers guys!

#5
Boooooommm

Boooooommm

    InsanelyMac Protégé

  • Members
  • Pip
  • 10 posts
I do get that posted, but for some reason it hangs after it loads up the gui. Never loads the backgrounds image or anything, just the blue screen and the mouse. Any suggestions?

I'm on a Compaq V2582, using JAS 10.4.8 Kernel 8.8.1 and IONertworkingFamily.kext version 1.5.1 already preinstalled.

Edited by Boooooommm, 16 January 2007 - 09:26 AM.


#6
donh

donh

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 100 posts

I do get that posted, but for some reason it hangs after it loads up the gui. Never loads the backgrounds image or anything, just the blue screen and the mouse. Any suggestions?

I'm on a Compaq V2582, using JAS 10.4.8 Kernel 8.8.1 and IONertworkingFamily.kext version 1.5.1 already preinstalled.



Did you use the ppf? Also maybe newer kernel. Also read some kexts are PPC not intel.

Are you amd or intel.

Don

Edited by donh, 16 January 2007 - 04:45 PM.


#7
envisioneer

envisioneer

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 2 posts
Thanks, very much appreciated :thumbsup_anim:

dmesg:
com_orByte_driver_RTL8139: vendorID = 0x10ec deviceID = 0x8139 revisionID = 0x0010
com_orByte_driver_RTL8139: found PIO accessor at d001
com_orByte_driver_RTL8139: found MMIO accessor at F8110000
com_orByte_driver_RTL8139: using PIO access mode...
com_orByte_driver_RTL8139: io access at csrBase=d000.
com_orByte_driver_RTL8139: Ethernet address 00:40:f4:17:3b:ef

Now finally working and using to post this.

Wasn't straightforward though,

using add-in PCI card RTL8139 (white box, unknown)
nic detected as Realtek1000 both before AND after installing PCGenRTL8139Ethernet-1.2.0
(as shown in System Profiler extensions pane)

had to backup and delete RealtekR1000.kext from
/System/Library/Extensions/IONetworkingFamily.kext/contents/plugins folder before it worked

I'm guessing the RealtekR1000.kext was getting called before the PCGenRTL8139Ethernet.kext since both had
<key>IOPCIMatch</key>
<string>0x816910ec</string>
in their info.plist files, probably stops searching after first match

it may even have been enough to just do this since it's an add-in card rather than onboard and there's already an AppleRTL8169Ethernet.kext installed by default - but haven't tested this.

Just in case it helps anyone else.

JaS10.4.8 AMD / 8.8.1 / 1.5.1 kext
mobo:MSI Master2FAR7, dual opteron 248's (K8T800 Pro)
onboard Broadcom 5705 disabled in Bios (gave up on this one!)
internet thru ADSL router on LAN.

cheers!

#8
errandwolfe

errandwolfe

    Usurper of Wilson, King of Prussia

  • Donators
  • 1,429 posts
  • Gender:Male
  • Location:Miami Beach, FL
For the people who are hanging where the login screen would appear. You did not delete ALL the original RTL8139 kexts before installing the new one. The is a kext not only in IONetworkingFamily, but also right in the extensions folder AppleRTL8139.kext. Boot into single user and delete that as well.

#9
Boooooommm

Boooooommm

    InsanelyMac Protégé

  • Members
  • Pip
  • 10 posts
Nope. I'm making sure they're erased. I even erased some of the 8169 files. The system just hangs. I'm on a AMD V2000 using JAS SSE2/3 Beta v2

#10
orByte

orByte

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 182 posts

Nope. I'm making sure they're erased. I even erased some of the 8169 files. The system just hangs. I'm on a AMD V2000 using JAS SSE2/3 Beta v2


Can you try this: boot into single user mode, then run
sh /etc/rc
and if that goes through,
kextstat | grep RTL
ifconfig

And if your network device has been recognised you can try
ping www.<somesite>
The use <ctrl-Z> or <ctrl-C> to stop the ping.

To save output for posting you can try
<some_Command_from_Above>   >> ~/Desktop/outputfile.txt


And let us know how it went

Cheers
Best

#11
jester1o1

jester1o1

    InsanelyMac Protégé

  • Members
  • PipPip
  • 60 posts
Thanks for these drivers - I am using your AppleRTL on a PCI addin card - it works 100%

Will try the new version today!

#12
pablovbas

pablovbas

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 125 posts
  • Gender:Male
  • Location:Chile
Thanks Brother!!!

pabs :whistle:

#13
Tibian Ass Monkey

Tibian Ass Monkey

    InsanelyMac Protégé

  • Members
  • Pip
  • 12 posts
Hi I have an Asus Salmon K8S-LA board (pain in the {censored} for osx compat)

The actual network chip is a Realtek RTL8139CL onboard but it just wont detect :D I did notice the driver on XP says SIS900, but actual visual confirmation of the board is 8139CL.

Now before I get replies to go buy a 8139 add on card, I already own one and this driver works fine for it.
Problems is I have 5 of these computers., and it seems quite wastefull to put a new network card in all when onboard works great in linux xp etc.

So is there any way to getting this working?

#14
orByte

orByte

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 182 posts

Hi I have an Asus Salmon K8S-LA board (pain in the {censored} for osx compat)

The actual network chip is a Realtek RTL8139CL onboard but it just wont detect :2cents: I did notice the driver on XP says SIS900, but actual visual confirmation of the board is 8139CL.

Now before I get replies to go buy a 8139 add on card, I already own one and this driver works fine for it.
Problems is I have 5 of these computers., and it seems quite wastefull to put a new network card in all when onboard works great in linux xp etc.

So is there any way to getting this working?


Hi whats the network driver under linux? do
lsmod
IS it 8139too (Realtek - probably OK) or sis900. It could also be that the driver is not detecting your device&vendor id. If you add your device and vendor id to the IOPCIMatch key in the Info.plist, that would help. You need to be root for that.

Look at - your path might be slightly different -
/System/Library/Extensions/PCGenRTL8139Ethernet.kext/Contents/Info.plist

Add here
<key>IOPCIMatch</key>
						<string>0x813910ec 0x13001186 0x12111113</string>


When this is done, you will need to update permissions, and either load/unload the kext OR restart the system.

chown -R root:wheel <path>/PCGenRTL8139Ethernet.kext
chmod -R 755 <path>/PCGenRTL8139Ethernet.kext
kextunload <path>/PCGenRTL8139Ethernet.kext
kextload -v <path>/PCGenRTL8139Ethernet.kext

Edited by orByte, 05 February 2007 - 01:56 PM.


#15
gio on the mic

gio on the mic

    InsanelyMac Protégé

  • Members
  • PipPip
  • 73 posts
  • Gender:Male
  • Location:Italy
You guy really rock! This is totally AWESOME! now i have my wireless card AND my onboard Realtek 8139 BOTH WORKING!
;)

#16
orByte

orByte

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 182 posts

You guy really rock! This is totally AWESOME! now i have my wireless card AND my onboard Realtek 8139 BOTH WORKING!
:)


Cheers!!

#17
squimmy

squimmy

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 120 posts
I have the same problems as Boooooommm. My system just hangs when it would go to boot the GUI. I can't even succesfully boot into single user mode, after I type "sh /etc/rc" it hangs at "Resetting IOCatalouge."


Please, why does this happen?

#18
orByte

orByte

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 182 posts

I have the same problems as Boooooommm. My system just hangs when it would go to boot the GUI. I can't even succesfully boot into single user mode, after I type "sh /etc/rc" it hangs at "Resetting IOCatalouge."
Please, why does this happen?


Go into single user mode. Mount the root volume.
/sbin/fsck -fy
<the mount command>.. from the prompt
Do not type sh /etc/rc

Then delete (also recommend backup) all occurences of AppleRTL8139Ethernet.kext in /System/Library/Extensions and /System/Library/Extensions/IONetworkingFamily/Contents/Plugins. Also delete all occurences of any other networking kext with the same device:vendorid. Read this for details: http://forum.insanel...&...st&p=277406

Then finish up with
touch /System/Library/Extensions

or on reboot use the flag -f

Hopefully that will work.

Best.

#19
kfriis

kfriis

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 2 posts
Hi

I hope you can help me as well - I'm kinda new to the Mac but know my way around a PC.

I installed JaS 10.4.8 AMD/Intel SSE2/SSE3 Semthex 8.8.1 image on my PC and the install went flawless. I can boot fine and most things seems to work - EXCEPT sound (I will worry about that later) and networking (which is a big problem).

I spent a long time troubleshooting and reading this forums and eventually downloaded the PCGenRTL8139Ethernet 1.2.0 package and installed it according to the instructions (the loader says "valid"). I was hoping it would work, but it didn't. Nothing changed - System Preferences/Network is completely "empty".

My motherboard is a Asrock 939 Dual-SATA2 (AMD Opteron 165 Dual Core CPU) w/ built-in ethernet. I'm pretty sure it has a Realtek RTL8201CL network chipset and that might be the problem. Everyone seems to be asking about Realtek, but I have not been able to find any posts about this particular motherboard and/or chipset.

Do you have any suggestions for what to do? I'm pretty desperate - I was so happy to get everything installed without a single problem but have now spend a long time just getting networking to work.

Thanks in advance!

#20
orByte

orByte

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 182 posts

Hi

I hope you can help me as well - I'm kinda new to the Mac but know my way around a PC.

I installed JaS 10.4.8 AMD/Intel SSE2/SSE3 Semthex 8.8.1 image on my PC and the install went flawless. I can boot fine and most things seems to work - EXCEPT sound (I will worry about that later) and networking (which is a big problem).

I spent a long time troubleshooting and reading this forums and eventually downloaded the PCGenRTL8139Ethernet 1.2.0 package and installed it according to the instructions (the loader says "valid"). I was hoping it would work, but it didn't. Nothing changed - System Preferences/Network is completely "empty".

My motherboard is a Asrock 939 Dual-SATA2 (AMD Opteron 165 Dual Core CPU) w/ built-in ethernet. I'm pretty sure it has a Realtek RTL8201CL network chipset and that might be the problem. Everyone seems to be asking about Realtek, but I have not been able to find any posts about this particular motherboard and/or chipset.

Do you have any suggestions for what to do? I'm pretty desperate - I was so happy to get everything installed without a single problem but have now spend a long time just getting networking to work.

Thanks in advance!


Hi all,

Realtek RTL8201CL is NOT an NIC chipset. It is only a PHY=the physical interface. When a PHY is present, the NIC functions are done somewhere else - usually integrated into the chipset. E.g. with the uli southbridge.

This is not clear when vendors advertise a Realtek PHY for networking.

Best.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy