While teaching a class in Linux driver design and using VirtualBox's
E1000 device as a learning tool, we found that the LEDCTL register was
not usable as is was set as Unimplemented. I understand that there are
no actual LEDs to blink, but it would be handy if we could read and write
values into the register in order to use our own LED emulation.
Sorry I don't have the full svn setup to do a proper patch format, but
here's what I have in mind:
$ diff -up src/VBox/Devices/Network/DevE1000.cpp.orig
src/VBox/Devices/Network/DevE1000.cpp
--- src/VBox/Devices/Network/DevE1000.cpp.orig 2018-08-22 17:03:36.497865741
-0700
+++ src/VBox/Devices/Network/DevE1000.cpp 2018-08-22 17:04:39.644216162
-0700
@@ -1393,7 +1393,7 @@ static const struct E1kRegMap_st
{ 0x00400, 0x00004, 0x017FFFFA, 0x017FFFFA, e1kRegReadDefault ,
e1kRegWriteDefault , "TCTL" , "Transmit Control" },
{ 0x00410, 0x00004, 0x3FFFFFFF, 0x3FFFFFFF, e1kRegReadDefault ,
e1kRegWriteDefault , "TIPG" , "Transmit IPG" },
{ 0x00458, 0x00004, 0x0000FFFF, 0x0000FFFF, e1kRegReadDefault ,
e1kRegWriteDefault , "AIFS" , "Adaptive IFS Throttle - AIT" },
- { 0x00e00, 0x00004, 0xFFFFFFFF, 0xFFFFFFFF, e1kRegReadUnimplemented,
e1kRegWriteUnimplemented, "LEDCTL" , "LED Control" },
+ { 0x00e00, 0x00004, 0xFFFFFFFF, 0xFFFFFFFF, e1kRegReadDefault ,
e1kRegWriteDefault , "LEDCTL" , "LED Control" },
{ 0x01000, 0x00004, 0xFFFF007F, 0x0000007F, e1kRegReadDefault ,
e1kRegWritePBA , "PBA" , "Packet Buffer Allocation" },
{ 0x02160, 0x00004, 0xFFFFFFFF, 0xFFFFFFFF, e1kRegReadUnimplemented,
e1kRegWriteUnimplemented, "FCRTL" , "Flow Control Receive Threshold Low" },
{ 0x02168, 0x00004, 0xFFFFFFFF, 0xFFFFFFFF, e1kRegReadUnimplemented,
e1kRegWriteUnimplemented, "FCRTH" , "Flow Control Receive Threshold High" },
Cheers,
sln
--
==================================================
Shannon Nelson [email protected]
Parents can't afford to be squeamish
_______________________________________________
vbox-dev mailing list
[email protected]
https://www.virtualbox.org/mailman/listinfo/vbox-dev