Skip to content

Commit 987c087

Browse files
emuslndavem330
authored andcommitted
ionic: check for linkup in watchdog
Add a link_status_check to the heartbeat watchdog. Signed-off-by: Shannon Nelson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent aa47b54 commit 987c087

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

drivers/net/ethernet/pensando/ionic/ionic_dev.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,15 @@
1414
static void ionic_watchdog_cb(struct timer_list *t)
1515
{
1616
struct ionic *ionic = from_timer(ionic, t, watchdog_timer);
17+
int hb;
1718

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

21-
ionic_heartbeat_check(ionic);
22+
hb = ionic_heartbeat_check(ionic);
23+
24+
if (hb >= 0 && ionic->master_lif)
25+
ionic_link_status_check_request(ionic->master_lif);
2226
}
2327

2428
void ionic_init_devinfo(struct ionic *ionic)

drivers/net/ethernet/pensando/ionic/ionic_lif.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ static void ionic_link_status_check(struct ionic_lif *lif)
105105
clear_bit(IONIC_LIF_F_LINK_CHECK_REQUESTED, lif->state);
106106
}
107107

108-
static void ionic_link_status_check_request(struct ionic_lif *lif)
108+
void ionic_link_status_check_request(struct ionic_lif *lif)
109109
{
110110
struct ionic_deferred_work *work;
111111

drivers/net/ethernet/pensando/ionic/ionic_lif.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ static inline u32 ionic_coal_hw_to_usec(struct ionic *ionic, u32 units)
224224
return (units * div) / mult;
225225
}
226226

227+
void ionic_link_status_check_request(struct ionic_lif *lif);
227228
int ionic_lifs_alloc(struct ionic *ionic);
228229
void ionic_lifs_free(struct ionic *ionic);
229230
void ionic_lifs_deinit(struct ionic *ionic);

0 commit comments

Comments
 (0)