Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F149553200
D32333.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
897 B
Referenced Files
None
Subscribers
None
D32333.diff
View Options
diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c
--- a/sys/dev/e1000/if_em.c
+++ b/sys/dev/e1000/if_em.c
@@ -4510,20 +4510,27 @@
static void
em_print_nvm_info(struct e1000_softc *sc)
{
+ struct e1000_hw *hw = &sc->hw;
+ struct sx *iflib_ctx_lock = iflib_ctx_lock_get(sc->ctx);
u16 eeprom_data;
int i, j, row = 0;
/* Its a bit crude, but it gets the job done */
printf("\nInterface EEPROM Dump:\n");
printf("Offset\n0x0000 ");
+
+ /* We rely on the IFLIB_CTX_LOCK as part of NVM locking model */
+ sx_xlock(iflib_ctx_lock);
+ ASSERT_CTX_LOCK_HELD(hw);
for (i = 0, j = 0; i < 32; i++, j++) {
if (j == 8) { /* Make the offset block */
j = 0; ++row;
printf("\n0x00%x0 ",row);
}
- e1000_read_nvm(&sc->hw, i, 1, &eeprom_data);
+ e1000_read_nvm(hw, i, 1, &eeprom_data);
printf("%04x ", eeprom_data);
}
+ sx_xunlock(iflib_ctx_lock);
printf("\n");
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 26, 5:35 AM (3 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30365479
Default Alt Text
D32333.diff (897 B)
Attached To
Mode
D32333: e1000: print EEPROM/NVM/OROM versions
Attached
Detach File
Event Timeline
Log In to Comment