DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dominic Chen <d.c.ddcc@gmail.com>
To: Wenzhuo Lu <wenzhuo.lu@intel.com>
Cc: dev@dpdk.org, Dominic Chen <d.c.ddcc@gmail.com>
Subject: [dpdk-dev] [PATCH 2/2] net/e1000: assume device ID as workaround for Intel 82574L bug in VMware
Date: Wed, 22 Jan 2020 00:09:39 -0500	[thread overview]
Message-ID: <20200122050940.4695-2-d.c.ddcc@gmail.com> (raw)
In-Reply-To: <20200122050940.4695-1-d.c.ddcc@gmail.com>

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(+)

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;
-- 
2.17.1


      reply	other threads:[~2020-01-22  5:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-22  5:09 [dpdk-dev] [PATCH 1/2] net/e1000: add support for NIC loopback Dominic Chen
2020-01-22  5:09 ` Dominic Chen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200122050940.4695-2-d.c.ddcc@gmail.com \
    --to=d.c.ddcc@gmail.com \
    --cc=dev@dpdk.org \
    --cc=wenzhuo.lu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).