Loading drivers/net/mv643xx_eth.c +29 −26 Original line number Diff line number Diff line Loading @@ -543,9 +543,24 @@ static int rxq_process(struct rx_queue *rxq, int budget) * on, or the error summary bit is set, the packet needs * to be dropped. */ if (((cmd_sts & (RX_FIRST_DESC | RX_LAST_DESC)) != (RX_FIRST_DESC | RX_LAST_DESC)) || (cmd_sts & ERROR_SUMMARY)) { if ((cmd_sts & (RX_FIRST_DESC | RX_LAST_DESC | ERROR_SUMMARY)) != (RX_FIRST_DESC | RX_LAST_DESC)) goto err; /* * The -4 is for the CRC in the trailer of the * received packet */ skb_put(skb, byte_cnt - 2 - 4); if (cmd_sts & LAYER_4_CHECKSUM_OK) skb->ip_summed = CHECKSUM_UNNECESSARY; skb->protocol = eth_type_trans(skb, mp->dev); netif_receive_skb(skb); continue; err: stats->rx_dropped++; if ((cmd_sts & (RX_FIRST_DESC | RX_LAST_DESC)) != Loading @@ -560,18 +575,6 @@ static int rxq_process(struct rx_queue *rxq, int budget) stats->rx_errors++; dev_kfree_skb(skb); } else { /* * The -4 is for the CRC in the trailer of the * received packet */ skb_put(skb, byte_cnt - 2 - 4); if (cmd_sts & LAYER_4_CHECKSUM_OK) skb->ip_summed = CHECKSUM_UNNECESSARY; skb->protocol = eth_type_trans(skb, mp->dev); netif_receive_skb(skb); } } if (rx < budget) Loading Loading
drivers/net/mv643xx_eth.c +29 −26 Original line number Diff line number Diff line Loading @@ -543,9 +543,24 @@ static int rxq_process(struct rx_queue *rxq, int budget) * on, or the error summary bit is set, the packet needs * to be dropped. */ if (((cmd_sts & (RX_FIRST_DESC | RX_LAST_DESC)) != (RX_FIRST_DESC | RX_LAST_DESC)) || (cmd_sts & ERROR_SUMMARY)) { if ((cmd_sts & (RX_FIRST_DESC | RX_LAST_DESC | ERROR_SUMMARY)) != (RX_FIRST_DESC | RX_LAST_DESC)) goto err; /* * The -4 is for the CRC in the trailer of the * received packet */ skb_put(skb, byte_cnt - 2 - 4); if (cmd_sts & LAYER_4_CHECKSUM_OK) skb->ip_summed = CHECKSUM_UNNECESSARY; skb->protocol = eth_type_trans(skb, mp->dev); netif_receive_skb(skb); continue; err: stats->rx_dropped++; if ((cmd_sts & (RX_FIRST_DESC | RX_LAST_DESC)) != Loading @@ -560,18 +575,6 @@ static int rxq_process(struct rx_queue *rxq, int budget) stats->rx_errors++; dev_kfree_skb(skb); } else { /* * The -4 is for the CRC in the trailer of the * received packet */ skb_put(skb, byte_cnt - 2 - 4); if (cmd_sts & LAYER_4_CHECKSUM_OK) skb->ip_summed = CHECKSUM_UNNECESSARY; skb->protocol = eth_type_trans(skb, mp->dev); netif_receive_skb(skb); } } if (rx < budget) Loading