Driver for nForce4 LAN, A duct taped together native OS X driver |
Driver for nForce4 LAN, A duct taped together native OS X driver |
|
planetbeing
InsanelyMac Protégé
|
![]() |
Mar 24 2006, 08:36 AM Post #1
|
![]()
|
I'm one of the unlucky/poor ones who own a A8N-SLI... and not even the deluxe edition that gives you the Marvell-Yukon chip which would work for OS X. I didn't want to buy another LAN board, because I'm perversely repulsed by that sort of redundancy and inelegance.
After a few attempts at trying to manipulate the vendor and device ids to make the Apple drivers work, I decided to write my own from scratch. Well, more precisely, I decided to blatantly rip off of the GPL'ed forcedeth driver for Linux, which someone had mentioned earlier (but I had a really difficult time getting a copy of the source code on Google, I only managed to get several old versions so far). But I figured 2000 odd lines of code isn't too unreasonable and I could figure it out mostly, and also figure out enough of OS X's innards so I can port it. Luckily, I was right, and it's partially thanks to the Apple team for providing a surprisingly friendly platform to code... device drivers on. I've never coded one in my life, and I've never coded for Macs, either, but I was able to get the hang of it pretty quickly. (However, I must say the documentation wasn't the best... I mean at least do a better job of hyperlinking it! And also I had quite a fun time trying to get the provided interrupt request handler to work right... it actually crashed my computer a lot more than the "unsafe" method I used earlier did) The driver is pretty crappy, I have severe doubts about its stability, and indeed, I've had to restart my computer a lot during the development process, but having your code running at the kernel level doesn't give you a lot of room for error. Anyway, I'm not how much interest is there (all the other nForce4 people seem to have other LAN cards or have the Deluxe or Platinum version and using the Marvell Yukon driver), and the driver so far is still pretty humiliatingly unstable (though I haven't tested it out extensively). If you want the source, it'll be all GPL'ed and such. But I mostly wanted to brag about how I wrote a OS X driver. EDIT: The driver attached should now be fairly stable, but as with all OS X drivers, there is no guarantee of support. Complete system freezes have been known to occur with older versions and may reoccur, so avoid doing critical work on OS X. Source code is included for the sake of future generations. Here are my recommended instructions for getting it working on your computer: 1. Download the attached driver 2. Extract the contents onto the desktop 3. Open the Terminal application in the Applications/Utilities folder 4. Type "tail -f /var/log/system.log" to obtain debugging output for the first run. 5. Use the menu bar to open up a new Terminal window. 6. In this new window, type "cd ~/Desktop/forcedeth/build/Release" 7. sudo chown -R root:wheel forcedeth.kext 8. sudo chmod -R 755 forcedeth.kext 9. sudo kextload -v forcedeth.kext 10. Observe in the log window what happens. If there are no errors, and you eventually see the link going up with a proper speed, then the driver will work with your hardware. Otherwise, paste the log in this thread for help. 11. Test out the driver by browsing some websites, etc. 12. If there were any problems in steps 10 or 11, type "sudo kextunload forcedeth.kext", then repeat steps 7-11 for forcedeth-nockd.kext 13. To install the driver, type "sudo cp -R forcedeth.kext /System/Library/Extensions" 14. Lastly, update the extensions cache with "sudo kextcache -k /System/Library/Extensions" EDIT: I needed to do some work on OS X again, so I installed Leopard. The original version of my driver seemed to not work/immediately kernel panic so I made a small change. I think it's probably the same change I made awhile ago when I was trying to fix it for stability. I also cleaned up the plists a bit. But if it didn't work for you at all before, it will probably not work for you now either. But if it worked for you before, this version should work better. It was compiled under 10.5, so it might need a recompile for your version of the OS. EDIT2: Replaced old version with a newer version that fixes a bug that caused kernel panics for me before. After some work figuring out how to get panic logs, I traced it to the occasional failure of replaceOrCopyPacket. I did a quick Google search to see why that could possibly happen -- only it lead me right back to this thread, where someone named chuttenh had already traced it to the very same problem. D'oh! I can't keep track of this huge thread. Anyway, I posted my version of the fix. There's some weirdness with refilling the ring with "available packets" after errors that I think may come up with earlier versions and chuttenh's version, but I am not sure. His version has a few other changes, I think, and is available from his post somewhere in here. EDIT3 I merged MeDevil's changes for MCP61 and called it 0.3 (thanks, MeDevil!). I cannot test these changes myself, but according to MeDevil, it should take care of the waking up from sleep problem and backwards MAC address issue for MCP61. Note that the device ID is hardcoded in there, so if anyone has these issues and do not have MCP61, change where it checks specifically for 0x03EF, stick in your device ID, recompile and see if it works for you. If it does, tell me and we can add it. (EDIT3.1: Updated 0.3 to actually add MCP61 to the Info.plist, forgot to do that last time. Oops!) EDIT3.2: Github repository up at http://github.com/planetbeing/forcedeth-osx/. Issue pull requests whenever. It also has a wiki if people would like to share their experiences with the driver there.
Attached File(s)
forcedeth.zip ( 1.05MB )
Number of downloads: 29638
forcedeth_0.2c_leopard.zip ( 930.78K )
Number of downloads: 4560
forcedeth_0.3_leopard.zip ( 897.15K )
Number of downloads: 11359 |
planetbeing Driver for nForce4 LAN Mar 24 2006, 08:36 AM
borez Hi there,
It'll be godsend to all the nForce ... Mar 24 2006, 10:11 AM
planetbeing I'm too tired to package up the file right now... Mar 24 2006, 12:19 PM
thefighter Post the source code as well as the actual thing. ... Mar 24 2006, 04:48 PM
myzar mhh nforce3 support that would be good , appleyuko... Mar 24 2006, 08:17 PM
planetbeing I've uploaded the zip file. Again, if people w... Mar 25 2006, 03:07 AM
timmyj great work mate, i want to try this out so bad, bu... Mar 25 2006, 07:45 AM
myzar hi, i dunno if it's supposed to work with my n... Mar 25 2006, 11:08 AM
borez Hi there,
I'm not sure on which device/vendor... Mar 25 2006, 12:56 PM
planetbeing 0057 is the same device id as the one I have on my... Mar 25 2006, 03:38 PM
myzar Yes you are right after searching around i've ... Mar 25 2006, 04:45 PM
borez Hi,
Placed this driver in IONetworking, and force... Mar 25 2006, 05:15 PM
ona2x QUOTE (borez @ Mar 25 2006, 02:18 PM) Hi,... Mar 25 2006, 05:28 PM
planetbeing I recommend loading it and unloading it manually w... Mar 25 2006, 05:58 PM
MatrixMan07 I just tried the newest one and it works fine thx Mar 25 2006, 08:05 PM
ona2x here is what i get, from the debuggin output. Mar 25 2006, 08:08 PM
planetbeing QUOTE (ona2x @ Mar 25 2006, 03:11 PM) her... Mar 26 2006, 01:20 AM
borez Hi there,
This is my debug log:
CODEMar 26 10... Mar 26 2006, 02:26 AM
planetbeing Try the latest build, but use build/debug. It shou... Mar 26 2006, 02:54 AM
johnzbesko I also have an A8N-SLI mobo and have installed the... Mar 27 2006, 02:15 AM
planetbeing I always just upload the latest version in the fir... Mar 27 2006, 10:41 AM
npwski planetbeing
I tried two versions of your forced... Mar 27 2006, 11:40 PM
planetbeing Your logs indicate that OS X didn't even ATTEM... Mar 28 2006, 02:45 AM
johnzbesko I can report the same behavior. I also tried manua... Mar 28 2006, 02:53 AM
planetbeing Well, it's quite simple to compile the code us... Mar 28 2006, 02:58 AM
johnzbesko Here's the output from "ifconfig -a... Mar 28 2006, 04:52 AM
wkweksl I'm having the same problem. From the network ... Mar 28 2006, 05:07 AM
npwski planetbeing
Excuse, I have slightly mixed: in my ... Mar 28 2006, 05:12 AM
planetbeing Be advised that I did not write any interface for ... Mar 28 2006, 05:42 AM
npwski planetbeing
Because i don't know what strings ... Mar 28 2006, 08:37 AM
wkweksl Pretty much the same issue as npwski. Only differe... Mar 28 2006, 09:16 AM
planetbeing Actually, you're even worse off than most, sin... Mar 28 2006, 11:16 AM
wkweksl QUOTE (planetbeing @ Mar 28 2006, 07:19 P... Mar 28 2006, 11:28 AM
planetbeing Oh, I didn't see that. Then it means you have ... Mar 28 2006, 12:23 PM
np_ QUOTE (planetbeing @ Mar 28 2006, 09:26 A... Mar 28 2006, 03:02 PM
planetbeing Thank you very much! I wrote this driver witho... Mar 28 2006, 04:57 PM
borez QUOTE (planetbeing @ Mar 28 2006, 08:26 P... Mar 28 2006, 03:20 PM
MatrixMan07 hi,
i already posted that it works for me... but ... Mar 28 2006, 07:05 PM
ona2x Working perfect. Thankz a lot. Mar 28 2006, 08:02 PM
theSpam Great work!
Now I regret spending $9 on ... Mar 28 2006, 08:50 PM
planetbeing QUOTE (theSpam @ Mar 28 2006, 03:53 PM) G... Mar 29 2006, 07:42 AM
wkweksl It works now! Thanks planetbeing! Mar 29 2006, 02:23 AM
johnzbesko I'm writing this post using Safari and the lat... Mar 29 2006, 02:41 AM
wkweksl John, you might want to try a PATA drive instead w... Mar 29 2006, 03:36 AM
planetbeing Could someone tell me the PHY address they're ... Mar 29 2006, 04:06 AM
wkweksl QUOTE (planetbeing @ Mar 29 2006, 12:09 P... Mar 29 2006, 04:53 AM
johnzbesko # cat /var/log/system.log|grep PHY
Mar 26 12:41:42... Mar 29 2006, 04:45 AM
npwski Finally, forcedeth works for me perfectly, no garb... Mar 29 2006, 04:53 AM
borez QUOTE (planetbeing @ Mar 29 2006, 01:00 A... Mar 29 2006, 07:46 AM
wkweksl @planetbeing
How do you stop the driver from spam... Mar 29 2006, 07:46 AM
planetbeing If you don't want the debugging messages, don... Mar 29 2006, 08:01 AM
wkweksl Is anyone experiencing system lockups over large f... Mar 29 2006, 01:01 PM
snip3r Encountered once when the other PC in my room acce... Mar 29 2006, 03:20 PM
borez Me too, it happened when I was just surfing the we... Mar 29 2006, 04:03 PM
snip3r how to i load forcedeth.kext automatically each ti... Mar 29 2006, 04:40 PM
planetbeing I've put up a new version of the driver in the... Mar 29 2006, 11:16 PM
Thor Hi and thank's planetbeing for this driver. I ... Mar 29 2006, 11:52 PM
Thor QUOTE (Thor @ Mar 30 2006, 12:55 AM) Hi a... Mar 31 2006, 04:10 PM
sambo60 This looks very good but can someone post a clear ... Mar 30 2006, 04:34 AM
karlac edit: Great job now I can play WoW on the mac side... Mar 30 2006, 05:05 AM
wkweksl Ok. Here's a quick howto
1. Get the forcedeth... Mar 30 2006, 05:18 AM
planetbeing The error you were getting is because the driver d... Mar 30 2006, 10:20 AM
gfx QUOTE (planetbeing @ Mar 30 2006, 12:23 P... Mar 31 2006, 12:45 PM
technolion Thanks so much, Planetbeing! You're tha ma... Mar 30 2006, 11:44 AM
sandr Thanks !!!!!!!!... Mar 30 2006, 08:12 PM
Viral just loaded mine and im posting via OSX86 on my A8... Mar 31 2006, 12:07 AM
u1m2 great work man, you must have a very steep learnin... Mar 31 2006, 12:15 AM
planetbeing I don't think I or anyone else have ever exper... Mar 31 2006, 12:52 PM
Veeoh yup - works for me great top work Mar 31 2006, 01:39 PM
vaderd @planetbeing
Thanks for your work on the LAN driv... Mar 31 2006, 03:52 PM
planetbeing QUOTE (vaderd @ Mar 31 2006, 10:55 AM) @p... Mar 31 2006, 04:39 PM
myzar QUOTE (planetbeing @ Mar 31 2006, 06:42 P... Mar 31 2006, 05:09 PM
vaderd Cool. Check out these threads: http://forum.osx86p... Mar 31 2006, 05:00 PM
planetbeing I see that error on my nForce4, but my two SATA ha... Mar 31 2006, 06:04 PM
luxmen WORK GREAT.....
===> Thx <===
Shuttl... Apr 1 2006, 09:07 AM
letni I have a Nforce 430 (GA-K8N51GMF-9 - socket 939 w/... Apr 1 2006, 04:36 PM
planetbeing QUOTE (letni @ Apr 1 2006, 11:39 AM) I ha... Apr 1 2006, 06:15 PM
letni Thank you for your efforts, even if you don't ... Apr 1 2006, 07:09 PM
Renard45 it's works fine for me very good job Apr 3 2006, 12:57 AM
malti I get an error that says something about the super... Apr 3 2006, 08:41 PM
theSpam Nevermind... Apr 6 2006, 03:48 AM
jhonnypolak I followed the instructions on the first page and ... Apr 4 2006, 01:11 PM
planetbeing Yeah, it's the fact that you have 10.4.1. I th... Apr 4 2006, 04:05 PM
chiras First of all thanks for this one...!
Worked f... Apr 5 2006, 10:49 AM
planetbeing What might be the trouble is that you have either ... Apr 5 2006, 12:02 PM
chiras QUOTE (planetbeing @ Apr 5 2006, 12:05 PM... Apr 5 2006, 12:22 PM
planetbeing What version of the driver do you have? When did y... Apr 5 2006, 12:30 PM
chiras QUOTE (planetbeing @ Apr 5 2006, 12:33 PM... Apr 5 2006, 12:35 PM
chiras whomp there it is:
CODEpanic(cpu 0 caller 0x0... Apr 5 2006, 01:00 PM
planetbeing No problem. Thanks for bringing this to my attenti... Apr 5 2006, 02:50 PM
itmandan seems to be working 100% for me, straight from the... Apr 6 2006, 09:05 PM
ROELLE ****************
Got some major update!
Im ... Apr 7 2006, 05:32 PM
apfrost I have an ip and can connect to my router, but i c... Apr 7 2006, 06:52 PM
weBstalkeR It detects my card.. link and speed whatnot. Even ... Apr 9 2006, 06:23 AM
gfx QUOTE (planetbeing @ Mar 24 2006, 10:39 A... Apr 9 2006, 11:15 AM
XDark_FenixX thanks a bunch for getting my LAN to work, but as ... Apr 9 2006, 11:25 PM
planetbeing Sorry guys, but finals are coming around the corne... Apr 10 2006, 12:14 AM
weBstalkeR Oh man. I ran the forcedeth-nockd and now it works... Apr 10 2006, 12:51 AM
planetbeing weBstalkeR, note down the motherboard you have so ... Apr 10 2006, 01:00 AM
weBstalkeR My Motherboard is a DFI nF4 SLi-D
The nF4 LAN work... Apr 10 2006, 02:08 AM ![]() |
|
Lo-Fi Version | Time is now: 21st November 2009 - 12:22 PM |