diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-27 16:42:47 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-27 16:42:47 -0400 |
| commit | f1462147f15a954a1a0553390846c6fa3ca742b1 (patch) | |
| tree | c57ad5f209bd6bc735580172057153d60f0a4442 /drivers/net/ucc_geth.c | |
| parent | e00b95debb9a0f023b61abcd4b1e74f687276b47 (diff) | |
| parent | 6d7760a88c25057c2c2243e5dfe2d731064bd31d (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (45 commits)
cnic: Fix ISCSI_KEVENT_IF_DOWN message handling.
net: irda: init spinlock after memcpy
ixgbe: fix for 82599 errata marking UDP checksum errors
r8169: WakeOnLan fix for the 8168
netxen: reset ring consumer during cleanup
net/bridge: use kobject_put to release kobject in br_add_if error path
smc91x.h: add config for Nomadik evaluation kit
NET: ROSE: Don't use static buffer.
eepro: Read buffer overflow
tokenring: Read buffer overflow
at1700: Read buffer overflow
fealnx: Write outside array bounds
ixgbe: remove unnecessary call to device_init_wakeup
ixgbe: Don't priority tag control frames in DCB mode
ixgbe: Enable FCoE offload when DCB is enabled for 82599
net: Rework mdio-ofgpio driver to use of_mdio infrastructure
register at91_ether using platform_driver_probe
skge: Enable WoL by default if supported
net: KS8851 needs to depend on MII
be2net: Bug fix in the non-lro path. Size of received packet was not updated in statistics properly.
...
Diffstat (limited to 'drivers/net/ucc_geth.c')
| -rw-r--r-- | drivers/net/ucc_geth.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index 40c6eba775ce..3b957e6412ee 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c | |||
| @@ -1590,13 +1590,13 @@ static int init_phy(struct net_device *dev) | |||
| 1590 | priv->oldspeed = 0; | 1590 | priv->oldspeed = 0; |
| 1591 | priv->oldduplex = -1; | 1591 | priv->oldduplex = -1; |
| 1592 | 1592 | ||
| 1593 | if (!ug_info->phy_node) | ||
| 1594 | return 0; | ||
| 1595 | |||
| 1596 | phydev = of_phy_connect(dev, ug_info->phy_node, &adjust_link, 0, | 1593 | phydev = of_phy_connect(dev, ug_info->phy_node, &adjust_link, 0, |
| 1597 | priv->phy_interface); | 1594 | priv->phy_interface); |
| 1595 | if (!phydev) | ||
| 1596 | phydev = of_phy_connect_fixed_link(dev, &adjust_link, | ||
| 1597 | priv->phy_interface); | ||
| 1598 | if (!phydev) { | 1598 | if (!phydev) { |
| 1599 | printk("%s: Could not attach to PHY\n", dev->name); | 1599 | dev_err(&dev->dev, "Could not attach to PHY\n"); |
| 1600 | return -ENODEV; | 1600 | return -ENODEV; |
| 1601 | } | 1601 | } |
| 1602 | 1602 | ||
| @@ -3608,9 +3608,7 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma | |||
| 3608 | struct ucc_geth_private *ugeth = NULL; | 3608 | struct ucc_geth_private *ugeth = NULL; |
| 3609 | struct ucc_geth_info *ug_info; | 3609 | struct ucc_geth_info *ug_info; |
| 3610 | struct resource res; | 3610 | struct resource res; |
| 3611 | struct device_node *phy; | ||
| 3612 | int err, ucc_num, max_speed = 0; | 3611 | int err, ucc_num, max_speed = 0; |
| 3613 | const u32 *fixed_link; | ||
| 3614 | const unsigned int *prop; | 3612 | const unsigned int *prop; |
| 3615 | const char *sprop; | 3613 | const char *sprop; |
| 3616 | const void *mac_addr; | 3614 | const void *mac_addr; |
| @@ -3708,15 +3706,8 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma | |||
| 3708 | 3706 | ||
| 3709 | ug_info->uf_info.regs = res.start; | 3707 | ug_info->uf_info.regs = res.start; |
| 3710 | ug_info->uf_info.irq = irq_of_parse_and_map(np, 0); | 3708 | ug_info->uf_info.irq = irq_of_parse_and_map(np, 0); |
| 3711 | fixed_link = of_get_property(np, "fixed-link", NULL); | 3709 | |
| 3712 | if (fixed_link) { | 3710 | ug_info->phy_node = of_parse_phandle(np, "phy-handle", 0); |
| 3713 | phy = NULL; | ||
| 3714 | } else { | ||
| 3715 | phy = of_parse_phandle(np, "phy-handle", 0); | ||
| 3716 | if (phy == NULL) | ||
| 3717 | return -ENODEV; | ||
| 3718 | } | ||
| 3719 | ug_info->phy_node = phy; | ||
| 3720 | 3711 | ||
| 3721 | /* Find the TBI PHY node. If it's not there, we don't support SGMII */ | 3712 | /* Find the TBI PHY node. If it's not there, we don't support SGMII */ |
| 3722 | ug_info->tbi_node = of_parse_phandle(np, "tbi-handle", 0); | 3713 | ug_info->tbi_node = of_parse_phandle(np, "tbi-handle", 0); |
| @@ -3725,7 +3716,7 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma | |||
| 3725 | prop = of_get_property(np, "phy-connection-type", NULL); | 3716 | prop = of_get_property(np, "phy-connection-type", NULL); |
| 3726 | if (!prop) { | 3717 | if (!prop) { |
| 3727 | /* handle interface property present in old trees */ | 3718 | /* handle interface property present in old trees */ |
| 3728 | prop = of_get_property(phy, "interface", NULL); | 3719 | prop = of_get_property(ug_info->phy_node, "interface", NULL); |
| 3729 | if (prop != NULL) { | 3720 | if (prop != NULL) { |
| 3730 | phy_interface = enet_to_phy_interface[*prop]; | 3721 | phy_interface = enet_to_phy_interface[*prop]; |
| 3731 | max_speed = enet_to_speed[*prop]; | 3722 | max_speed = enet_to_speed[*prop]; |
