Skip to content

Commit

Permalink
ionic: check for linkup in watchdog
Browse files Browse the repository at this point in the history
Add a link_status_check to the heartbeat watchdog.

Signed-off-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
emusln authored and davem330 committed Mar 30, 2020
1 parent aa47b54 commit 987c087
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion drivers/net/ethernet/pensando/ionic/ionic_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@
static void ionic_watchdog_cb(struct timer_list *t)
{
struct ionic *ionic = from_timer(ionic, t, watchdog_timer);
int hb;

mod_timer(&ionic->watchdog_timer,
round_jiffies(jiffies + ionic->watchdog_period));

ionic_heartbeat_check(ionic);
hb = ionic_heartbeat_check(ionic);

if (hb >= 0 && ionic->master_lif)
ionic_link_status_check_request(ionic->master_lif);
}

void ionic_init_devinfo(struct ionic *ionic)
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/pensando/ionic/ionic_lif.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ static void ionic_link_status_check(struct ionic_lif *lif)
clear_bit(IONIC_LIF_F_LINK_CHECK_REQUESTED, lif->state);
}

static void ionic_link_status_check_request(struct ionic_lif *lif)
void ionic_link_status_check_request(struct ionic_lif *lif)
{
struct ionic_deferred_work *work;

Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/pensando/ionic/ionic_lif.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ static inline u32 ionic_coal_hw_to_usec(struct ionic *ionic, u32 units)
return (units * div) / mult;
}

void ionic_link_status_check_request(struct ionic_lif *lif);
int ionic_lifs_alloc(struct ionic *ionic);
void ionic_lifs_free(struct ionic *ionic);
void ionic_lifs_deinit(struct ionic *ionic);
Expand Down

0 comments on commit 987c087

Please sign in to comment.