aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-05-12 12:48:25 -0400
committerDavid S. Miller <davem@davemloft.net>2014-05-12 12:48:25 -0400
commit51ee42efa0829cf9e46f8e1c0ab7a9ab6facf3f2 (patch)
treebcc258b6661912df8b75a6e6077114dfc7b4e41c /drivers
parent163cd4e817a4444e348ca577cb74c71d245f0c72 (diff)
parentc3136f5540b62f7a0ada3cbbd7345889a4879f23 (diff)
Merge branch 'cxgb4'
Hariprasad Shenai says: ==================== Misc. fixes for cxgb4 and cxgb4vf driver This series of patch provides fixes for cxgb4 and cxgb4vf driver related to rx checksum counter and decodes module type a bit more for ethtool output. The patches series is created against David Miller's 'net-next' tree. We would like to request this patch series to get merged via David Miller's 'net-next' tree. We have included all the maintainers of respective drivers. Kindly review the change and let us know in case of any review comments. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c15
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/sge.c6
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4vf/sge.c7
3 files changed, 18 insertions, 10 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index 6fe58913403a..bf5eb3310b0e 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -2252,12 +2252,19 @@ static int get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
2252 else if (p->port_type == FW_PORT_TYPE_FIBER_XFI || 2252 else if (p->port_type == FW_PORT_TYPE_FIBER_XFI ||
2253 p->port_type == FW_PORT_TYPE_FIBER_XAUI) 2253 p->port_type == FW_PORT_TYPE_FIBER_XAUI)
2254 cmd->port = PORT_FIBRE; 2254 cmd->port = PORT_FIBRE;
2255 else if (p->port_type == FW_PORT_TYPE_SFP) { 2255 else if (p->port_type == FW_PORT_TYPE_SFP ||
2256 if (p->mod_type == FW_PORT_MOD_TYPE_TWINAX_PASSIVE || 2256 p->port_type == FW_PORT_TYPE_QSFP_10G ||
2257 p->mod_type == FW_PORT_MOD_TYPE_TWINAX_ACTIVE) 2257 p->port_type == FW_PORT_TYPE_QSFP) {
2258 if (p->mod_type == FW_PORT_MOD_TYPE_LR ||
2259 p->mod_type == FW_PORT_MOD_TYPE_SR ||
2260 p->mod_type == FW_PORT_MOD_TYPE_ER ||
2261 p->mod_type == FW_PORT_MOD_TYPE_LRM)
2262 cmd->port = PORT_FIBRE;
2263 else if (p->mod_type == FW_PORT_MOD_TYPE_TWINAX_PASSIVE ||
2264 p->mod_type == FW_PORT_MOD_TYPE_TWINAX_ACTIVE)
2258 cmd->port = PORT_DA; 2265 cmd->port = PORT_DA;
2259 else 2266 else
2260 cmd->port = PORT_FIBRE; 2267 cmd->port = PORT_OTHER;
2261 } else 2268 } else
2262 cmd->port = PORT_OTHER; 2269 cmd->port = PORT_OTHER;
2263 2270
diff --git a/drivers/net/ethernet/chelsio/cxgb4/sge.c b/drivers/net/ethernet/chelsio/cxgb4/sge.c
index ca95cf2954eb..cced1a3d5181 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/sge.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/sge.c
@@ -1697,7 +1697,8 @@ int t4_ethrx_handler(struct sge_rspq *q, const __be64 *rsp,
1697 return handle_trace_pkt(q->adap, si); 1697 return handle_trace_pkt(q->adap, si);
1698 1698
1699 pkt = (const struct cpl_rx_pkt *)rsp; 1699 pkt = (const struct cpl_rx_pkt *)rsp;
1700 csum_ok = pkt->csum_calc && !pkt->err_vec; 1700 csum_ok = pkt->csum_calc && !pkt->err_vec &&
1701 (q->netdev->features & NETIF_F_RXCSUM);
1701 if ((pkt->l2info & htonl(RXF_TCP)) && 1702 if ((pkt->l2info & htonl(RXF_TCP)) &&
1702 (q->netdev->features & NETIF_F_GRO) && csum_ok && !pkt->ip_frag) { 1703 (q->netdev->features & NETIF_F_GRO) && csum_ok && !pkt->ip_frag) {
1703 do_gro(rxq, si, pkt); 1704 do_gro(rxq, si, pkt);
@@ -1720,8 +1721,7 @@ int t4_ethrx_handler(struct sge_rspq *q, const __be64 *rsp,
1720 1721
1721 rxq->stats.pkts++; 1722 rxq->stats.pkts++;
1722 1723
1723 if (csum_ok && (q->netdev->features & NETIF_F_RXCSUM) && 1724 if (csum_ok && (pkt->l2info & htonl(RXF_UDP | RXF_TCP))) {
1724 (pkt->l2info & htonl(RXF_UDP | RXF_TCP))) {
1725 if (!pkt->ip_frag) { 1725 if (!pkt->ip_frag) {
1726 skb->ip_summed = CHECKSUM_UNNECESSARY; 1726 skb->ip_summed = CHECKSUM_UNNECESSARY;
1727 rxq->stats.rx_cso++; 1727 rxq->stats.rx_cso++;
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/sge.c b/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
index 9cfa4b4bb089..adebbf849cdb 100644
--- a/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
+++ b/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
@@ -1510,7 +1510,8 @@ int t4vf_ethrx_handler(struct sge_rspq *rspq, const __be64 *rsp,
1510{ 1510{
1511 struct sk_buff *skb; 1511 struct sk_buff *skb;
1512 const struct cpl_rx_pkt *pkt = (void *)rsp; 1512 const struct cpl_rx_pkt *pkt = (void *)rsp;
1513 bool csum_ok = pkt->csum_calc && !pkt->err_vec; 1513 bool csum_ok = pkt->csum_calc && !pkt->err_vec &&
1514 (rspq->netdev->features & NETIF_F_RXCSUM);
1514 struct sge_eth_rxq *rxq = container_of(rspq, struct sge_eth_rxq, rspq); 1515 struct sge_eth_rxq *rxq = container_of(rspq, struct sge_eth_rxq, rspq);
1515 1516
1516 /* 1517 /*
@@ -1538,8 +1539,8 @@ int t4vf_ethrx_handler(struct sge_rspq *rspq, const __be64 *rsp,
1538 skb_record_rx_queue(skb, rspq->idx); 1539 skb_record_rx_queue(skb, rspq->idx);
1539 rxq->stats.pkts++; 1540 rxq->stats.pkts++;
1540 1541
1541 if (csum_ok && (rspq->netdev->features & NETIF_F_RXCSUM) && 1542 if (csum_ok && !pkt->err_vec &&
1542 !pkt->err_vec && (be32_to_cpu(pkt->l2info) & (RXF_UDP|RXF_TCP))) { 1543 (be32_to_cpu(pkt->l2info) & (RXF_UDP|RXF_TCP))) {
1543 if (!pkt->ip_frag) 1544 if (!pkt->ip_frag)
1544 skb->ip_summed = CHECKSUM_UNNECESSARY; 1545 skb->ip_summed = CHECKSUM_UNNECESSARY;
1545 else { 1546 else {