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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <32897bd5-4b53-4280-a5c0-5765cfe5b7d6@gmail.com>
Date: Wed, 7 Feb 2024 17:39:37 +0100
From: Eric Woudstra <ericwouds@...il.com>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
Cc: "David S. Miller" <davem@...emloft.net>,
 Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
 Paolo Abeni <pabeni@...hat.com>, Rob Herring <robh+dt@...nel.org>,
 Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
 Conor Dooley <conor+dt@...nel.org>, Andrew Lunn <andrew@...n.ch>,
 Heiner Kallweit <hkallweit1@...il.com>,
 Matthias Brugger <matthias.bgg@...il.com>,
 AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
 Frank Wunderlich <frank-w@...lic-files.de>,
 Daniel Golle <daniel@...rotopia.org>, Lucien Jheng
 <lucien.jheng@...oha.com>, Zhi-Jun You <hujy652@...tonmail.com>,
 netdev@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH net-next 2/2] net: phy: air_en8811h: Add the Airoha
 EN8811H PHY driver

Hi Russell,

Thanks for your suggestions, I will change it accordingly.

> Searching the driver for "air_buckpbus_reg_read", there are four
> instances where you read-modify-write, and only one instance which is
> just a read.
> 
> I wonder whether it would make more sense to structure the accessors as
> 
> 	__air_buckpbus_set_address(phydev, addr)
> 	__air_buckpbus_read(phydev, *data)
> 	__air_buckpbus_write(phydev, data)
> 
> which would make implementing reg_read, reg_write and reg_modify()
> easier, and the addition of reg_modify() means that (a) there are less
> bus cycles (through having to set the address twice) and (b) ensures
> that the read-modify-write can be done atomically on the bus. This
> assumes that reading data doesn't auto-increment the address (which
> you would need to check.)

I will see if I can change the code to:

        __air_buckpbus_set_address(phydev, addr)
        __air_buckpbus_read(phydev, *data)
        __air_buckpbus_write(phydev, data)
        air_buckpbus_reg_read()
        air_buckpbus_reg_write()
        air_buckpbus_reg_modify()

While not changing (except if (saved_page >= 0)):

        __air_write_buf()
        air_write_buf()

> While you only support 2500base-T, is there any reason not to use
> linkmode_adv_to_mii_10gbt_adv_t() ?

I will change it to use linkmode_adv_to_mii_10gbt_adv_t().

Best Regards,

Eric Woudstra

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ