net/i40e/base: set TSA table values when parsing CEE config
[dpdk.git] / drivers / net / igc / igc_ethdev.c
index b1c58fb..03a77b3 100644 (file)
@@ -216,7 +216,7 @@ static int eth_igc_xstats_get_names(struct rte_eth_dev *dev,
                                struct rte_eth_xstat_name *xstats_names,
                                unsigned int size);
 static int eth_igc_xstats_get_names_by_id(struct rte_eth_dev *dev,
-               struct rte_eth_xstat_name *xstats_names, const uint64_t *ids,
+               const uint64_t *ids, struct rte_eth_xstat_name *xstats_names,
                unsigned int limit);
 static int eth_igc_xstats_reset(struct rte_eth_dev *dev);
 static int
@@ -989,15 +989,20 @@ eth_igc_start(struct rte_eth_dev *dev)
                hw->mac.autoneg = 1;
        } else {
                int num_speeds = 0;
-               bool autoneg = (*speeds & ETH_LINK_SPEED_FIXED) == 0;
 
-               /* Reset */
+               if (*speeds & ETH_LINK_SPEED_FIXED) {
+                       PMD_DRV_LOG(ERR,
+                                   "Force speed mode currently not supported");
+                       igc_dev_clear_queues(dev);
+                       return -EINVAL;
+               }
+
                hw->phy.autoneg_advertised = 0;
+               hw->mac.autoneg = 1;
 
                if (*speeds & ~(ETH_LINK_SPEED_10M_HD | ETH_LINK_SPEED_10M |
                                ETH_LINK_SPEED_100M_HD | ETH_LINK_SPEED_100M |
-                               ETH_LINK_SPEED_1G | ETH_LINK_SPEED_2_5G |
-                               ETH_LINK_SPEED_FIXED)) {
+                               ETH_LINK_SPEED_1G | ETH_LINK_SPEED_2_5G)) {
                        num_speeds = -1;
                        goto error_invalid_config;
                }
@@ -1025,19 +1030,8 @@ eth_igc_start(struct rte_eth_dev *dev)
                        hw->phy.autoneg_advertised |= ADVERTISE_2500_FULL;
                        num_speeds++;
                }
-               if (num_speeds == 0 || (!autoneg && num_speeds > 1))
+               if (num_speeds == 0)
                        goto error_invalid_config;
-
-               /* Set/reset the mac.autoneg based on the link speed,
-                * fixed or not
-                */
-               if (!autoneg) {
-                       hw->mac.autoneg = 0;
-                       hw->mac.forced_speed_duplex =
-                                       hw->phy.autoneg_advertised;
-               } else {
-                       hw->mac.autoneg = 1;
-               }
        }
 
        igc_setup_link(hw);
@@ -1159,13 +1153,13 @@ igc_dev_free_queues(struct rte_eth_dev *dev)
        uint16_t i;
 
        for (i = 0; i < dev->data->nb_rx_queues; i++) {
-               eth_igc_rx_queue_release(dev->data->rx_queues[i]);
+               eth_igc_rx_queue_release(dev, i);
                dev->data->rx_queues[i] = NULL;
        }
        dev->data->nb_rx_queues = 0;
 
        for (i = 0; i < dev->data->nb_tx_queues; i++) {
-               eth_igc_tx_queue_release(dev->data->tx_queues[i]);
+               eth_igc_tx_queue_release(dev, i);
                dev->data->tx_queues[i] = NULL;
        }
        dev->data->nb_tx_queues = 0;
@@ -1233,7 +1227,6 @@ eth_igc_dev_init(struct rte_eth_dev *dev)
 
        PMD_INIT_FUNC_TRACE();
        dev->dev_ops = &eth_igc_ops;
-       dev->rx_descriptor_done = eth_igc_rx_descriptor_done;
        dev->rx_queue_count = eth_igc_rx_queue_count;
        dev->rx_descriptor_status = eth_igc_rx_descriptor_status;
        dev->tx_descriptor_status = eth_igc_tx_descriptor_status;
@@ -2019,7 +2012,7 @@ eth_igc_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
 
 static int
 eth_igc_xstats_get_names_by_id(struct rte_eth_dev *dev,
-               struct rte_eth_xstat_name *xstats_names, const uint64_t *ids,
+               const uint64_t *ids, struct rte_eth_xstat_name *xstats_names,
                unsigned int limit)
 {
        unsigned int i;