i40e/base: add PHY capabilities
[dpdk.git] / drivers / net / fm10k / fm10k_ethdev.c
index 5aa13f0..a69c990 100644 (file)
@@ -182,7 +182,7 @@ rx_queue_disable(struct fm10k_hw *hw, uint16_t qnum)
        /* Wait 100us at most */
        for (i = 0; i < FM10K_QUEUE_DISABLE_TIMEOUT; i++) {
                rte_delay_us(1);
-               reg = FM10K_READ_REG(hw, FM10K_RXQCTL(i));
+               reg = FM10K_READ_REG(hw, FM10K_RXQCTL(qnum));
                if (!(reg & FM10K_RXQCTL_ENABLE))
                        break;
        }
@@ -271,7 +271,7 @@ tx_queue_disable(struct fm10k_hw *hw, uint16_t qnum)
        /* Wait 100us at most */
        for (i = 0; i < FM10K_QUEUE_DISABLE_TIMEOUT; i++) {
                rte_delay_us(1);
-               reg = FM10K_READ_REG(hw, FM10K_TXDCTL(i));
+               reg = FM10K_READ_REG(hw, FM10K_TXDCTL(qnum));
                if (!(reg & FM10K_TXDCTL_ENABLE))
                        break;
        }
@@ -786,6 +786,8 @@ fm10k_dev_start(struct rte_eth_dev *dev)
                diag = fm10k_dev_tx_queue_start(dev, i);
                if (diag != 0) {
                        int j;
+                       for (j = 0; j < i; ++j)
+                               tx_queue_clean(dev->data->tx_queues[j]);
                        for (j = 0; j < dev->data->nb_rx_queues; ++j)
                                rx_queue_clean(dev->data->rx_queues[j]);
                        return diag;
@@ -932,7 +934,11 @@ fm10k_dev_infos_get(struct rte_eth_dev *dev,
                DEV_RX_OFFLOAD_UDP_CKSUM  |
                DEV_RX_OFFLOAD_TCP_CKSUM;
        dev_info->tx_offload_capa =
-               DEV_TX_OFFLOAD_VLAN_INSERT;
+               DEV_TX_OFFLOAD_VLAN_INSERT |
+               DEV_TX_OFFLOAD_IPV4_CKSUM  |
+               DEV_TX_OFFLOAD_UDP_CKSUM   |
+               DEV_TX_OFFLOAD_TCP_CKSUM;
+
        dev_info->hash_key_size = FM10K_RSSRK_SIZE * sizeof(uint32_t);
        dev_info->reta_size = FM10K_MAX_RSS_INDICES;
 
@@ -1779,7 +1785,7 @@ fm10k_dev_handle_fault(struct fm10k_hw *hw, uint32_t eicr)
        const char *estr = "Unknown error";
 
        /* Process PCA fault */
-       if (eicr & FM10K_EIMR_PCA_FAULT) {
+       if (eicr & FM10K_EICR_PCA_FAULT) {
                err = fm10k_get_fault(hw, FM10K_PCA_FAULT, &fault);
                if (err)
                        goto error;
@@ -1807,7 +1813,7 @@ fm10k_dev_handle_fault(struct fm10k_hw *hw, uint32_t eicr)
        }
 
        /* Process THI fault */
-       if (eicr & FM10K_EIMR_THI_FAULT) {
+       if (eicr & FM10K_EICR_THI_FAULT) {
                err = fm10k_get_fault(hw, FM10K_THI_FAULT, &fault);
                if (err)
                        goto error;
@@ -1825,7 +1831,7 @@ fm10k_dev_handle_fault(struct fm10k_hw *hw, uint32_t eicr)
        }
 
        /* Process FUM fault */
-       if (eicr & FM10K_EIMR_FUM_FAULT) {
+       if (eicr & FM10K_EICR_FUM_FAULT) {
                err = fm10k_get_fault(hw, FM10K_FUM_FAULT, &fault);
                if (err)
                        goto error;