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] [day] [month] [year] [list]
Message-ID: <CAMhs-H-ZES+O07ZbY37xVWqQ0f4YmmR5mz6BGvv43iXz+me2Mg@mail.gmail.com>
Date: Mon, 31 Jul 2023 17:04:57 +0200
From: Sergio Paracuellos <sergio.paracuellos@...il.com>
To: Rafał Miłecki <zajec5@...il.com>
Cc: Lorenzo Bianconi <lorenzo@...nel.org>, Felix Fietkau <nbd@....name>, 
	Matthias Brugger <matthias.bgg@...il.com>, 
	AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>, 
	Arınç ÜNAL <arinc.unal@...nc9.com>, 
	Network Development <netdev@...r.kernel.org>, 
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>, linux-mips@...r.kernel.org, 
	linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>, 
	linux-mediatek <linux-mediatek@...ts.infradead.org>
Subject: Re: MediaTek Frame Engine Ethernet: does it need any resets?

Hi Rafal,

On Sat, Jul 29, 2023 at 1:55 PM Rafał Miłecki <zajec5@...il.com> wrote:
>
> Hi,
>
> I'm trying to understand MediaTek's Ethernet controller resets.
>
> I noticed there is sth fishy when checking dts files. See following
> errors:
>
> arch/mips/boot/dts/ralink/mt7621-tplink-hc220-g5-v1.dtb: ethernet@...00000: resets: [[2, 6], [2, 23]] is too short
>          From schema: Documentation/devicetree/bindings/net/mediatek,net.yaml
> arch/mips/boot/dts/ralink/mt7621-tplink-hc220-g5-v1.dtb: ethernet@...00000: reset-names:1: 'gmac' was expected
>          From schema: Documentation/devicetree/bindings/net/mediatek,net.yaml
> arch/mips/boot/dts/ralink/mt7621-tplink-hc220-g5-v1.dtb: ethernet@...00000: reset-names: ['fe', 'eth'] is too short
>          From schema: Documentation/devicetree/bindings/net/mediatek,net.yaml
> arch/mips/boot/dts/ralink/mt7621-tplink-hc220-g5-v1.dtb: ethernet@...00000: Unevaluated properties are not allowed ('reset-names', 'resets' were unexpected)
>          From schema: Documentation/devicetree/bindings/net/mediatek,net.yaml
>
>
> 1. Binding mediatek,net.yaml
> It says that when present, there must be 3 resets: fe, gmac, ppe
>
> 2. mt7621.dtsi
> It specifies 2 resets: fe, eth
>
> 3. mt7622.dtsi
> It doesn't specify any resets
>
> 4. mt7629.dtsi
> It doesn't specify any resets
>
> 5. drivers/net/ethernet/mediatek/
> I don't see any reset_control_* code at all
>
>
> Can someone help me what's the actual case with resets? Are they needed?
> Are they used?

At least for mt7621 bindings have been released after the ethernet
driver. The driver uses directly register offset for reset through the
system controller syscon [1].

Ideally reset_control APIs should be used since there is already a
reset driver for mt7621 [2]. I don't know about the other SoCs.

Hope this helps.

Best regards,
    Sergio Paracuellos

[1]: https://elixir.bootlin.com/linux/v6.5-rc3/source/drivers/net/ethernet/mediatek/mtk_eth_soc.h#L495
[2]: https://elixir.bootlin.com/linux/v6.5-rc3/source/drivers/clk/ralink/clk-mt7621.c

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ