aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/nes
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/infiniband/hw/nes
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/infiniband/hw/nes')
-rw-r--r--drivers/infiniband/hw/nes/nes_hw.c5
-rw-r--r--drivers/infiniband/hw/nes/nes_hw.h1
-rw-r--r--drivers/infiniband/hw/nes/nes_nic.c59
3 files changed, 9 insertions, 56 deletions
diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c
index 10d0a5ec9add..96fa9a4cafdf 100644
--- a/drivers/infiniband/hw/nes/nes_hw.c
+++ b/drivers/infiniband/hw/nes/nes_hw.c
@@ -2885,9 +2885,8 @@ void nes_nic_ce_handler(struct nes_device *nesdev, struct nes_hw_nic_cq *cq)
2885 if ((cqe_errv & 2885 if ((cqe_errv &
2886 (NES_NIC_ERRV_BITS_IPV4_CSUM_ERR | NES_NIC_ERRV_BITS_TCPUDP_CSUM_ERR | 2886 (NES_NIC_ERRV_BITS_IPV4_CSUM_ERR | NES_NIC_ERRV_BITS_TCPUDP_CSUM_ERR |
2887 NES_NIC_ERRV_BITS_IPH_ERR | NES_NIC_ERRV_BITS_WQE_OVERRUN)) == 0) { 2887 NES_NIC_ERRV_BITS_IPH_ERR | NES_NIC_ERRV_BITS_WQE_OVERRUN)) == 0) {
2888 if (nesvnic->rx_checksum_disabled == 0) { 2888 if (nesvnic->netdev->features & NETIF_F_RXCSUM)
2889 rx_skb->ip_summed = CHECKSUM_UNNECESSARY; 2889 rx_skb->ip_summed = CHECKSUM_UNNECESSARY;
2890 }
2891 } else 2890 } else
2892 nes_debug(NES_DBG_CQ, "%s: unsuccessfully checksummed TCP or UDP packet." 2891 nes_debug(NES_DBG_CQ, "%s: unsuccessfully checksummed TCP or UDP packet."
2893 " errv = 0x%X, pkt_type = 0x%X.\n", 2892 " errv = 0x%X, pkt_type = 0x%X.\n",
@@ -2897,7 +2896,7 @@ void nes_nic_ce_handler(struct nes_device *nesdev, struct nes_hw_nic_cq *cq)
2897 if ((cqe_errv & 2896 if ((cqe_errv &
2898 (NES_NIC_ERRV_BITS_IPV4_CSUM_ERR | NES_NIC_ERRV_BITS_IPH_ERR | 2897 (NES_NIC_ERRV_BITS_IPV4_CSUM_ERR | NES_NIC_ERRV_BITS_IPH_ERR |
2899 NES_NIC_ERRV_BITS_WQE_OVERRUN)) == 0) { 2898 NES_NIC_ERRV_BITS_WQE_OVERRUN)) == 0) {
2900 if (nesvnic->rx_checksum_disabled == 0) { 2899 if (nesvnic->netdev->features & NETIF_F_RXCSUM) {
2901 rx_skb->ip_summed = CHECKSUM_UNNECESSARY; 2900 rx_skb->ip_summed = CHECKSUM_UNNECESSARY;
2902 /* nes_debug(NES_DBG_CQ, "%s: Reporting successfully checksummed IPv4 packet.\n", 2901 /* nes_debug(NES_DBG_CQ, "%s: Reporting successfully checksummed IPv4 packet.\n",
2903 nesvnic->netdev->name); */ 2902 nesvnic->netdev->name); */
diff --git a/drivers/infiniband/hw/nes/nes_hw.h b/drivers/infiniband/hw/nes/nes_hw.h
index d2abe07133a5..91594116f947 100644
--- a/drivers/infiniband/hw/nes/nes_hw.h
+++ b/drivers/infiniband/hw/nes/nes_hw.h
@@ -1245,7 +1245,6 @@ struct nes_vnic {
1245 u8 next_qp_nic_index; 1245 u8 next_qp_nic_index;
1246 u8 of_device_registered; 1246 u8 of_device_registered;
1247 u8 rdma_enabled; 1247 u8 rdma_enabled;
1248 u8 rx_checksum_disabled;
1249 u32 lro_max_aggr; 1248 u32 lro_max_aggr;
1250 struct net_lro_mgr lro_mgr; 1249 struct net_lro_mgr lro_mgr;
1251 struct net_lro_desc lro_desc[NES_MAX_LRO_DESCRIPTORS]; 1250 struct net_lro_desc lro_desc[NES_MAX_LRO_DESCRIPTORS];
diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c
index e96b8fb5d44c..d3a1c41cfd27 100644
--- a/drivers/infiniband/hw/nes/nes_nic.c
+++ b/drivers/infiniband/hw/nes/nes_nic.c
@@ -1093,34 +1093,6 @@ static const char nes_ethtool_stringset[][ETH_GSTRING_LEN] = {
1093}; 1093};
1094#define NES_ETHTOOL_STAT_COUNT ARRAY_SIZE(nes_ethtool_stringset) 1094#define NES_ETHTOOL_STAT_COUNT ARRAY_SIZE(nes_ethtool_stringset)
1095 1095
1096/**
1097 * nes_netdev_get_rx_csum
1098 */
1099static u32 nes_netdev_get_rx_csum (struct net_device *netdev)
1100{
1101 struct nes_vnic *nesvnic = netdev_priv(netdev);
1102
1103 if (nesvnic->rx_checksum_disabled)
1104 return 0;
1105 else
1106 return 1;
1107}
1108
1109
1110/**
1111 * nes_netdev_set_rc_csum
1112 */
1113static int nes_netdev_set_rx_csum(struct net_device *netdev, u32 enable)
1114{
1115 struct nes_vnic *nesvnic = netdev_priv(netdev);
1116
1117 if (enable)
1118 nesvnic->rx_checksum_disabled = 0;
1119 else
1120 nesvnic->rx_checksum_disabled = 1;
1121 return 0;
1122}
1123
1124 1096
1125/** 1097/**
1126 * nes_netdev_get_sset_count 1098 * nes_netdev_get_sset_count
@@ -1521,7 +1493,7 @@ static int nes_netdev_get_settings(struct net_device *netdev, struct ethtool_cmd
1521 et_cmd->maxrxpkt = 511; 1493 et_cmd->maxrxpkt = 511;
1522 1494
1523 if (nesadapter->OneG_Mode) { 1495 if (nesadapter->OneG_Mode) {
1524 et_cmd->speed = SPEED_1000; 1496 ethtool_cmd_speed_set(et_cmd, SPEED_1000);
1525 if (phy_type == NES_PHY_TYPE_PUMA_1G) { 1497 if (phy_type == NES_PHY_TYPE_PUMA_1G) {
1526 et_cmd->supported = SUPPORTED_1000baseT_Full; 1498 et_cmd->supported = SUPPORTED_1000baseT_Full;
1527 et_cmd->advertising = ADVERTISED_1000baseT_Full; 1499 et_cmd->advertising = ADVERTISED_1000baseT_Full;
@@ -1560,7 +1532,7 @@ static int nes_netdev_get_settings(struct net_device *netdev, struct ethtool_cmd
1560 et_cmd->advertising = ADVERTISED_10000baseT_Full; 1532 et_cmd->advertising = ADVERTISED_10000baseT_Full;
1561 et_cmd->phy_address = mac_index; 1533 et_cmd->phy_address = mac_index;
1562 } 1534 }
1563 et_cmd->speed = SPEED_10000; 1535 ethtool_cmd_speed_set(et_cmd, SPEED_10000);
1564 et_cmd->autoneg = AUTONEG_DISABLE; 1536 et_cmd->autoneg = AUTONEG_DISABLE;
1565 return 0; 1537 return 0;
1566} 1538}
@@ -1598,19 +1570,10 @@ static int nes_netdev_set_settings(struct net_device *netdev, struct ethtool_cmd
1598} 1570}
1599 1571
1600 1572
1601static int nes_netdev_set_flags(struct net_device *netdev, u32 flags)
1602{
1603 return ethtool_op_set_flags(netdev, flags, ETH_FLAG_LRO);
1604}
1605
1606
1607static const struct ethtool_ops nes_ethtool_ops = { 1573static const struct ethtool_ops nes_ethtool_ops = {
1608 .get_link = ethtool_op_get_link, 1574 .get_link = ethtool_op_get_link,
1609 .get_settings = nes_netdev_get_settings, 1575 .get_settings = nes_netdev_get_settings,
1610 .set_settings = nes_netdev_set_settings, 1576 .set_settings = nes_netdev_set_settings,
1611 .get_tx_csum = ethtool_op_get_tx_csum,
1612 .get_rx_csum = nes_netdev_get_rx_csum,
1613 .get_sg = ethtool_op_get_sg,
1614 .get_strings = nes_netdev_get_strings, 1577 .get_strings = nes_netdev_get_strings,
1615 .get_sset_count = nes_netdev_get_sset_count, 1578 .get_sset_count = nes_netdev_get_sset_count,
1616 .get_ethtool_stats = nes_netdev_get_ethtool_stats, 1579 .get_ethtool_stats = nes_netdev_get_ethtool_stats,
@@ -1619,13 +1582,6 @@ static const struct ethtool_ops nes_ethtool_ops = {
1619 .set_coalesce = nes_netdev_set_coalesce, 1582 .set_coalesce = nes_netdev_set_coalesce,
1620 .get_pauseparam = nes_netdev_get_pauseparam, 1583 .get_pauseparam = nes_netdev_get_pauseparam,
1621 .set_pauseparam = nes_netdev_set_pauseparam, 1584 .set_pauseparam = nes_netdev_set_pauseparam,
1622 .set_tx_csum = ethtool_op_set_tx_csum,
1623 .set_rx_csum = nes_netdev_set_rx_csum,
1624 .set_sg = ethtool_op_set_sg,
1625 .get_tso = ethtool_op_get_tso,
1626 .set_tso = ethtool_op_set_tso,
1627 .get_flags = ethtool_op_get_flags,
1628 .set_flags = nes_netdev_set_flags,
1629}; 1585};
1630 1586
1631 1587
@@ -1727,12 +1683,11 @@ struct net_device *nes_netdev_init(struct nes_device *nesdev,
1727 netdev->dev_addr[5] = (u8)u64temp; 1683 netdev->dev_addr[5] = (u8)u64temp;
1728 memcpy(netdev->perm_addr, netdev->dev_addr, 6); 1684 memcpy(netdev->perm_addr, netdev->dev_addr, 6);
1729 1685
1730 if ((nesvnic->logical_port < 2) || (nesdev->nesadapter->hw_rev != NE020_REV)) { 1686 netdev->hw_features = NETIF_F_RXCSUM | NETIF_F_SG | NETIF_F_IP_CSUM;
1731 netdev->features |= NETIF_F_TSO | NETIF_F_SG | NETIF_F_IP_CSUM; 1687 if ((nesvnic->logical_port < 2) || (nesdev->nesadapter->hw_rev != NE020_REV))
1732 netdev->features |= NETIF_F_GSO | NETIF_F_TSO | NETIF_F_SG | NETIF_F_IP_CSUM; 1688 netdev->hw_features |= NETIF_F_TSO;
1733 } else { 1689 netdev->features |= netdev->hw_features;
1734 netdev->features |= NETIF_F_SG | NETIF_F_IP_CSUM; 1690 netdev->hw_features |= NETIF_F_LRO;
1735 }
1736 1691
1737 nes_debug(NES_DBG_INIT, "nesvnic = %p, reported features = 0x%lX, QPid = %d," 1692 nes_debug(NES_DBG_INIT, "nesvnic = %p, reported features = 0x%lX, QPid = %d,"
1738 " nic_index = %d, logical_port = %d, mac_index = %d.\n", 1693 " nic_index = %d, logical_port = %d, mac_index = %d.\n",