Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F175619749
D58607.id183286.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D58607.id183286.diff
View Options
Index: sys/dev/bnxt/bnxt_en/bnxt.h
===================================================================
--- sys/dev/bnxt/bnxt_en/bnxt.h
+++ sys/dev/bnxt/bnxt_en/bnxt.h
@@ -1327,6 +1327,7 @@
struct bnxt_nvram_info *nvm_info;
bool wol;
bool is_dev_init;
+ bool detached;
struct bnxt_hw_lro hw_lro;
uint8_t wol_filter_id;
uint16_t rx_coal_usecs;
Index: sys/dev/bnxt/bnxt_en/if_bnxt.c
===================================================================
--- sys/dev/bnxt/bnxt_en/if_bnxt.c
+++ sys/dev/bnxt/bnxt_en/if_bnxt.c
@@ -3156,6 +3156,15 @@
struct bnxt_vlan_tag *tmp;
int i;
+ /*
+ * Must be set before anything else below runs: the admin task
+ * (bnxt_update_admin_status(), scheduled once/sec via
+ * iflib_admin_intr_deferred()) is not drained by iflib before
+ * IFDI_DETACH is called, so it can still fire concurrently with
+ * the HWRM/DMA teardown below and must bail out immediately.
+ */
+ softc->detached = true;
+
bnxt_mpc_irq_cleanup(softc);
bnxt_rdma_aux_device_uninit(softc);
cancel_delayed_work_sync(&softc->fw_reset_task);
@@ -4111,6 +4120,9 @@
if (!BNXT_PF(softc))
return;
+ if (softc->detached)
+ return;
+
bnxt_hwrm_port_qstats(softc);
if (BNXT_CHIP_P5_PLUS(softc) &&
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Oct 13, 2:32 AM (7 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40718448
Default Alt Text
D58607.id183286.diff (1 KB)
Attached To
Mode
D58607: if_bnxt: Fix HWRM mailbox/DMA teardown race on detach
Attached
Detach File
Event Timeline
Log In to Comment