Jump to content

Discontinued


iNoob
 Share

155 posts in this topic

Recommended Posts

Add the following source code in order to get the "Network Link down" fixed for certain cards.

Some chipsets need the ledstatus included in the reset.

 

void com_nvidia_ethernet::saveLEDstats()
{
UInt32 reg=0;
UInt32 value=0;
int i=0;

reg = 22;
value = 3;
miiRW(phyAddr,reg,value);
IODelay(5);

reg = 16;
for(i=0;i<3;i++){
	led_stats[i]=miiRW(phyAddr,reg+i,MII_READ);	
}

reg = 22;
value = 0;
miiRW(phyAddr,reg,value);
IODelay(5);
}

void com_nvidia_ethernet::restoreLEDstats()
{

UInt32 reg=0;
UInt32 value=0;
int i=0;

reg = 22;
value = 3;
miiRW(phyAddr,reg,value);
IODelay(5);

reg = 16;
for(i=0;i<3;i++){
	miiRW(phyAddr,reg+i,led_stats[i]);	
	IODelay(1);
}

reg = 22;
value = 0;
miiRW(phyAddr,reg,value);
IODelay(5);
}

bool com_nvidia_ethernet::phyReset(UInt32 bmcr_setup) {
UInt32 miiControl;
unsigned int tries = 0;

saveLEDstats();
miiControl = BMCR_RESET | bmcr_setup;

if( miiRW(phyAddr, MII_BMCR, miiControl) ) {
	return false;
}

IOSleep(500);

while( miiControl & BMCR_RESET ) {
	IOSleep(10);
	miiControl = miiRW(phyAddr, MII_BMCR, MII_READ);

	if (tries++ > 100)
		return false;
}
restoreLEDstats();	

return true;
}

 

Of course update your header file with the two new ledstatus methods and change the PhyReset method to accept a new parameter.

You also will have to add the correct parameters to the reset call in the source file:

 

miiControl = miiRW(phyAddr, MII_BMCR, MII_READ);
miiControl |= BMCR_ANENABLE;

// reset the phy
if( !phyReset(miiControl) ){
	IOLog("ForceDet: PHY reset failed.\n");
	return PHY_ERROR;
}

 

Even is this is done you will still experience freezing, see my post a few back. But you will get the 88E1116 PHY and lot of others working. Follow the installation instructions in MikeInNs post (switching of computer for 30 secs etc), in order to get a valid link.

 

And please, no GPL licenses were viololated by MikeInNs, I can tell you a whole lot about licensing after working years for Microsoft.

Link to comment
Share on other sites

Add the following source code in order to get the "Network Link down" fixed for certain cards.

Some chipsets need the ledstatus included in the reset.

 

void com_nvidia_ethernet::saveLEDstats()
{
 UInt32 reg=0;
 UInt32 value=0;
 int i=0;

 reg = 22;
 value = 3;
 miiRW(phyAddr,reg,value);
 IODelay(5);

 reg = 16;
 for(i=0;i<3;i++){
	 led_stats[i]=miiRW(phyAddr,reg+i,MII_READ);	
 }

 reg = 22;
 value = 0;
 miiRW(phyAddr,reg,value);
 IODelay(5);
}

void com_nvidia_ethernet::restoreLEDstats()
{

 UInt32 reg=0;
 UInt32 value=0;
 int i=0;

 reg = 22;
 value = 3;
 miiRW(phyAddr,reg,value);
 IODelay(5);

 reg = 16;
 for(i=0;i<3;i++){
	 miiRW(phyAddr,reg+i,led_stats[i]);	
	 IODelay(1);
 }

 reg = 22;
 value = 0;
 miiRW(phyAddr,reg,value);
 IODelay(5);
}

bool com_nvidia_ethernet::phyReset(UInt32 bmcr_setup) {
 UInt32 miiControl;
 unsigned int tries = 0;

 saveLEDstats();
 miiControl = BMCR_RESET | bmcr_setup;

 if( miiRW(phyAddr, MII_BMCR, miiControl) ) {
	 return false;
 }

 IOSleep(500);

 while( miiControl & BMCR_RESET ) {
	 IOSleep(10);
	 miiControl = miiRW(phyAddr, MII_BMCR, MII_READ);

	 if (tries++ > 100)
		 return false;
 }
 restoreLEDstats();	

 return true;
}

 

Of course update your header file with the two new ledstatus methods and change the PhyReset method to accept a new parameter.

You also will have to add the correct parameters to the reset call in the source file:

 

miiControl = miiRW(phyAddr, MII_BMCR, MII_READ);
 miiControl |= BMCR_ANENABLE;

 // reset the phy
 if( !phyReset(miiControl) ){
	 IOLog("ForceDet: PHY reset failed.\n");
	 return PHY_ERROR;
 }

 

Even is this is done you will still experience freezing, see my post a few back. But you will get the 88E1116 PHY and lot of others working. Follow the installation instructions in MikeInNs post (switching of computer for 30 secs etc), in order to get a valid link.

 

And please, no GPL licenses were viololated by MikeInNs, I can tell you a whole lot about licensing after working years for Microsoft.

 

Can you or someone make these changes and post the compiled kext here? I don't know how to compile the source and most like will just make a mistake. :wacko:

Link to comment
Share on other sites

Duvel300: Where should I put that code inside forcedeth.cpp? If I put it after the end Xcode gives errors on build. The same for forcedeth.h. And I know where should them go. 1st goes to forcedeth.cpp, and 2nd to forcedeth.h. Right?

Link to comment
Share on other sites

@planetbeing: Your new code didn't work on my machine with 88E1116 PHY, and I could not find where I should put the additional code by Duvel300. I mean, if I put them at the end of the files Xcode will give me errors. Well, see post #82, as it may seem redundant :thumbsup_anim:

Quick Edit: Well, good work on this driver anyway. I must say that we must find a way to correctly reset the PHY, because when I load this driver I get a "Network link down". I will unplug the power for 30secs and edit this post.

Post-unplug Edit: Still no go. I will revert to my old driver tomorrow, as I am too lazy to use kext helper. I hate mondays, you just want to do like a sunday, sleep all day long :P

Link to comment
Share on other sites

tested the your driver on my p5n32-e sli but still crashes.

 

just wondering, do i have to uninstall my previous driver (nForceEthernetController.kext) before using this one? and if so, does anyone know how to do it?

 

last thing, i have to reinstall the drivers everytime i boot back to windows. is there a way around this? Thanks!

Link to comment
Share on other sites

i got the same result, AMD 64 X2 5200+ with ASUS M2N32 SLI Deluxe Vista Edition (590 nforce). 2 cpus panics after x amount of traffic while 1 cpus runs stable.

 

But honestly i would like to utilize my dual cores.

 

BTW thanks for getting this far.

Link to comment
Share on other sites

Hey, I am really new at this. I have the ASUS M2N-SLI Deluxe motherboard with the Marvell 88E1116 network controller. Is there somewhere or someone that can tell me how to install the files onto my computer? Any help would be greatly appreciated. Thanks!

Link to comment
Share on other sites

...download the kext...

http://forum.insanelymac.com/index.php?s=&...st&p=638200

 

install it with kexthelper...

http://www.cheetha.net/Kext_Helper/Software.html

 

shutdown...

unplug your LAN cabel for 30 secs or so...

reboot...

 

...i have the same mobo, it wont run stable atm, you can add "cpus=1" at bootloader it should run better...

Link to comment
Share on other sites

im just wondering, does Intel CPU with nForce Ethernet Controller be able to download large files using both cores? Cause i have AMD CPU with nForce Ethernet Controller but panics when utilising both cores when downloading large files. I was just wondering if it was the way Intel and AMD handles multiple cores? If so, might need 2 separate kexts. By the looks of it the driver works fairly well on cpus=1 but cant see why it would panic as soon as both cores are used.

 

But it could be my inexperience with mac and its mechanics.

Link to comment
Share on other sites

Duvel300: Where should I put that code inside forcedeth.cpp? If I put it after the end Xcode gives errors on build. The same for forcedeth.h. And I know where should them go. 1st goes to forcedeth.cpp, and 2nd to forcedeth.h. Right?

 

iNoob, send me your source code, I will add it in for you. It might take a while before you get it back as I am busy with other things right now.

Link to comment
Share on other sites

Hey thanks for the help. It can finally detect my network controllers, but now I have ran into another problem. It says that it's connected, but it says "Self-Assinged IP" and it doesn't work when I try to connect to a website. Has anyone experienced this problem? Thanks

Link to comment
Share on other sites

 Share

×
×
  • Create New...