aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/cxgb3
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-02-09 14:44:44 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-09 14:44:44 -0500
commitb1109bf085c8dd69537b7876ea83f914dd1fe46a (patch)
tree086bd9891a8c92284ea148c93f2242e6c7c02bd2 /drivers/net/cxgb3
parent889b8f964f2f226b7cd5a0a515109e3d8d9d1613 (diff)
parent44bfce5c3ec91baf8ffcd075c66711740f29a949 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'drivers/net/cxgb3')
-rw-r--r--drivers/net/cxgb3/sge.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c
index 4cf9b7962afa..048205903741 100644
--- a/drivers/net/cxgb3/sge.c
+++ b/drivers/net/cxgb3/sge.c
@@ -2080,6 +2080,7 @@ static void lro_add_page(struct adapter *adap, struct sge_qset *qs,
2080 struct sge_fl *fl, int len, int complete) 2080 struct sge_fl *fl, int len, int complete)
2081{ 2081{
2082 struct rx_sw_desc *sd = &fl->sdesc[fl->cidx]; 2082 struct rx_sw_desc *sd = &fl->sdesc[fl->cidx];
2083 struct port_info *pi = netdev_priv(qs->netdev);
2083 struct sk_buff *skb = NULL; 2084 struct sk_buff *skb = NULL;
2084 struct cpl_rx_pkt *cpl; 2085 struct cpl_rx_pkt *cpl;
2085 struct skb_frag_struct *rx_frag; 2086 struct skb_frag_struct *rx_frag;
@@ -2117,11 +2118,18 @@ static void lro_add_page(struct adapter *adap, struct sge_qset *qs,
2117 2118
2118 if (!nr_frags) { 2119 if (!nr_frags) {
2119 offset = 2 + sizeof(struct cpl_rx_pkt); 2120 offset = 2 + sizeof(struct cpl_rx_pkt);
2120 qs->lro_va = sd->pg_chunk.va + 2; 2121 cpl = qs->lro_va = sd->pg_chunk.va + 2;
2121 }
2122 len -= offset;
2123 2122
2124 prefetch(qs->lro_va); 2123 if ((pi->rx_offload & T3_RX_CSUM) &&
2124 cpl->csum_valid && cpl->csum == htons(0xffff)) {
2125 skb->ip_summed = CHECKSUM_UNNECESSARY;
2126 qs->port_stats[SGE_PSTAT_RX_CSUM_GOOD]++;
2127 } else
2128 skb->ip_summed = CHECKSUM_NONE;
2129 } else
2130 cpl = qs->lro_va;
2131
2132 len -= offset;
2125 2133
2126 rx_frag += nr_frags; 2134 rx_frag += nr_frags;
2127 rx_frag->page = sd->pg_chunk.page; 2135 rx_frag->page = sd->pg_chunk.page;
@@ -2137,12 +2145,8 @@ static void lro_add_page(struct adapter *adap, struct sge_qset *qs,
2137 return; 2145 return;
2138 2146
2139 skb_record_rx_queue(skb, qs - &adap->sge.qs[0]); 2147 skb_record_rx_queue(skb, qs - &adap->sge.qs[0]);
2140 skb->ip_summed = CHECKSUM_UNNECESSARY;
2141 cpl = qs->lro_va;
2142 2148
2143 if (unlikely(cpl->vlan_valid)) { 2149 if (unlikely(cpl->vlan_valid)) {
2144 struct net_device *dev = qs->netdev;
2145 struct port_info *pi = netdev_priv(dev);
2146 struct vlan_group *grp = pi->vlan_grp; 2150 struct vlan_group *grp = pi->vlan_grp;
2147 2151
2148 if (likely(grp != NULL)) { 2152 if (likely(grp != NULL)) {