]> git.karo-electronics.de Git - linux-beck.git/blobdiff - drivers/net/pch_gbe/pch_gbe_main.c
PCH_GbE : Fixed the issue of checksum judgment
[linux-beck.git] / drivers / net / pch_gbe / pch_gbe_main.c
index 50986840c99c6cd46694a27cc0f728efeb704556..9f6c4025c6eaede04c12381977194f40af5fe33e 100644 (file)
@@ -43,8 +43,7 @@ const char pch_driver_version[] = DRV_VERSION;
 
 #define PCH_GBE_MAC_RGMII_CTRL_SETTING ( \
        PCH_GBE_CHIP_TYPE_INTERNAL | \
-       PCH_GBE_RGMII_MODE_RGMII   | \
-       PCH_GBE_CRS_SEL              \
+       PCH_GBE_RGMII_MODE_RGMII     \
        )
 
 /* Ethertype field values */
@@ -1011,7 +1010,7 @@ static void pch_gbe_tx_queue(struct pch_gbe_adapter *adapter,
        tmp_skb->len = skb->len;
        memcpy(&tmp_skb->data[ETH_HLEN + 2], &skb->data[ETH_HLEN],
               (skb->len - ETH_HLEN));
-       /*-- Set Buffer infomation --*/
+       /*-- Set Buffer information --*/
        buffer_info->length = tmp_skb->len;
        buffer_info->dma = dma_map_single(&adapter->pdev->dev, tmp_skb->data,
                                          buffer_info->length,
@@ -1494,12 +1493,11 @@ pch_gbe_clean_rx(struct pch_gbe_adapter *adapter,
                        /* Write meta date of skb */
                        skb_put(skb, length);
                        skb->protocol = eth_type_trans(skb, netdev);
-                       if ((tcp_ip_status & PCH_GBE_RXD_ACC_STAT_TCPIPOK) ==
-                           PCH_GBE_RXD_ACC_STAT_TCPIPOK) {
-                               skb->ip_summed = CHECKSUM_UNNECESSARY;
-                       } else {
+                       if (tcp_ip_status & PCH_GBE_RXD_ACC_STAT_TCPIPOK)
                                skb->ip_summed = CHECKSUM_NONE;
-                       }
+                       else
+                               skb->ip_summed = CHECKSUM_UNNECESSARY;
+
                        napi_gro_receive(&adapter->napi, skb);
                        (*work_done)++;
                        pr_debug("Receive skb->ip_summed: %d length: %d\n",
@@ -1540,7 +1538,7 @@ int pch_gbe_setup_tx_resources(struct pch_gbe_adapter *adapter,
        size = (int)sizeof(struct pch_gbe_buffer) * tx_ring->count;
        tx_ring->buffer_info = vzalloc(size);
        if (!tx_ring->buffer_info) {
-               pr_err("Unable to allocate memory for the buffer infomation\n");
+               pr_err("Unable to allocate memory for the buffer information\n");
                return -ENOMEM;
        }