1 Index: linux-2.6.21.7/drivers/net/ixp4xx/mac_driver.c
2 ===================================================================
3 --- linux-2.6.21.7.orig/drivers/net/ixp4xx/mac_driver.c
4 +++ linux-2.6.21.7/drivers/net/ixp4xx/mac_driver.c
5 @@ -161,6 +161,16 @@ static int media_check(struct net_device
7 struct mac_info *mac = netdev_priv(dev);
9 + if ( mac->mii.phy_id < 0 ) {
11 + netif_carrier_on(mac->mii.dev);
12 + mac->mii.full_duplex = 1;
13 + update_duplex_mode(dev);
19 if (mii_check_media(&mac->mii, netif_msg_link(mac), init)) {
20 update_duplex_mode(dev);
22 @@ -448,7 +458,12 @@ static int ixmac_ioctl(struct net_device
24 if (!try_module_get(THIS_MODULE))
26 - rc = generic_mii_ioctl(&mac->mii, if_mii(rq), cmd, &duplex_changed);
27 + if ( mac->mii.phy_id < 0 ) {
31 + rc = generic_mii_ioctl(&mac->mii, if_mii(rq), cmd, &duplex_changed);
33 module_put(THIS_MODULE);
35 update_duplex_mode(dev);
36 @@ -478,6 +493,9 @@ static void ixmac_get_drvinfo(struct net
37 static int ixmac_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
39 struct mac_info *mac = netdev_priv(dev);
40 + if ( mac->mii.phy_id < 0 ) {
43 mii_ethtool_gset(&mac->mii, cmd);
46 @@ -486,6 +504,9 @@ static int ixmac_set_settings(struct net
48 struct mac_info *mac = netdev_priv(dev);
50 + if ( mac->mii.phy_id < 0 ) {
53 rc = mii_ethtool_sset(&mac->mii, cmd);
56 @@ -493,12 +514,18 @@ static int ixmac_set_settings(struct net
57 static int ixmac_nway_reset(struct net_device *dev)
59 struct mac_info *mac = netdev_priv(dev);
60 + if ( mac->mii.phy_id < 0 ) {
63 return mii_nway_restart(&mac->mii);
66 static u32 ixmac_get_link(struct net_device *dev)
68 struct mac_info *mac = netdev_priv(dev);
69 + if ( mac->mii.phy_id < 0 ) {
72 return mii_link_ok(&mac->mii);