[2/2] net/e1000: assume device ID as workaround for Intel 82574L bug in VMware
diff mbox series

Message ID 20200122050940.4695-2-d.c.ddcc@gmail.com
State Deferred
Delegated to: Qi Zhang
Headers show
Series
  • [1/2] net/e1000: add support for NIC loopback
Related show

Checks

Context Check Description
ci/travis-robot success Travis build: passed
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Dominic Chen Jan. 22, 2020, 5:09 a.m. UTC
VMware Workstation 15.5.1 doesn't correctly emulate the PHY_ID_R2 register,
so assume that it has the correct value.

Signed-off-by: Dominic Chen <d.c.ddcc@gmail.com>
---
 drivers/net/e1000/base/e1000_82571.c | 7 +++++++
 1 file changed, 7 insertions(+)

Patch
diff mbox series

diff --git a/drivers/net/e1000/base/e1000_82571.c b/drivers/net/e1000/base/e1000_82571.c
index 157b953cd..9022cbb4a 100644
--- a/drivers/net/e1000/base/e1000_82571.c
+++ b/drivers/net/e1000/base/e1000_82571.c
@@ -153,6 +153,13 @@  STATIC s32 e1000_init_phy_params_82571(struct e1000_hw *hw)
 			ret_val = -E1000_ERR_PHY;
 		break;
 	case e1000_82574:
+		if (phy->id == 0) {
+			RTE_LOG(WARNING, PMD,
+				"Warning: Assuming device ID for Intel 82574 NIC, workaround for VMware Workstation bug\n");
+			/* VMWare Workstation 15.5.1 returns zero */
+			phy->id = BME1000_E_PHY_ID_R2;
+		}
+		/* fall through */
 	case e1000_82583:
 		if (phy->id != BME1000_E_PHY_ID_R2)
 			ret_val = -E1000_ERR_PHY;