Here's a patch to the e1000 emulated device that allows it to work with
drivers we've written for Phar Lap ETS, an RTOS we use on some of our
products. Please consider this for inclusion in VirtualBox. I won't claim
to have done exhaustive regression testing, but the e1000 driver for a
Windows 7 64-bit VM seems to run just fine with this patch applied. The
patch is against 4.3.8 OSE, but applied cleanly to public SVN.
Author: Jeff Westfahl <[email protected]>
License: Patch is under MIT license
Regards,
Jeff Westfahl
diff --git a/src/VBox/Devices/Network/DevE1000.cpp b/src/VBox/Devices/Network/DevE1000.cpp
index b8f9ebf..34ded4e 100755
--- a/src/VBox/Devices/Network/DevE1000.cpp
+++ b/src/VBox/Devices/Network/DevE1000.cpp
@@ -2815,8 +2815,12 @@ static int e1kRegWriteMDIC(PE1KSTATE pThis, uint32_t offset, uint32_t index, uin
}
else if (GET_BITS_V(value, MDIC, PHY) != 1)
{
- E1kLog(("%s ERROR! Access to invalid PHY detected, phy=%d.\n",
- pThis->szPrf, GET_BITS_V(value, MDIC, PHY)));
+ /*
+ * Some drivers scan the MDIO bus for a PHY. We can work with these
+ * drivers if we just set MDIC_READY when there isn't a PHY at the
+ * requested address.
+ */
+ MDIC = MDIC_READY;
}
else
{
@@ -3090,7 +3094,14 @@ static int e1kRegWriteRDT(PE1KSTATE pThis, uint32_t offset, uint32_t index, uint
if (RT_LIKELY(rc == VINF_SUCCESS))
{
E1kLog(("%s e1kRegWriteRDT\n", pThis->szPrf));
- rc = e1kRegWriteDefault(pThis, offset, index, value);
+ /*
+ * Some drivers advance RDT too far, so that it equals RDH. This
+ * somehow manages to work with real hardware but not with this
+ * emulated device. We can work with these drivers if we just
+ * ignore writes to RDT that equal RDH.
+ */
+ if (value != RDH)
+ rc = e1kRegWriteDefault(pThis, offset, index, value);
#ifdef E1K_WITH_RXD_CACHE
/*
* We need to fetch descriptors now as RDT may go whole circle
_______________________________________________
vbox-dev mailing list
[email protected]
https://www.virtualbox.org/mailman/listinfo/vbox-dev