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: <20240515.192938.1400783775062196516.fujita.tomonori@gmail.com>
Date: Wed, 15 May 2024 19:29:38 +0900 (JST)
From: FUJITA Tomonori <fujita.tomonori@...il.com>
To: naveenm@...vell.com
Cc: fujita.tomonori@...il.com, netdev@...r.kernel.org, andrew@...n.ch,
 horms@...nel.org, kuba@...nel.org, jiri@...nulli.us, pabeni@...hat.com,
 linux@...linux.org.uk, hfdevel@....net
Subject: Re: [PATCH net-next v6 5/6] net: tn40xx: add mdio bus support

Hi,

On Mon, 13 May 2024 09:40:08 +0000
Naveen Mamindlapalli <naveenm@...vell.com> wrote:

>> +static u32 tn40_mdio_stat(struct tn40_priv *priv) {
>> +	void __iomem *regs = priv->regs;
>> +
>> +	return readl(regs + TN40_REG_MDIO_CMD_STAT); }
>> +
>> +static int tn40_mdio_get(struct tn40_priv *priv, u32 *val) {
> 
> The argument "val" is not used inside this function.

Oops, I'll fix in v7.


>> +static int tn40_mdio_write(struct tn40_priv *priv, int port, int device,
>> +			   u16 regnum, u16 data)
>> +{
>> +	void __iomem *regs = priv->regs;
>> +	u32 tmp_reg = 0;
>> +	int ret;
>> +
>> +	/* wait until MDIO is not busy */
>> +	if (tn40_mdio_get(priv, NULL))
>> +		return -EIO;
>> +	writel(TN40_MDIO_CMD_VAL(device, port), regs +
>> TN40_REG_MDIO_CMD);
>> +	writel((u32)regnum, regs + TN40_REG_MDIO_ADDR);
>> +	if (tn40_mdio_get(priv, NULL))
>> +		return -EIO;
>> +	writel((u32)data, regs + TN40_REG_MDIO_DATA);
>> +	/* read CMD_STAT until not busy */
>> +	ret = tn40_mdio_get(priv, &tmp_reg);
> 
> Is "tn40_mdio_get()" supposed to return any status in tmp_reg (which is missing?).

Indeed.

Thanks a lot!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ