Jump to content

IntelE1000e kext (82566MM, 82577LM, etc)


ktbos
 Share

52 posts in this topic

Recommended Posts

Attached is a new kext I created for the latest round of Intel E1000e wired network cards. This is primarily based on dingguijin's Intel82566MM kext. I got the latest Intel Linux driver code and put that into dingguijin's framework. This kext works well for me on my Dell Latitude E6410 which has a 82577LM card but should work with other new Intel network cards. Note that Intel branched the code a while back after the Intel82566MM which means that my new kext may not cover all the cards that the Intel82566MM kext does so this is not a supercede although it will overlap with some cards. See below for the list of cards that it should work with.

 

Now the caveats: I've compiled the kext to work with Leopard and Snow Leopard and for 32-bit Intel, 64-bit Intel, and for PPC. And I'm pleased to say that it was able to get a Gigabit connection. However, with only the one test computer, I've only been able to test it on 32-bit Intel and on Snow Leopard so let me know if there are problems with other versions or platforms. Also note, in particlar, that some of the theoretically supported cards are "special case" cards as defined by Intel (82571, 82572, 82573, 82574, 82583, and 80003ES2LAN) that use alternate driver logic that I was not able to test. And then there's the big caveat that this is my first kext so in addition to the usual disclaimers about not blaming me for anything going wrong, add in a novice rider!

 

Here's the kext for 32-bit 10.5 or 10.6: IntelE1000e.kext.zip

And here's the kext for 32- or 64-bit 10.6: IntelE1000e.kext.zip

 

And here's the list of cards this driver is intended to work with:

Intel Internal name                   DevID     Intel Product name
------------------------------------  --------  -------------------------------------------------
E1000_DEV_ID_82571EB_COPPER           0x105E	82571EB Gigabit Ethernet Controller
E1000_DEV_ID_82571EB_FIBER            0x105F	82571EB Gigabit Ethernet Controller
E1000_DEV_ID_82571EB_SERDES           0x1060	82571EB Gigabit Ethernet Controller
E1000_DEV_ID_82571EB_SERDES_DUAL      0x10D9	82571EB Dual Port Gigabit Mezzanine Adapter
E1000_DEV_ID_82571EB_SERDES_QUAD      0x10DA	82571EB Quad Port Gigabit Mezzanine Adapter
E1000_DEV_ID_82571EB_QUAD_COPPER      0x10A4	82571EB Gigabit Ethernet Controller
E1000_DEV_ID_82571PT_QUAD_COPPER      0x10D5	82571PT Gigabit PT Quad Port Server ExpressModule
E1000_DEV_ID_82571EB_QUAD_FIBER       0x10A5	82571EB Gigabit Ethernet Controller (Fiber)
E1000_DEV_ID_82571EB_QUAD_COPPER_LP   0x10BC	82571EB Gigabit Ethernet Controller (Copper)
E1000_DEV_ID_82572EI_COPPER           0x107D	82572EI Gigabit Ethernet Controller (Copper)
E1000_DEV_ID_82572EI_FIBER            0x107E	82572EI Gigabit Ethernet Controller (Fiber)
E1000_DEV_ID_82572EI_SERDES           0x107F	82572EI Gigabit Ethernet Controller
E1000_DEV_ID_82572EI                  0x10B9	82572EI Gigabit Ethernet Controller (Copper)
E1000_DEV_ID_82573E                   0x108B	82573V Gigabit Ethernet Controller (Copper)
E1000_DEV_ID_82573E_IAMT              0x108C	82573E Gigabit Ethernet Controller (Copper)
E1000_DEV_ID_82573L                   0x109A	82573L Gigabit Ethernet Controller
E1000_DEV_ID_82574L                   0x10D3	82574L Gigabit Network Connection
E1000_DEV_ID_82574LA                  0x10F6	82574L Gigabit Network Connection
E1000_DEV_ID_82583V                   0x150C	82583V Gigabit Network Connection
E1000_DEV_ID_80003ES2LAN_COPPER_DPT   0x1096	80003ES2LAN Gigabit Ethernet Controller (Copper)
E1000_DEV_ID_80003ES2LAN_SERDES_DPT   0x1098	80003ES2LAN Gigabit Ethernet Controller (Serdes)
E1000_DEV_ID_80003ES2LAN_COPPER_SPT   0x10BA	80003ES2LAN Gigabit Ethernet Controller (Copper)
E1000_DEV_ID_80003ES2LAN_SERDES_SPT   0x10BB	80003ES2LAN Gigabit Ethernet Controller (Serdes)
E1000_DEV_ID_ICH8_82567V_3            0x1501	82567V-3 Gigabit Network Connection
E1000_DEV_ID_ICH8_IGP_M_AMT           0x1049	82566MM Gigabit Network Connection
E1000_DEV_ID_ICH8_IGP_AMT             0x104A	82566DM Gigabit Network Connection
E1000_DEV_ID_ICH8_IGP_C               0x104B	82566DC Gigabit Network Connection
E1000_DEV_ID_ICH8_IFE                 0x104C	82562V 10/100 Network Connection
E1000_DEV_ID_ICH8_IFE_GT              0x10C4	82562GT 10/100 Network Connection
E1000_DEV_ID_ICH8_IFE_G               0x10C5	82562G 10/100 Network Connection
E1000_DEV_ID_ICH8_IGP_M               0x104D	82566MC Gigabit Network Connection
E1000_DEV_ID_ICH9_IGP_M               0x10BF	82567LF Gigabit Network Connection
E1000_DEV_ID_ICH9_IGP_M_AMT           0x10F5	82567LM Gigabit Network Connection
E1000_DEV_ID_ICH9_IGP_M_V             0x10CB	82567V Gigabit Network Connection
E1000_DEV_ID_ICH9_IGP_AMT             0x10BD	82566DM-2 Gigabit Network Connection
E1000_DEV_ID_ICH9_BM                  0x10E5	82567LM-4 Gigabit Network Connection
E1000_DEV_ID_ICH9_IGP_C               0x294C	82566DC-2 Gigabit Network Connection
E1000_DEV_ID_ICH9_IFE                 0x10C0	82562V-2 10/100 Network Connection
E1000_DEV_ID_ICH9_IFE_GT              0x10C3	82562GT-2 10/100 Network Connection
E1000_DEV_ID_ICH9_IFE_G               0x10C2	82562G-2 10/100 Network Connection
E1000_DEV_ID_ICH10_R_BM_LM            0x10CC	82567LM-2 Gigabit Network Connection
E1000_DEV_ID_ICH10_R_BM_LF            0x10CD	82567LF-2 Gigabit Network Connection
E1000_DEV_ID_ICH10_R_BM_V             0x10CE	82567V-2 Gigabit Network Connection
E1000_DEV_ID_ICH10_D_BM_LM            0x10DE	82567LM-3 Gigabit Network Connection
E1000_DEV_ID_ICH10_D_BM_LF            0x10DF	82567LF-3 Gigabit Network Connection
E1000_DEV_ID_PCH_M_HV_LM              0x10EA	82577LM Gigabit Network Connection
E1000_DEV_ID_PCH_M_HV_LC              0x10EB	82577LC Gigabit Network Connection
E1000_DEV_ID_PCH_D_HV_DM              0x10EF	82578DM Gigabit Network Connection
E1000_DEV_ID_PCH_D_HV_DC              0x10F0	82578DC Gigabit Network Connection

Link to comment
Share on other sites

Hi, I'm having problems getting my pc to load these drivers.

I have an 82578DM (0x10ef8086)

I'm currently using dingguijin's 1.0.3 drivers, which load fine. I'm hoping to get yours going as I have an issue with dingguijin's where when put under stress (e.g. multiple scp file transfers at the same time) either the card will simply stop responding (it stays green in the network settings but no network traffic works) or it grinds all the apps doing network stuff and in turn my system to a halt.

 

I've tried putting the drivers in S/L/E and in E/E with the IONetworkingFamily kext and neither way works. checking the /var/log/system.log i found this:

com.apple.kextd[12]: Can't load /System/Library/Extensions/IntelE1000e.kext - no code for running kernel's architecture.

 

perhaps it hasn't compiled for everything as you thought? Is there any chance you can provide the source code, and maybe I can try compile it myself? This would also be handy as I've been adding debug statements to the code provided by dingguijin's to try figure out where the code freezes/crashes/whatever-it-does, and it would be awesome to have the most recent version of the E1000 code to do this with.

 

I'm also interested in the process you went through to get the E1000 linux code into this, I should probably do some research on it myself, but if you have any pointers on where to start, etc this would be much appreciated :)

 

cheers

.tristan

Link to comment
Share on other sites

I had the best luck putting it in S/L/E - don't know why that was better than E/E but it worked out better for me. Of course, you'll also need to make sure that the Intel82566MM kext isn't loading too - I would say the behavior for having them both loaded would be unpredictable.

 

As far as the arch, I just checked build settings and it does say it is compiled for 64-bit and 32-bit and PPC. Can you do me a favor and fire this command in Terminal and tell me what happens?

sudo kextutil -n -t /path/to/IntelE1000e.kext

 

And let me know your OS version (10.6.3?) and which arch you are running.

 

Oh, and if you really want to know all the detail for how I got the kext updated, here's my blog post describing the process: Deep Task Queueing for Hac Laptop Networking

Link to comment
Share on other sites

tristan$ sudo kextutil -n -t  /Extra/Extensions/IntelE1000e.kext
Password:
No kernel file specified; using running kernel for linking.
Warnings: 
Executable does not contain code for architecture: 
	x86_64

/Extra/Extensions/IntelE1000e.kext does not contain code for architecture x86_64.

 

i am running 10.6.3, and I have removed all other sources for ethernet drivers, the system don't have any ethernet controllers when i boot. (I use [url="http://www.insanelymac.com/forum/topic/279450-why-insanelymac-does-not-support-tonymacx86/"]#####[/url] to rebuild caches and repair permissions)

 

again, if you provide the source code I can try to compile it myself :angry2:

Link to comment
Share on other sites

Tristan, thanks for the debugging help. I guess I hadn't figured out how to compile for 10.5 and for 10.6 64-bit at the same time. So I'm stuck with the two different versions. I've updated the original post to include a second compiled kext. Let me know if this works for you.

Link to comment
Share on other sites

In support of the GPL (http://creativecommons.org/licenses/GPL/2.0/) can you please release the source code by attaching it here, or providing a way to get to it.

Thanks :thumbsup_anim:,

 

iPoco

 

I'd been hoping to hear back from dingguijin so I could just add my code to his project but I haven't heard back from him. And with 2 requests for source already, apparently I shouldn't wait any longer. So instead, I've just created a new GoogleCode project: Google Code for IntelE1000e.kext

Link to comment
Share on other sites

OK, that one works. Thanks

 

Unfortunately it does not fix my problem. If i start 2 scp's from the computer, after a while the transfers stall and the network on the mac becomes non responsive until I unplug the cable and plug it back it (which, assuming the system hasn't locked up due to the network stall returns things to normal).

 

I guess it's back to adding debug statements to the code for me!

Link to comment
Share on other sites

Hi, I took a look at the source code.

 

I basically did the same thing when I wrote AppleIntelE1000e.kext based on e1000e linux driver.

 

I guess that VMWare bridge mode doesn't work with this driver, as setPromiscuousMode() is not implemented correctly.

Furthermore, IOMallocContiguous() is deprecated and IOBufferMemoryDescriptor() should be used instead.

You can freely use my code.

Link to comment
Share on other sites

It works on my 64bit 10.6.3. Thanks!

 

One problem is that, I cannot pick the jumbo frame in the control panel.

 

Even if I choose "Manual" MTU, it's capped at 1500. I believe the card does the jumbo frame.

My card is [8083:1083], Intel Pro/1000 PT Desktop Adapter.

The chipset is 82572, and the source code suggests it does jumbo frame.

 

	10b9  82572EI Gigabit Ethernet Controller (Copper)
	8086 1083  PRO/1000 PT Desktop Adapter
	8086 1093  PRO/1000 PT Desktop Adapter

 

-- TG

Link to comment
Share on other sites

I'd been hoping to hear back from dingguijin so I could just add my code to his project but I haven't heard back from him. And with 2 requests for source already, apparently I shouldn't wait any longer. So instead, I've just created a new GoogleCode project: Google Code for IntelE1000e.kext

 

I figured out the jumbo frame enabled in the control panel.

The real question is whether or not the driver actually does anything good or bad when I use the jumbo frame.

Do you have any idea?

 

-- TG

 

bash-3.2$ svn diff IntelE1000e.xcodeproj/project.pbxproj IntelE1000e.cpp IntelE1000e.h
Index: IntelE1000e.xcodeproj/project.pbxproj
===================================================================
--- IntelE1000e.xcodeproj/project.pbxproj	(revision 2)
+++ IntelE1000e.xcodeproj/project.pbxproj	(working copy)
@@ -290,7 +290,7 @@
			buildSettings = {
				ALWAYS_SEARCH_USER_PATHS = NO;
				ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
-				CURRENT_PROJECT_VERSION = 1.1.2;
+				CURRENT_PROJECT_VERSION = 1.1.3;
				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
				GCC_CW_ASM_SYNTAX = YES;
				GCC_C_LANGUAGE_STANDARD = c99;
Index: IntelE1000e.cpp
===================================================================
--- IntelE1000e.cpp	(revision 2)
+++ IntelE1000e.cpp	(working copy)
@@ -1087,6 +1087,18 @@
	}
}

+IOReturn IntelE1000e::getMaxPacketSize(UInt32 * maxSize) const
+{
+  if (adapter.ei) {
+	if ((adapter.ei->flags & FLAG_HAS_JUMBO_FRAMES) != 0) {
+	  *maxSize = adapter.ei->max_hw_frame_size;
+	  return kIOReturnSuccess;
+	}
+  }
+  return super::getMaxPacketSize(maxSize);
+}
+
+
//-----------------------------------------------------------------------
// e1000e private functions
//-----------------------------------------------------------------------
Index: IntelE1000e.h
===================================================================
--- IntelE1000e.h	(revision 2)
+++ IntelE1000e.h	(working copy)
@@ -93,6 +93,7 @@
	virtual IOReturn setMulticastMode(bool active);
	virtual IOReturn setMulticastList(IOEthernetAddress * addrs, UInt32 count);
	virtual IOReturn getChecksumSupport(UInt32 *checksumMask, UInt32 checksumFamily, bool isOutput);
+	virtual IOReturn getMaxPacketSize(UInt32 * maxSize) const;

private:
	IOWorkLoop * workLoop;

Link to comment
Share on other sites

think u can thworw one for intel pro ve

 

Nope, totally different card would require totally different driver. Check around, though, because it's pretty likely that you'll find a ProVE kext somewhere. Just not here.

Link to comment
Share on other sites

Hi ktbos,

 

I really enjoy reading your blogs. I'm very interested learning on this subject, particularly porting linux driver to OS X. It is not easy to learn about OS X driver development but your blog may help me to understand it better. :superman: Thank you for sharing the source code.

Link to comment
Share on other sites

Great, glad I could be of help. It'd be interesting to hear how dingguijin first started his Intel82566MM work and that might help people like you and me learn where to start on some other driver.

Link to comment
Share on other sites

I thought this supported my 82575's as well (had fiddled a while ago with integrating some of this code but am not fluent on OSX/Xcode) but it only set something improperly in my network cards requiring a 30 second time off cold boot for any other OS to be able to see them again.

Link to comment
Share on other sites

I thought this supported my 82575's as well (had fiddled a while ago with integrating some of this code but am not fluent on OSX/Xcode) but it only set something improperly in my network cards requiring a 30 second time off cold boot for any other OS to be able to see them again.

 

i don't know why but Intel considers the 82575 and 82576 to be special case drivers. You'll note that it's not in the list that Intel provided with the code I downloaded from intel.com. I searched intel.com and found this download for your driver, which says that it only works for 3 cards. (It is also interesting that it says it isn't the latest code even though if you search by product it is the only code that matches - clearly a glitch on the Intel site.) Since your driver isn't covered by the E1000e Intel code, that means it isn't covered by this kext.

 

But the most surprising thing is that the kext loaded at all because when there is no match, the kext shouldn't do anything and there should be no match with the 82575. Did you use the kext as is or did you modify the Info.plist? If you used it unmodified, can you find the hex device ID for your card and see if it shows in the device list for this kext?

Link to comment
Share on other sites

  • 3 weeks later...

Thanks for the driver and source. Is there any chance you might be able to bring over some of the stuff from the regular e1000 linux driver? This way older PCI cards, such as the 82541, would be supported. Thanks, again.

Link to comment
Share on other sites

Sorry, imk, that's unlikely. The only sensible thing to do when porting Linux drivers is to keep the Apple version matching the original Intel version for Linux. The bulk of the Intel code doesn't change - the major changes for the Mac are just for the wrapper. So merging two sets of Intel code distributions would be a major challenge that it doesn't seem Intel would even want to take on. What you need is to port the E1000 code from Intel using the same tricks as dingguijin did originally. It's no small feat, and I say that based on experience.

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

I got 10.5.7 but IntelE1000e.kext cannot work on it. It shows in Network Preferences, but when I plug cable it assigns DHCP and Subnet Mask, but no IP from router and no DNS Server found. Any Help here would do. :(

Link to comment
Share on other sites

 Share

×
×
  • Create New...