diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-02 10:55:08 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-02 10:55:08 -0500 |
commit | 6d6b89bd2e316b78d668f761d380837b81fa71ef (patch) | |
tree | 7e63c58611fc6181153526abbdafdd846ed1a19d /drivers/net/ucc_geth.c | |
parent | 13dda80e48439b446d0bc9bab34b91484bc8f533 (diff) | |
parent | 2507c05ff55fbf38326b08ed27eaed233bc75042 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1341 commits)
virtio_net: remove forgotten assignment
be2net: fix tx completion polling
sis190: fix cable detect via link status poll
net: fix protocol sk_buff field
bridge: Fix build error when IGMP_SNOOPING is not enabled
bnx2x: Tx barriers and locks
scm: Only support SCM_RIGHTS on unix domain sockets.
vhost-net: restart tx poll on sk_sndbuf full
vhost: fix get_user_pages_fast error handling
vhost: initialize log eventfd context pointer
vhost: logging thinko fix
wireless: convert to use netdev_for_each_mc_addr
ethtool: do not set some flags, if others failed
ipoib: returned back addrlen check for mc addresses
netlink: Adding inode field to /proc/net/netlink
axnet_cs: add new id
bridge: Make IGMP snooping depend upon BRIDGE.
bridge: Add multicast count/interval sysfs entries
bridge: Add hash elasticity/max sysfs entries
bridge: Add multicast_snooping sysfs toggle
...
Trivial conflicts in Documentation/feature-removal-schedule.txt
Diffstat (limited to 'drivers/net/ucc_geth.c')
-rw-r--r-- | drivers/net/ucc_geth.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index eb8fe7e16c6c..23a97518bc1f 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <asm/qe.h> | 37 | #include <asm/qe.h> |
38 | #include <asm/ucc.h> | 38 | #include <asm/ucc.h> |
39 | #include <asm/ucc_fast.h> | 39 | #include <asm/ucc_fast.h> |
40 | #include <asm/machdep.h> | ||
40 | 41 | ||
41 | #include "ucc_geth.h" | 42 | #include "ucc_geth.h" |
42 | #include "fsl_pq_mdio.h" | 43 | #include "fsl_pq_mdio.h" |
@@ -1334,7 +1335,7 @@ static int adjust_enet_interface(struct ucc_geth_private *ugeth) | |||
1334 | struct ucc_geth __iomem *ug_regs; | 1335 | struct ucc_geth __iomem *ug_regs; |
1335 | struct ucc_fast __iomem *uf_regs; | 1336 | struct ucc_fast __iomem *uf_regs; |
1336 | int ret_val; | 1337 | int ret_val; |
1337 | u32 upsmr, maccfg2, tbiBaseAddress; | 1338 | u32 upsmr, maccfg2; |
1338 | u16 value; | 1339 | u16 value; |
1339 | 1340 | ||
1340 | ugeth_vdbg("%s: IN", __func__); | 1341 | ugeth_vdbg("%s: IN", __func__); |
@@ -1389,14 +1390,20 @@ static int adjust_enet_interface(struct ucc_geth_private *ugeth) | |||
1389 | /* Note that this depends on proper setting in utbipar register. */ | 1390 | /* Note that this depends on proper setting in utbipar register. */ |
1390 | if ((ugeth->phy_interface == PHY_INTERFACE_MODE_TBI) || | 1391 | if ((ugeth->phy_interface == PHY_INTERFACE_MODE_TBI) || |
1391 | (ugeth->phy_interface == PHY_INTERFACE_MODE_RTBI)) { | 1392 | (ugeth->phy_interface == PHY_INTERFACE_MODE_RTBI)) { |
1392 | tbiBaseAddress = in_be32(&ug_regs->utbipar); | 1393 | struct ucc_geth_info *ug_info = ugeth->ug_info; |
1393 | tbiBaseAddress &= UTBIPAR_PHY_ADDRESS_MASK; | 1394 | struct phy_device *tbiphy; |
1394 | tbiBaseAddress >>= UTBIPAR_PHY_ADDRESS_SHIFT; | 1395 | |
1395 | value = ugeth->phydev->bus->read(ugeth->phydev->bus, | 1396 | if (!ug_info->tbi_node) |
1396 | (u8) tbiBaseAddress, ENET_TBI_MII_CR); | 1397 | ugeth_warn("TBI mode requires that the device " |
1398 | "tree specify a tbi-handle\n"); | ||
1399 | |||
1400 | tbiphy = of_phy_find_device(ug_info->tbi_node); | ||
1401 | if (!tbiphy) | ||
1402 | ugeth_warn("Could not get TBI device\n"); | ||
1403 | |||
1404 | value = phy_read(tbiphy, ENET_TBI_MII_CR); | ||
1397 | value &= ~0x1000; /* Turn off autonegotiation */ | 1405 | value &= ~0x1000; /* Turn off autonegotiation */ |
1398 | ugeth->phydev->bus->write(ugeth->phydev->bus, | 1406 | phy_write(tbiphy, ENET_TBI_MII_CR, value); |
1399 | (u8) tbiBaseAddress, ENET_TBI_MII_CR, value); | ||
1400 | } | 1407 | } |
1401 | 1408 | ||
1402 | init_check_frame_length_mode(ug_info->lengthCheckRx, &ug_regs->maccfg2); | 1409 | init_check_frame_length_mode(ug_info->lengthCheckRx, &ug_regs->maccfg2); |
@@ -1995,7 +2002,6 @@ static void ucc_geth_set_multi(struct net_device *dev) | |||
1995 | struct dev_mc_list *dmi; | 2002 | struct dev_mc_list *dmi; |
1996 | struct ucc_fast __iomem *uf_regs; | 2003 | struct ucc_fast __iomem *uf_regs; |
1997 | struct ucc_geth_82xx_address_filtering_pram __iomem *p_82xx_addr_filt; | 2004 | struct ucc_geth_82xx_address_filtering_pram __iomem *p_82xx_addr_filt; |
1998 | int i; | ||
1999 | 2005 | ||
2000 | ugeth = netdev_priv(dev); | 2006 | ugeth = netdev_priv(dev); |
2001 | 2007 | ||
@@ -2022,10 +2028,7 @@ static void ucc_geth_set_multi(struct net_device *dev) | |||
2022 | out_be32(&p_82xx_addr_filt->gaddr_h, 0x0); | 2028 | out_be32(&p_82xx_addr_filt->gaddr_h, 0x0); |
2023 | out_be32(&p_82xx_addr_filt->gaddr_l, 0x0); | 2029 | out_be32(&p_82xx_addr_filt->gaddr_l, 0x0); |
2024 | 2030 | ||
2025 | dmi = dev->mc_list; | 2031 | netdev_for_each_mc_addr(dmi, dev) { |
2026 | |||
2027 | for (i = 0; i < dev->mc_count; i++, dmi = dmi->next) { | ||
2028 | |||
2029 | /* Only support group multicast for now. | 2032 | /* Only support group multicast for now. |
2030 | */ | 2033 | */ |
2031 | if (!(dmi->dmi_addr[0] & 1)) | 2034 | if (!(dmi->dmi_addr[0] & 1)) |