Lines Matching refs:ionic

10 #include "ionic.h"
16 struct ionic *ionic = from_timer(ionic, t, watchdog_timer);
17 struct ionic_lif *lif = ionic->lif;
21 mod_timer(&ionic->watchdog_timer,
22 round_jiffies(jiffies + ionic->watchdog_period));
27 hb = ionic_heartbeat_check(ionic);
28 dev_dbg(ionic->dev, "%s: hb %d running %d UP %d\n",
50 static void ionic_watchdog_init(struct ionic *ionic)
52 struct ionic_dev *idev = &ionic->idev;
54 timer_setup(&ionic->watchdog_timer, ionic_watchdog_cb, 0);
55 ionic->watchdog_period = IONIC_WATCHDOG_SECS * HZ;
59 idev->last_hb_time = jiffies - 2 * ionic->watchdog_period;
68 void ionic_init_devinfo(struct ionic *ionic)
70 struct ionic_dev *idev = &ionic->idev;
86 dev_dbg(ionic->dev, "fw_version %s\n", idev->dev_info.fw_version);
89 int ionic_dev_setup(struct ionic *ionic)
91 struct ionic_dev_bar *bar = ionic->bars;
92 unsigned int num_bars = ionic->num_bars;
93 struct ionic_dev *idev = &ionic->idev;
94 struct device *dev = ionic->dev;
123 ionic_init_devinfo(ionic);
132 ionic_watchdog_init(ionic);
140 if (num_bars < 3 || !ionic->bars[IONIC_PCI_BAR_CMB].len) {
155 void ionic_dev_teardown(struct ionic *ionic)
157 struct ionic_dev *idev = &ionic->idev;
193 int ionic_heartbeat_check(struct ionic *ionic)
196 struct ionic_dev *idev = &ionic->idev;
197 struct ionic_lif *lif = ionic->lif;
213 dev_dbg(ionic->dev, "%s: do_check_time again\n", __func__);
223 dev_info(ionic->dev, "FW generation 0x%02x -> 0x%02x\n",
246 dev_dbg(ionic->dev, "fw_status 0x%02x ready %d idev->ready %d last_hb 0x%x state 0x%02lx\n",
260 dev_info(ionic->dev, "FW stopped 0x%02x\n", fw_status);
265 dev_info(ionic->dev, "FW running 0x%02x\n", fw_status);
298 dev_dbg(ionic->dev, "%s: fw_hb %u last_fw_hb %u ready %u\n",
307 dev_info(ionic->dev, "FW heartbeat stalled at %d\n", fw_hb);
309 dev_info(ionic->dev, "FW heartbeat restored at %d\n", fw_hb);
476 int ionic_set_vf_config(struct ionic *ionic, int vf,
488 mutex_lock(&ionic->dev_cmd_lock);
489 ionic_dev_cmd_go(&ionic->idev, &cmd);
490 err = ionic_dev_cmd_wait(ionic, DEVCMD_TIMEOUT);
491 mutex_unlock(&ionic->dev_cmd_lock);
496 void ionic_vf_start(struct ionic *ionic)
503 if (!(ionic->ident.dev.capabilities & cpu_to_le64(IONIC_DEV_CAP_VF_CTRL)))
506 ionic_dev_cmd_go(&ionic->idev, &cmd);
507 ionic_dev_cmd_wait(ionic, DEVCMD_TIMEOUT);
588 struct ionic_dev *idev = &lif->ionic->idev;
606 struct ionic_dev *idev = &lif->ionic->idev;
632 cq->idev = &lif->ionic->idev;