mirror of
https://github.com/opnsense/src.git
synced 2026-06-12 18:20:49 -04:00
mlx5: jiffies is unsigned long
Sponsored by: NVidia networking Differential revision: https://reviews.freebsd.org/D48878
This commit is contained in:
parent
325aa4dbd1
commit
901256f6ea
5 changed files with 13 additions and 12 deletions
|
|
@ -247,7 +247,7 @@ static void poll_timeout(struct mlx5_cmd_work_ent *ent)
|
|||
{
|
||||
struct mlx5_core_dev *dev = container_of(ent->cmd,
|
||||
struct mlx5_core_dev, cmd);
|
||||
int poll_end = jiffies +
|
||||
long poll_end = jiffies +
|
||||
msecs_to_jiffies(MLX5_CMD_TIMEOUT_MSEC + 1000);
|
||||
u8 own;
|
||||
|
||||
|
|
@ -951,7 +951,7 @@ static const char *deliv_status_to_str(u8 status)
|
|||
|
||||
static int wait_func(struct mlx5_core_dev *dev, struct mlx5_cmd_work_ent *ent)
|
||||
{
|
||||
int timeout = msecs_to_jiffies(MLX5_CMD_TIMEOUT_MSEC);
|
||||
unsigned long timeout = msecs_to_jiffies(MLX5_CMD_TIMEOUT_MSEC);
|
||||
int err;
|
||||
|
||||
if (ent->polling) {
|
||||
|
|
|
|||
|
|
@ -306,7 +306,7 @@ int mlx5_cmd_force_teardown_hca(struct mlx5_core_dev *dev)
|
|||
#define MLX5_FAST_TEARDOWN_WAIT_MS 3000
|
||||
int mlx5_cmd_fast_teardown_hca(struct mlx5_core_dev *dev)
|
||||
{
|
||||
int end, delay_ms = MLX5_FAST_TEARDOWN_WAIT_MS;
|
||||
unsigned long end, delay_ms = MLX5_FAST_TEARDOWN_WAIT_MS;
|
||||
u32 out[MLX5_ST_SZ_DW(teardown_hca_out)] = {};
|
||||
u32 in[MLX5_ST_SZ_DW(teardown_hca_in)] = {};
|
||||
int state;
|
||||
|
|
@ -343,7 +343,7 @@ int mlx5_cmd_fast_teardown_hca(struct mlx5_core_dev *dev)
|
|||
} while (!time_after(jiffies, end));
|
||||
|
||||
if (mlx5_get_nic_state(dev) != MLX5_NIC_IFC_DISABLED) {
|
||||
mlx5_core_err(dev, "NIC IFC still %d after %ums.\n",
|
||||
mlx5_core_err(dev, "NIC IFC still %d after %lums.\n",
|
||||
mlx5_get_nic_state(dev), delay_ms);
|
||||
return -EIO;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -265,7 +265,8 @@ mlx5_health_allow_reset(struct mlx5_core_dev *dev)
|
|||
#define MLX5_NIC_STATE_POLL_MS 5
|
||||
void mlx5_enter_error_state(struct mlx5_core_dev *dev, bool force)
|
||||
{
|
||||
int end, delay_ms = MLX5_CRDUMP_WAIT_MS;
|
||||
unsigned long end;
|
||||
int delay_ms = MLX5_CRDUMP_WAIT_MS;
|
||||
u32 fatal_error;
|
||||
int lock = -EBUSY;
|
||||
|
||||
|
|
@ -445,7 +446,7 @@ static void health_care(struct work_struct *work)
|
|||
spin_unlock_irqrestore(&health->wq_lock, flags);
|
||||
}
|
||||
|
||||
static int get_next_poll_jiffies(void)
|
||||
static unsigned long get_next_poll_jiffies(void)
|
||||
{
|
||||
unsigned long next;
|
||||
|
||||
|
|
|
|||
|
|
@ -761,8 +761,8 @@ static inline int fw_initializing(struct mlx5_core_dev *dev)
|
|||
static int wait_fw_init(struct mlx5_core_dev *dev, u32 max_wait_mili,
|
||||
u32 warn_time_mili)
|
||||
{
|
||||
int warn = jiffies + msecs_to_jiffies(warn_time_mili);
|
||||
int end = jiffies + msecs_to_jiffies(max_wait_mili);
|
||||
unsigned long warn = jiffies + msecs_to_jiffies(warn_time_mili);
|
||||
unsigned long end = jiffies + msecs_to_jiffies(max_wait_mili);
|
||||
int err = 0;
|
||||
|
||||
MPASS(max_wait_mili > warn_time_mili);
|
||||
|
|
@ -774,8 +774,8 @@ static int wait_fw_init(struct mlx5_core_dev *dev, u32 max_wait_mili,
|
|||
}
|
||||
if (warn_time_mili && time_after(jiffies, warn)) {
|
||||
mlx5_core_warn(dev,
|
||||
"Waiting for FW initialization, timeout abort in %u s\n",
|
||||
(unsigned)(jiffies_to_msecs(end - warn) / 1000));
|
||||
"Waiting for FW initialization, timeout abort in %lu s\n",
|
||||
(unsigned long)(jiffies_to_msecs(end - warn) / 1000));
|
||||
warn = jiffies + msecs_to_jiffies(warn_time_mili);
|
||||
}
|
||||
msleep(FW_INIT_WAIT_MS);
|
||||
|
|
|
|||
|
|
@ -519,7 +519,7 @@ enum {
|
|||
|
||||
s64 mlx5_wait_for_reclaim_vfs_pages(struct mlx5_core_dev *dev)
|
||||
{
|
||||
int end = jiffies + msecs_to_jiffies(MAX_RECLAIM_TIME_MSECS);
|
||||
unsigned long end = jiffies + msecs_to_jiffies(MAX_RECLAIM_TIME_MSECS);
|
||||
s64 prevpages = 0;
|
||||
s64 npages = 0;
|
||||
|
||||
|
|
@ -557,7 +557,7 @@ static int optimal_reclaimed_pages(void)
|
|||
|
||||
int mlx5_reclaim_startup_pages(struct mlx5_core_dev *dev)
|
||||
{
|
||||
int end = jiffies + msecs_to_jiffies(MAX_RECLAIM_TIME_MSECS);
|
||||
unsigned long end = jiffies + msecs_to_jiffies(MAX_RECLAIM_TIME_MSECS);
|
||||
struct mlx5_fw_page *fwp;
|
||||
struct rb_node *p;
|
||||
int nclaimed = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue