bcm47xx: Fix warning
[openwrt.git] / target / linux / ixp4xx / patches-2.6.23 / 202-npe_driver_no_phy.patch
1 diff -Nur linux-2.6.23.16/drivers/net/arm/ixp4xx_eth.c linux-2.6.23.16-owrt/drivers/net/arm/ixp4xx_eth.c
2 --- linux-2.6.23.16/drivers/net/arm/ixp4xx_eth.c 2008-02-15 18:18:02.000000000 +0100
3 +++ linux-2.6.23.16-owrt/drivers/net/arm/ixp4xx_eth.c 2008-02-18 12:14:42.000000000 +0100
4 @@ -297,6 +297,27 @@
5 unsigned long flags;
6 u16 val;
7
8 + /* For boards that use a switch chip (eg. Marvell 88E6060) */
9 + if ( phy_id < 0 || phy_id > 31 ) {
10 + switch (location) {
11 + case MII_BMCR:
12 + val = 0x3100;
13 + break;
14 + case MII_BMSR:
15 + val = 0x406d;
16 + break;
17 + case MII_ADVERTISE:
18 + val = 0x0101;
19 + break;
20 + case MII_LPA:
21 + val = 0x4101;
22 + break;
23 + default:
24 + val = 0;
25 + break;
26 + }
27 + return val;
28 + }
29 spin_lock_irqsave(&mdio_lock, flags);
30 val = mdio_cmd(dev, phy_id, location, 0, 0);
31 spin_unlock_irqrestore(&mdio_lock, flags);
32 @@ -308,6 +329,9 @@
33 {
34 unsigned long flags;
35
36 + if ( phy_id < 0 || phy_id > 31 ) {
37 + return;
38 + }
39 spin_lock_irqsave(&mdio_lock, flags);
40 mdio_cmd(dev, phy_id, location, 1, val);
41 spin_unlock_irqrestore(&mdio_lock, flags);
This page took 0.037972 seconds and 5 git commands to generate.