net/hinic/base: convert error value to ETIMEDOUT
authorXiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Thu, 9 Jul 2020 13:43:02 +0000 (21:43 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Sat, 11 Jul 2020 04:18:53 +0000 (06:18 +0200)
Following commit updated the error codes:
commit 2ae8e130cf21 ("net/hinic/base: modify returned error values")

In that commit 'ETIME' errors are not used because it is not supported
by FreeBSD, instead in this patch converting relevant error codes to
'ETIMEDOUT'.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/hinic/base/hinic_pmd_hwdev.c
drivers/net/hinic/base/hinic_pmd_hwif.c

index 765c47d..ac2a72e 100644 (file)
@@ -475,7 +475,7 @@ static int wait_for_flr_finish(struct hinic_hwif *hwif)
                rte_delay_ms(10);
        } while (time_before(jiffies, end));
 
-       return -EFAULT;
+       return -ETIMEDOUT;
 }
 
 #define HINIC_WAIT_CMDQ_IDLE_TIMEOUT           1000
index 4578b68..d7fc1af 100644 (file)
@@ -321,7 +321,7 @@ int wait_until_doorbell_flush_states(struct hinic_hwif *hwif,
                rte_delay_ms(1);
        } while (time_before(jiffies, end));
 
-       return -EFAULT;
+       return -ETIMEDOUT;
 }
 
 static int wait_until_doorbell_and_outbound_enabled(struct hinic_hwif *hwif)
@@ -343,7 +343,7 @@ static int wait_until_doorbell_and_outbound_enabled(struct hinic_hwif *hwif)
                rte_delay_ms(1);
        } while (time_before(jiffies, end));
 
-       return -EFAULT;
+       return -ETIMEDOUT;
 }
 
 u16 hinic_global_func_id(void *hwdev)