Lines Matching defs:fbd

37 u32 fbnic_rd32(struct fbnic_dev *fbd, u32 reg)
39 u32 __iomem *csr = READ_ONCE(fbd->uc_addr0);
56 WRITE_ONCE(fbd->uc_addr0, NULL);
57 WRITE_ONCE(fbd->uc_addr4, NULL);
59 dev_err(fbd->dev,
64 if (!fbnic_init_failure(fbd))
65 netif_device_detach(fbd->netdev);
70 bool fbnic_fw_present(struct fbnic_dev *fbd)
72 return !!READ_ONCE(fbd->uc_addr4);
75 void fbnic_fw_wr32(struct fbnic_dev *fbd, u32 reg, u32 val)
77 u32 __iomem *csr = READ_ONCE(fbd->uc_addr4);
83 u32 fbnic_fw_rd32(struct fbnic_dev *fbd, u32 reg)
85 u32 __iomem *csr = READ_ONCE(fbd->uc_addr4);
102 WRITE_ONCE(fbd->uc_addr0, NULL);
103 WRITE_ONCE(fbd->uc_addr4, NULL);
105 dev_err(fbd->dev,
110 if (!fbnic_init_failure(fbd))
111 netif_device_detach(fbd->netdev);
118 struct fbnic_dev *fbd = fbn->fbd;
120 schedule_delayed_work(&fbd->service_task, HZ);
126 struct fbnic_dev *fbd = fbn->fbd;
128 phylink_suspend(fbn->phylink, fbnic_bmc_present(fbd));
129 cancel_delayed_work(&fbd->service_task);
138 fbnic_rss_reinit_hw(fbn->fbd, fbn);
158 fbnic_clear_rules(fbn->fbd);
159 fbnic_rss_disable_hw(fbn->fbd);
167 fbnic_wait_all_queues_idle(fbn->fbd, false);
172 static void fbnic_health_check(struct fbnic_dev *fbd)
174 struct fbnic_fw_mbx *tx_mbx = &fbd->mbx[FBNIC_IPC_MBX_TX_IDX];
177 if (fbd->fw_heartbeat_enabled)
193 fbnic_fw_xmit_ownership_msg(fbd, true);
198 struct fbnic_dev *fbd = container_of(to_delayed_work(work),
203 fbnic_get_hw_stats32(fbd);
205 fbnic_fw_check_heartbeat(fbd);
207 fbnic_health_check(fbd);
209 if (netif_carrier_ok(fbd->netdev))
210 fbnic_napi_depletion_check(fbd->netdev);
212 if (netif_running(fbd->netdev))
213 schedule_delayed_work(&fbd->service_task, HZ);
233 struct fbnic_dev *fbd;
263 fbd = fbnic_devlink_alloc(pdev);
264 if (!fbd) {
270 fbd->max_num_queues = info->max_num_queues;
275 INIT_DELAYED_WORK(&fbd->service_task, fbnic_service_task);
277 err = fbnic_alloc_irqs(fbd);
281 err = fbnic_mac_init(fbd);
287 err = fbnic_fw_request_mbx(fbd);
299 err = fbnic_fw_log_init(fbd);
301 dev_warn(fbd->dev,
305 fbnic_devlink_register(fbd);
306 fbnic_dbg_fbd_init(fbd);
307 spin_lock_init(&fbd->hw_stats_lock);
310 fbnic_reset_hw_stats(fbd);
312 fbnic_hwmon_register(fbd);
314 if (!fbd->dsn) {
319 netdev = fbnic_netdev_alloc(fbd);
325 err = fbnic_ptp_setup(fbd);
338 fbnic_ptp_destroy(fbd);
340 fbnic_netdev_free(fbd);
348 fbnic_free_irqs(fbd);
350 fbnic_devlink_free(fbd);
365 struct fbnic_dev *fbd = pci_get_drvdata(pdev);
367 if (!fbnic_init_failure(fbd)) {
368 struct net_device *netdev = fbd->netdev;
371 cancel_delayed_work_sync(&fbd->service_task);
372 fbnic_ptp_destroy(fbd);
373 fbnic_netdev_free(fbd);
376 fbnic_hwmon_unregister(fbd);
377 fbnic_dbg_fbd_exit(fbd);
378 fbnic_devlink_unregister(fbd);
379 fbnic_fw_log_free(fbd);
380 fbnic_fw_free_mbx(fbd);
381 fbnic_free_irqs(fbd);
383 fbnic_devlink_free(fbd);
388 struct fbnic_dev *fbd = dev_get_drvdata(dev);
389 struct net_device *netdev = fbd->netdev;
391 if (fbnic_init_failure(fbd))
404 fbnic_fw_log_disable(fbd);
406 devl_lock(priv_to_devlink(fbd));
408 fbnic_fw_free_mbx(fbd);
410 devl_unlock(priv_to_devlink(fbd));
413 fbnic_free_irqs(fbd);
416 WRITE_ONCE(fbd->uc_addr0, NULL);
417 WRITE_ONCE(fbd->uc_addr4, NULL);
424 struct fbnic_dev *fbd = dev_get_drvdata(dev);
425 struct net_device *netdev = fbd->netdev;
432 fbd->uc_addr0 = iomap_table[0];
433 fbd->uc_addr4 = iomap_table[4];
436 err = fbnic_alloc_irqs(fbd);
440 fbd->mac->init_regs(fbd);
442 devl_lock(priv_to_devlink(fbd));
445 err = fbnic_fw_request_mbx(fbd);
449 devl_unlock(priv_to_devlink(fbd));
454 fbnic_fw_log_enable(fbd, list_empty(&fbd->fw_log.entries));
457 if (fbnic_init_failure(fbd))
477 fbnic_fw_log_disable(fbd);
480 fbnic_fw_free_mbx(fbd);
482 fbnic_free_irqs(fbd);
484 WRITE_ONCE(fbd->uc_addr0, NULL);
485 WRITE_ONCE(fbd->uc_addr4, NULL);
491 struct fbnic_dev *fbd = dev_get_drvdata(dev);
492 struct net_device *netdev = fbd->netdev;
495 if (fbnic_init_failure(fbd))