- Replace Linux workqueue (struct workqueue_struct, bnxt_pf_wq) with a FreeBSD taskqueue (bnxt_taskq) shared by every attached PF. bnxt_taskq is created once at module load and destroyed once at module unload (SYSINIT/SYSUNINIT on SI_SUB_KLD), matching the module-owned-taskqueue idiom used elsewhere in the tree (e.g. sys/dev/cxgbe/t4_main.c's reset_tq). This replaces an earlier lazy, per-attach/detach create-or-reuse scheme guarded by a mutex and a "ready" flag, which had a real race: bnxt_queue_sp_work()/bnxt_queue_fw_reset_work() and bnxt_attach_pre() re-read the bnxt_taskq/bnxt_taskq_ready globals outside the mutex right after the lazy-init call returned, so a concurrent bnxt_detach() on another PF freeing the shared queue once bnxt_num_pfs hit 0 could race a still-attached PF into enqueuing onto a freed taskqueue. Tying the taskqueue's lifetime to the module instead of to any one PF's attach/detach removes that race outright, since the module can't unload while a PF is still attached.
- Replace struct work_struct sp_task with struct task sp_task; replace struct delayed_work fw_reset_task with struct timeout_task fw_reset_tmo.
- Replace INIT_WORK/INIT_DELAYED_WORK with TASK_INIT/TIMEOUT_TASK_INIT; queue_work/schedule_work with taskqueue_enqueue; queue_delayed_work/schedule_delayed_work with taskqueue_enqueue_timeout; cancel_work_sync/cancel_delayed_work_sync with taskqueue_drain/taskqueue_drain_timeout.
- Rename bnxt_fw_reset_task(struct work_struct *) to bnxt_fw_reset_timeout_task(void *ctx, int pending) to match FreeBSD timeout_task callback signature.
- Add inline helpers in bnxt.h to wrap all Linux test_bit/set_bit/ clear_bit/test_and_clear_bit calls on softc->state and softc->sp_event: bnxt_drv_state_test/set/clear/test_and_clear, bnxt_sp_event_set/test_and_clear (implemented via bit_test() from <sys/bitstring.h> and atomic_testandset_long()/ atomic_testandclear_long(), all bit-index based like the Linux bitops they replace).
- Replace struct mutex lock in bnxt_fw_health with struct mtx; mutex_init to mtx_init.
- Replace kzalloc/kfree with malloc/free (M_DEVBUF).
- Replace DIV_ROUND_UP with howmany; hweight32 with bitcount32.
- Replace jiffies/HZ with ticks/hz; msleep with pause_sbt(). Since ticks (unlike LinuxKPI's unsigned long jiffies) is a 32-bit volatile int that wraps every ~24 days at hz=1000, BNXT_TIME_AFTER and bnxt_sleep_until_min_elapsed() compute the ticks delta as int (matching the in-tree wraparound-safe idiom used elsewhere, e.g. sys/dev/axgbe/xgbe-mdio.c) rather than widening it to long/ unsigned long, so the comparison stays correct across a wrap.
- Replace IS_ERR_OR_NULL/ERR_PTR with plain NULL checks.