Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:user5664536:linux
linux
r8169_custom_led.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File r8169_custom_led.patch of Package linux
diff -urN a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c --- a/drivers/net/ethernet/realtek/r8169_main.c 2024-05-25 23:30:56.000000000 +0900 +++ b/drivers/net/ethernet/realtek/r8169_main.c 2024-05-27 09:37:25.034538360 +0900 @@ -10,6 +10,7 @@ */ #include <linux/module.h> +#include <linux/moduleparam.h> #include <linux/pci.h> #include <linux/netdevice.h> #include <linux/etherdevice.h> @@ -167,12 +168,15 @@ MODULE_DEVICE_TABLE(pci, rtl8169_pci_tbl); +static int custom_led = -1; + enum rtl_registers { MAC0 = 0, /* Ethernet hardware address. */ MAC4 = 4, MAR0 = 8, /* Multicast filter. */ CounterAddrLow = 0x10, CounterAddrHigh = 0x14, + CustomLED = 0x18, TxDescStartAddrLow = 0x20, TxDescStartAddrHigh = 0x24, TxHDescStartAddrLow = 0x28, @@ -656,6 +660,8 @@ MODULE_AUTHOR("Realtek and the Linux r8169 crew <netdev@vger.kernel.org>"); MODULE_DESCRIPTION("RealTek RTL-8169 Gigabit Ethernet driver"); +module_param(custom_led, int, 0); +MODULE_PARM_DESC(custom_led, "Custom LED value (try 0x7f0)"); MODULE_SOFTDEP("pre: realtek"); MODULE_LICENSE("GPL"); MODULE_FIRMWARE(FIRMWARE_8168D_1); @@ -3903,6 +3909,11 @@ rtl_hw_aspm_clkreq_enable(tp, true); rtl_set_rx_max_size(tp); rtl_set_rx_tx_desc_registers(tp); + + /* Experiment: Custom LED*/ + if (custom_led != -1) + RTL_W16(tp, CustomLED, custom_led); + rtl_lock_config_regs(tp); rtl_jumbo_config(tp);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor