backport r23862
[openwrt-10.03/.git] / target / linux / generic-2.6 / files / drivers / net / phy / mvswitch.c
index 3ae8899c2a65f018cfc642dd4679893f728e819a..f3a9c74e3d92657a14c410aba848b385402bd1ad 100644 (file)
@@ -247,7 +247,7 @@ mvswitch_config_init(struct phy_device *pdev)
        pdev->supported = ADVERTISED_100baseT_Full;
        pdev->advertising = ADVERTISED_100baseT_Full;
        dev->phy_ptr = priv;
-       dev->irq = PHY_POLL;
+       pdev->irq = PHY_POLL;
 #ifdef HEADER_MODE
        dev->flags |= IFF_PROMISC;
 #endif
@@ -366,7 +366,7 @@ mvswitch_read_status(struct phy_device *pdev)
 {
        pdev->speed = SPEED_100;
        pdev->duplex = DUPLEX_FULL;
-       pdev->state = PHY_UP;
+       pdev->link = 1;
 
        /* XXX ugly workaround: we can't force the switch
         * to gracefully handle hosts moving from one port to another,