Re: [PATCH net-next] net: dlink: add Kconfig option for RMON registers
From: Jakub Kicinski
Date: Mon May 19 2025 - 19:58:38 EST
On Tue, 20 May 2025 06:40:45 +0900 Moon Yeounsu wrote:
> This patch adds a Kconfig option to enable MMIO for RMON registers.
>
> To read RMON registers, the code `dw32(RmonStatMask, 0x0007ffff);`
> must also be skipped, so this patch adds a preprocessor directive to
> that line as well.
>
> On the `D-Link DGE-550T Rev-A3`, RMON statistics registers can be read
> correctly and statistic data can be collected. However, the behavior on
> other hardware is uncertain, and there may be undiscovered issues even
> on this device. Thus, the default setting is `no`, allowing users to
> enable it manually if necessary.
Kconfig is not a great choice for chip specific logic.
You should check some sort of chip ID register or PCI ID
to match the chip version at runtime. Most users don't compile
their own kernels.
--
pw-bot: cr