lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230424125357.55b50cba@kernel.org>
Date:   Mon, 24 Apr 2023 12:53:57 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Feiyang Chen <chris.chenfeiyang@...il.com>,
        Giuseppe Cavallaro <peppe.cavallaro@...com>,
        Alexandre Torgue <alexandre.torgue@...s.st.com>,
        Jose Abreu <joabreu@...opsys.com>
Cc:     netdev@...r.kernel.org
Subject: Re: Help needed: supporting new device with unique register
 bitfields

On Sun, 23 Apr 2023 16:19:11 +0800 Feiyang Chen wrote:
> We are hoping to add support for a new device which shares almost
> identical logic with dwmac1000 (dwmac_lib.c, dwmac1000_core.c, and
> dwmac1000_dma.c), but with significant differences in the register
> bitfields (dwmac_dma.h and dwmac1000.h).
> 
> We are seeking guidance on the best approach to support this new
> device. Any advice on how to proceed would be greatly appreciated.
> 
> Thank you for your time and expertise.

There's no recipe on how to support devices with different register
layout :(  You'll need to find the right balance of (1) indirect calls,
(2) if conditions and (3) static description data that's right for you.

Static description data (e.g. putting register addresses in a struct
and using the members of that struct rather than #defines) is probably
the best but the least flexible.

Adding the stmmac maintainers.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ