Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+18 -10
+11 -4
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
··· 2252 2252 else if (p->port_type == FW_PORT_TYPE_FIBER_XFI || 2253 2253 p->port_type == FW_PORT_TYPE_FIBER_XAUI) 2254 2254 cmd->port = PORT_FIBRE; 2255 - else if (p->port_type == FW_PORT_TYPE_SFP) { 2256 - if (p->mod_type == FW_PORT_MOD_TYPE_TWINAX_PASSIVE || 2257 - p->mod_type == FW_PORT_MOD_TYPE_TWINAX_ACTIVE) 2255 + else if (p->port_type == FW_PORT_TYPE_SFP || 2256 + p->port_type == FW_PORT_TYPE_QSFP_10G || 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 2265 cmd->port = PORT_DA; 2259 2266 else 2260 - cmd->port = PORT_FIBRE; 2267 + cmd->port = PORT_OTHER; 2261 2268 } else 2262 2269 cmd->port = PORT_OTHER; 2263 2270
+3 -3
drivers/net/ethernet/chelsio/cxgb4/sge.c
··· 1697 1697 return handle_trace_pkt(q->adap, si); 1698 1698 1699 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 1702 if ((pkt->l2info & htonl(RXF_TCP)) && 1702 1703 (q->netdev->features & NETIF_F_GRO) && csum_ok && !pkt->ip_frag) { 1703 1704 do_gro(rxq, si, pkt); ··· 1721 1720 1722 1721 rxq->stats.pkts++; 1723 1722 1724 - if (csum_ok && (q->netdev->features & NETIF_F_RXCSUM) && 1725 - (pkt->l2info & htonl(RXF_UDP | RXF_TCP))) { 1723 + if (csum_ok && (pkt->l2info & htonl(RXF_UDP | RXF_TCP))) { 1726 1724 if (!pkt->ip_frag) { 1727 1725 skb->ip_summed = CHECKSUM_UNNECESSARY; 1728 1726 rxq->stats.rx_cso++;
+4 -3
drivers/net/ethernet/chelsio/cxgb4vf/sge.c
··· 1510 1510 { 1511 1511 struct sk_buff *skb; 1512 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 1515 struct sge_eth_rxq *rxq = container_of(rspq, struct sge_eth_rxq, rspq); 1515 1516 1516 1517 /* ··· 1539 1538 skb_record_rx_queue(skb, rspq->idx); 1540 1539 rxq->stats.pkts++; 1541 1540 1542 - if (csum_ok && (rspq->netdev->features & NETIF_F_RXCSUM) && 1543 - !pkt->err_vec && (be32_to_cpu(pkt->l2info) & (RXF_UDP|RXF_TCP))) { 1541 + if (csum_ok && !pkt->err_vec && 1542 + (be32_to_cpu(pkt->l2info) & (RXF_UDP|RXF_TCP))) { 1544 1543 if (!pkt->ip_frag) 1545 1544 skb->ip_summed = CHECKSUM_UNNECESSARY; 1546 1545 else {