]> git.vomp.tv Git - makedevenv.git/blob - kernel/otherpatches/fullduplex.patch
Initial import
[makedevenv.git] / kernel / otherpatches / fullduplex.patch
1 diff -Narup kernel/drivers/net/smc91111.c dev/mvpdist/kernel/drivers/net/smc91111.c
2 --- kernel/drivers/net/smc91111.c       2003-11-13 23:14:34.000000000 +0100
3 +++ kernel/drivers/net/smc91111.c       2006-11-27 02:22:29.000000000 +0100
4 @@ -1400,7 +1400,7 @@ static int smc_open(struct net_device *d
5         lp->ctl_ephloop = 0;
6         lp->ctl_miiop = 0;
7         lp->ctl_autoneg = 1;    //1
8 -       lp->ctl_rfduplx = 0;    //Haup=> negotiate for HALF?
9 +       lp->ctl_rfduplx = 1;    //1
10         lp->ctl_rspeed = 100;   //100
11         lp->ctl_afduplx = 0;    //1
12         lp->ctl_aspeed = 100;   //100
13 @@ -3742,5 +3742,25 @@ static void smc_phy_interrupt(struct net
14  #endif
15                 // Update the last phy 18 variable
16                 lp->lastPhy18 = phy18;
17 +               
18 +               // if Fullduplex and 100MBit detected we set swfdup
19 +               if (lp->lastPhy18 & PHY_INT_DPLXDET &&
20 +                                       lp->lastPhy18 & PHY_INT_SPDDET)
21 +               {
22 +                       if (!(lp->tcr_cur_mode & TCR_SWFDUP))
23 +                       {
24 +                               PRINTK2 ("SMC91111 detect 100MBit Full Duplex.. enable swfdup\n");
25 +                               lp->tcr_cur_mode |= TCR_SWFDUP;
26 +                               lp->ctl_swfdup = 1;
27 +                               smc_modify_regbit (0, ioaddr, TCR_REG, TCR_SWFDUP, 1);
28 +                       }
29 +               }
30 +               else if (lp->tcr_cur_mode & TCR_SWFDUP)
31 +               {
32 +                       PRINTK2 ("SMC91111 no 100MBit Full Duplex detected.. disable swfdup\n");
33 +                       lp->tcr_cur_mode &= ~TCR_SWFDUP;
34 +                       lp->ctl_swfdup = 0;
35 +                       smc_modify_regbit (0, ioaddr, TCR_REG, TCR_SWFDUP, 0);
36 +               }
37         }
38  }