Define yet another magic number. The definition was copied from: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/net/ethernet/intel/e1000e/defines.h?h=v6.0.9#n374
Signed-off-by: Akihiko Odaki <akihiko.od...@daynix.com> --- hw/net/e1000_regs.h | 7 +++++++ hw/net/e1000e_core.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/net/e1000_regs.h b/hw/net/e1000_regs.h index 9d423f6c09..214ba0f6f2 100644 --- a/hw/net/e1000_regs.h +++ b/hw/net/e1000_regs.h @@ -571,6 +571,13 @@ /* PHY Link Partner Ability Register */ #define MII_LPAR_LPACK 0x4000 /* Acked by link partner */ +/* SW Semaphore Register */ +#define E1000_SWSM_SMBI 0x00000001 /* Driver Semaphore bit */ +#define E1000_SWSM_SWESMBI 0x00000002 /* FW Semaphore bit */ +#define E1000_SWSM_DRV_LOAD 0x00000008 /* Driver Loaded Bit */ + +#define E1000_SWSM2_LOCK 0x00000002 /* Secondary driver semaphore bit */ + /* Interrupt Cause Read */ #define E1000_ICR_TXDW 0x00000001 /* Transmit desc written back */ #define E1000_ICR_TXQE 0x00000002 /* Transmit Queue empty */ diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c index fc9cdb4528..a560fcb580 100644 --- a/hw/net/e1000e_core.c +++ b/hw/net/e1000e_core.c @@ -2634,7 +2634,7 @@ static uint32_t e1000e_mac_swsm_read(E1000ECore *core, int index) { uint32_t val = core->mac[SWSM]; - core->mac[SWSM] = val | 1; + core->mac[SWSM] = val | E1000_SWSM_SMBI; return val; } -- 2.38.1