aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sunhme.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-05-20 16:43:21 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-20 16:43:21 -0400
commit06f4e926d256d902dd9a53dcb400fd74974ce087 (patch)
tree0b438b67f5f0eff6fd617bc497a9dace6164a488 /drivers/net/sunhme.c
parent8e7bfcbab3825d1b404d615cb1b54f44ff81f981 (diff)
parentd93515611bbc70c2fe4db232e5feb448ed8e4cc9 (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: (1446 commits) macvlan: fix panic if lowerdev in a bond tg3: Add braces around 5906 workaround. tg3: Fix NETIF_F_LOOPBACK error macvlan: remove one synchronize_rcu() call networking: NET_CLS_ROUTE4 depends on INET irda: Fix error propagation in ircomm_lmp_connect_response() irda: Kill set but unused variable 'bytes' in irlan_check_command_param() irda: Kill set but unused variable 'clen' in ircomm_connect_indication() rxrpc: Fix set but unused variable 'usage' in rxrpc_get_transport() be2net: Kill set but unused variable 'req' in lancer_fw_download() irda: Kill set but unused vars 'saddr' and 'daddr' in irlan_provider_connect_indication() atl1c: atl1c_resume() is only used when CONFIG_PM_SLEEP is defined. rxrpc: Fix set but unused variable 'usage' in rxrpc_get_peer(). rxrpc: Kill set but unused variable 'local' in rxrpc_UDP_error_handler() rxrpc: Kill set but unused variable 'sp' in rxrpc_process_connection() rxrpc: Kill set but unused variable 'sp' in rxrpc_rotate_tx_window() pkt_sched: Kill set but unused variable 'protocol' in tc_classify() isdn: capi: Use pr_debug() instead of ifdefs. tg3: Update version to 3.119 tg3: Apply rx_discards fix to 5719/5720 ... Fix up trivial conflicts in arch/x86/Kconfig and net/mac80211/agg-tx.c as per Davem.
Diffstat (limited to 'drivers/net/sunhme.c')
-rw-r--r--drivers/net/sunhme.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c
index bff2f7999ff0..30aad54b1b3a 100644
--- a/drivers/net/sunhme.c
+++ b/drivers/net/sunhme.c
@@ -1383,7 +1383,7 @@ force_link:
1383 if (ep == NULL || ep->autoneg == AUTONEG_ENABLE) { 1383 if (ep == NULL || ep->autoneg == AUTONEG_ENABLE) {
1384 hp->sw_bmcr = BMCR_SPEED100; 1384 hp->sw_bmcr = BMCR_SPEED100;
1385 } else { 1385 } else {
1386 if (ep->speed == SPEED_100) 1386 if (ethtool_cmd_speed(ep) == SPEED_100)
1387 hp->sw_bmcr = BMCR_SPEED100; 1387 hp->sw_bmcr = BMCR_SPEED100;
1388 else 1388 else
1389 hp->sw_bmcr = 0; 1389 hp->sw_bmcr = 0;
@@ -2401,6 +2401,7 @@ static void happy_meal_set_multicast(struct net_device *dev)
2401static int hme_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) 2401static int hme_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
2402{ 2402{
2403 struct happy_meal *hp = netdev_priv(dev); 2403 struct happy_meal *hp = netdev_priv(dev);
2404 u32 speed;
2404 2405
2405 cmd->supported = 2406 cmd->supported =
2406 (SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full | 2407 (SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full |
@@ -2420,10 +2421,9 @@ static int hme_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
2420 2421
2421 if (hp->sw_bmcr & BMCR_ANENABLE) { 2422 if (hp->sw_bmcr & BMCR_ANENABLE) {
2422 cmd->autoneg = AUTONEG_ENABLE; 2423 cmd->autoneg = AUTONEG_ENABLE;
2423 cmd->speed = 2424 speed = ((hp->sw_lpa & (LPA_100HALF | LPA_100FULL)) ?
2424 (hp->sw_lpa & (LPA_100HALF | LPA_100FULL)) ? 2425 SPEED_100 : SPEED_10);
2425 SPEED_100 : SPEED_10; 2426 if (speed == SPEED_100)
2426 if (cmd->speed == SPEED_100)
2427 cmd->duplex = 2427 cmd->duplex =
2428 (hp->sw_lpa & (LPA_100FULL)) ? 2428 (hp->sw_lpa & (LPA_100FULL)) ?
2429 DUPLEX_FULL : DUPLEX_HALF; 2429 DUPLEX_FULL : DUPLEX_HALF;
@@ -2433,13 +2433,12 @@ static int hme_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
2433 DUPLEX_FULL : DUPLEX_HALF; 2433 DUPLEX_FULL : DUPLEX_HALF;
2434 } else { 2434 } else {
2435 cmd->autoneg = AUTONEG_DISABLE; 2435 cmd->autoneg = AUTONEG_DISABLE;
2436 cmd->speed = 2436 speed = (hp->sw_bmcr & BMCR_SPEED100) ? SPEED_100 : SPEED_10;
2437 (hp->sw_bmcr & BMCR_SPEED100) ?
2438 SPEED_100 : SPEED_10;
2439 cmd->duplex = 2437 cmd->duplex =
2440 (hp->sw_bmcr & BMCR_FULLDPLX) ? 2438 (hp->sw_bmcr & BMCR_FULLDPLX) ?
2441 DUPLEX_FULL : DUPLEX_HALF; 2439 DUPLEX_FULL : DUPLEX_HALF;
2442 } 2440 }
2441 ethtool_cmd_speed_set(cmd, speed);
2443 return 0; 2442 return 0;
2444} 2443}
2445 2444
@@ -2452,8 +2451,8 @@ static int hme_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
2452 cmd->autoneg != AUTONEG_DISABLE) 2451 cmd->autoneg != AUTONEG_DISABLE)
2453 return -EINVAL; 2452 return -EINVAL;
2454 if (cmd->autoneg == AUTONEG_DISABLE && 2453 if (cmd->autoneg == AUTONEG_DISABLE &&
2455 ((cmd->speed != SPEED_100 && 2454 ((ethtool_cmd_speed(cmd) != SPEED_100 &&
2456 cmd->speed != SPEED_10) || 2455 ethtool_cmd_speed(cmd) != SPEED_10) ||
2457 (cmd->duplex != DUPLEX_HALF && 2456 (cmd->duplex != DUPLEX_HALF &&
2458 cmd->duplex != DUPLEX_FULL))) 2457 cmd->duplex != DUPLEX_FULL)))
2459 return -EINVAL; 2458 return -EINVAL;
@@ -2788,7 +2787,8 @@ static int __devinit happy_meal_sbus_probe_one(struct platform_device *op, int i
2788 dev->ethtool_ops = &hme_ethtool_ops; 2787 dev->ethtool_ops = &hme_ethtool_ops;
2789 2788
2790 /* Happy Meal can do it all... */ 2789 /* Happy Meal can do it all... */
2791 dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM; 2790 dev->hw_features = NETIF_F_SG | NETIF_F_HW_CSUM;
2791 dev->features |= dev->hw_features | NETIF_F_RXCSUM;
2792 2792
2793 dev->irq = op->archdata.irqs[0]; 2793 dev->irq = op->archdata.irqs[0];
2794 2794
@@ -3113,7 +3113,8 @@ static int __devinit happy_meal_pci_probe(struct pci_dev *pdev,
3113 dev->dma = 0; 3113 dev->dma = 0;
3114 3114
3115 /* Happy Meal can do it all... */ 3115 /* Happy Meal can do it all... */
3116 dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM; 3116 dev->hw_features = NETIF_F_SG | NETIF_F_HW_CSUM;
3117 dev->features |= dev->hw_features | NETIF_F_RXCSUM;
3117 3118
3118#if defined(CONFIG_SBUS) && defined(CONFIG_PCI) 3119#if defined(CONFIG_SBUS) && defined(CONFIG_PCI)
3119 /* Hook up PCI register/descriptor accessors. */ 3120 /* Hook up PCI register/descriptor accessors. */