diff options
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r-- | drivers/net/sky2.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 53839979cfb8..ab0ab92583fe 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -2165,9 +2165,27 @@ force_update: | |||
2165 | /* fall through */ | 2165 | /* fall through */ |
2166 | #endif | 2166 | #endif |
2167 | case OP_RXCHKS: | 2167 | case OP_RXCHKS: |
2168 | skb = sky2->rx_ring[sky2->rx_next].skb; | 2168 | if (!sky2->rx_csum) |
2169 | skb->ip_summed = CHECKSUM_COMPLETE; | 2169 | break; |
2170 | skb->csum = status & 0xffff; | 2170 | |
2171 | /* Both checksum counters are programmed to start at | ||
2172 | * the same offset, so unless there is a problem they | ||
2173 | * should match. This failure is an early indication that | ||
2174 | * hardware receive checksumming won't work. | ||
2175 | */ | ||
2176 | if (likely(status >> 16 == (status & 0xffff))) { | ||
2177 | skb = sky2->rx_ring[sky2->rx_next].skb; | ||
2178 | skb->ip_summed = CHECKSUM_COMPLETE; | ||
2179 | skb->csum = status & 0xffff; | ||
2180 | } else { | ||
2181 | printk(KERN_NOTICE PFX "%s: hardware receive " | ||
2182 | "checksum problem (status = %#x)\n", | ||
2183 | dev->name, status); | ||
2184 | sky2->rx_csum = 0; | ||
2185 | sky2_write32(sky2->hw, | ||
2186 | Q_ADDR(rxqaddr[le->link], Q_CSR), | ||
2187 | BMU_DIS_RX_CHKSUM); | ||
2188 | } | ||
2171 | break; | 2189 | break; |
2172 | 2190 | ||
2173 | case OP_TXINDEXLE: | 2191 | case OP_TXINDEXLE: |