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: <0ff20687-74de-4e63-90f4-57cf06795990@redhat.com>
Date: Tue, 3 Sep 2024 13:59:14 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Jijie Shao <shaojijie@...wei.com>, davem@...emloft.net,
 edumazet@...gle.com, kuba@...nel.org
Cc: shenjian15@...wei.com, wangpeiyang1@...wei.com, liuyonglong@...wei.com,
 chenhao418@...wei.com, sudongming1@...wei.com, xujunsheng@...wei.com,
 shiyongbang@...wei.com, libaihan@...wei.com, andrew@...n.ch,
 jdamato@...tly.com, horms@...nel.org, jonathan.cameron@...wei.com,
 shameerali.kolothum.thodi@...wei.com, salil.mehta@...wei.com,
 netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V6 net-next 03/11] net: hibmcge: Add mdio and hardware
 configuration supported in this module

On 8/30/24 14:15, Jijie Shao wrote:
[...]
> +static int hbg_mdio_wait_ready(struct hbg_mac *mac)
> +{
> +#define HBG_MDIO_OP_TIMEOUT_US		(1 * 1000 * 1000)
> +#define HBG_MDIO_OP_INTERVAL_US		(5 * 1000)

Minor nit: I find the define inside the function body less readable than 
placing them just before the function itself.

> +
> +	struct hbg_priv *priv = HBG_MAC_GET_PRIV(mac);
> +	u32 cmd;
> +
> +	return readl_poll_timeout(priv->io_base + HBG_REG_MDIO_COMMAND_ADDR, cmd,
> +				  !FIELD_GET(HBG_REG_MDIO_COMMAND_START_B, cmd),
> +				  HBG_MDIO_OP_INTERVAL_US,
> +				  HBG_MDIO_OP_TIMEOUT_US);
> +}

[...]> +static void hbg_phy_adjust_link(struct net_device *netdev)
> +{
> +	struct hbg_priv *priv = netdev_priv(netdev);
> +	struct phy_device *phydev = priv->mac.phydev;

Minor nit: please respect the reverse x-mas tree order

Thanks,

Paolo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ