[linux-cirrus] Re: EP93XX Ethernet autonegotiation hangs till link is up

  • From: Simon Poole <simon.armlinux@xxxxxxxxxxxxx>
  • To: linux-cirrus@xxxxxxxxxxxxx
  • Date: Mon, 11 Jul 2005 13:46:17 +0100

Eric BENARD / Free wrote:

Michael Burian wrote:
...snip...
Any ideas what should be done instead of while(1)?


hi,

I met the same problem and added a timeout like this :

Cirrus fixed this bug when they made the switch from 2.4.19 to 2.4.21. Their code currently (cirrus-1.4.2) reads:


   U16 count=0;

   while (1) {
     val = phy_rd(1); /* read BM status Reg*/
     if ( val&0x0020) /* if Auto_Neg_complete?*/
     {
       break;
     }
     else {
       if (count >= 3)
       {
         return -1;
       }
       mdelay(1000);//delay 1 second.
       count++;
     }
   }


-- Simon Poole www.appliancestudio.com


Other related posts: