drivers/net: remove redundant new line from logs
[dpdk.git] / drivers / net / e1000 / em_ethdev.c
index 436acbb..d778785 100644 (file)
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2010-2016 Intel Corporation. All rights reserved.
  *   All rights reserved.
  *
  *   Redistribution and use in source and binary forms, with or without
@@ -169,6 +169,19 @@ static const struct rte_pci_id pci_id_em_map[] = {
        { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_PCH_I218_V2) },
        { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_PCH_I218_LM3) },
        { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_PCH_I218_V3) },
+       { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_PCH_SPT_I219_LM) },
+       { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_PCH_SPT_I219_V) },
+       { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_PCH_SPT_I219_LM2) },
+       { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_PCH_SPT_I219_V2) },
+       { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_PCH_LBG_I219_LM3) },
+       { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_PCH_SPT_I219_LM4) },
+       { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_PCH_SPT_I219_V4) },
+       { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_PCH_SPT_I219_LM5) },
+       { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_PCH_SPT_I219_V5) },
+       { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_PCH_CNP_I219_LM6) },
+       { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_PCH_CNP_I219_V6) },
+       { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_PCH_CNP_I219_LM7) },
+       { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_PCH_CNP_I219_V7) },
        { .vendor_id = 0, /* sentinel */ },
 };
 
@@ -279,6 +292,19 @@ eth_em_dev_is_ich8(struct e1000_hw *hw)
        case E1000_DEV_ID_PCH_I218_LM2:
        case E1000_DEV_ID_PCH_I218_V3:
        case E1000_DEV_ID_PCH_I218_LM3:
+       case E1000_DEV_ID_PCH_SPT_I219_LM:
+       case E1000_DEV_ID_PCH_SPT_I219_V:
+       case E1000_DEV_ID_PCH_SPT_I219_LM2:
+       case E1000_DEV_ID_PCH_SPT_I219_V2:
+       case E1000_DEV_ID_PCH_LBG_I219_LM3:
+       case E1000_DEV_ID_PCH_SPT_I219_LM4:
+       case E1000_DEV_ID_PCH_SPT_I219_V4:
+       case E1000_DEV_ID_PCH_SPT_I219_LM5:
+       case E1000_DEV_ID_PCH_SPT_I219_V5:
+       case E1000_DEV_ID_PCH_CNP_I219_LM6:
+       case E1000_DEV_ID_PCH_CNP_I219_V6:
+       case E1000_DEV_ID_PCH_CNP_I219_LM7:
+       case E1000_DEV_ID_PCH_CNP_I219_V7:
                return 1;
        default:
                return 0;
@@ -300,6 +326,7 @@ eth_em_dev_init(struct rte_eth_dev *eth_dev)
        eth_dev->dev_ops = &eth_em_ops;
        eth_dev->rx_pkt_burst = (eth_rx_burst_t)&eth_em_recv_pkts;
        eth_dev->tx_pkt_burst = (eth_tx_burst_t)&eth_em_xmit_pkts;
+       eth_dev->tx_pkt_prepare = (eth_tx_prep_t)&eth_em_prep_pkts;
 
        /* for secondary processes, we don't initialise any further as primary
         * has already done this work. Only check we don't need a different
@@ -312,6 +339,7 @@ eth_em_dev_init(struct rte_eth_dev *eth_dev)
        }
 
        rte_eth_copy_pci_info(eth_dev, pci_dev);
+       eth_dev->data->dev_flags = RTE_ETH_DEV_DETACHABLE;
 
        hw->hw_addr = (void *)pci_dev->mem_resource[0].addr;
        hw->device_id = pci_dev->id.device_id;
@@ -391,8 +419,7 @@ eth_em_dev_uninit(struct rte_eth_dev *eth_dev)
 static struct eth_driver rte_em_pmd = {
        .pci_drv = {
                .id_table = pci_id_em_map,
-               .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC |
-                       RTE_PCI_DRV_DETACHABLE,
+               .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC,
                .probe = rte_eth_dev_pci_probe,
                .remove = rte_eth_dev_pci_remove,
        },
@@ -539,6 +566,8 @@ em_set_pba(struct e1000_hw *hw)
                case e1000_pchlan:
                case e1000_pch2lan:
                case e1000_pch_lpt:
+               case e1000_pch_spt:
+               case e1000_pch_cnp:
                        pba = E1000_PBA_26K;
                        break;
                default:
@@ -610,7 +639,7 @@ eth_em_start(struct rte_eth_dev *dev)
                                        dev->data->nb_rx_queues * sizeof(int), 0);
                if (intr_handle->intr_vec == NULL) {
                        PMD_INIT_LOG(ERR, "Failed to allocate %d rx_queues"
-                                               " intr_vec\n", dev->data->nb_rx_queues);
+                                               " intr_vec", dev->data->nb_rx_queues);
                        return -ENOMEM;
                }
 
@@ -707,7 +736,7 @@ eth_em_start(struct rte_eth_dev *dev)
                                                (void *)dev);
                if (dev->data->dev_conf.intr_conf.lsc != 0)
                        PMD_INIT_LOG(INFO, "lsc won't enable because of"
-                                    " no intr multiplex\n");
+                                    " no intr multiplexn");
        }
        /* check if rxq interrupt is enabled */
        if (dev->data->dev_conf.intr_conf.rxq != 0)
@@ -855,7 +884,9 @@ em_hardware_init(struct e1000_hw *hw)
                hw->fc.low_water = 0x5048;
                hw->fc.pause_time = 0x0650;
                hw->fc.refresh_time = 0x0400;
-       } else if (hw->mac.type == e1000_pch_lpt) {
+       } else if (hw->mac.type == e1000_pch_lpt ||
+                  hw->mac.type == e1000_pch_spt ||
+                  hw->mac.type == e1000_pch_cnp) {
                hw->fc.requested_mode = e1000_fc_full;
        }
 
@@ -1030,6 +1061,8 @@ em_get_max_pktlen(const struct e1000_hw *hw)
        case e1000_ich10lan:
        case e1000_pch2lan:
        case e1000_pch_lpt:
+       case e1000_pch_spt:
+       case e1000_pch_cnp:
        case e1000_82574:
        case e1000_80003es2lan: /* 9K Jumbo Frame size */
        case e1000_82583:
@@ -1084,6 +1117,8 @@ eth_em_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
                .nb_max = E1000_MAX_RING_DESC,
                .nb_min = E1000_MIN_RING_DESC,
                .nb_align = EM_TXD_ALIGN,
+               .nb_seg_max = EM_TX_MAX_SEG,
+               .nb_mtu_seg_max = EM_TX_MAX_MTU_SEG,
        };
 
        dev_info->speed_capa = ETH_LINK_SPEED_10M_HD | ETH_LINK_SPEED_10M |