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: <D5DF0QIO2UZQ.29U999LYCC05M@rocinante>
Date: Mon, 04 Nov 2024 22:06:35 +0900
From: Krzysztof WilczyƄski <kw@...ux.com>
To: "AngeloGioacchino Del Regno" <angelogioacchino.delregno@...labora.com>,
 <linux-pci@...r.kernel.org>
Cc: <ryder.lee@...iatek.com>, <jianjun.wang@...iatek.com>,
 <lpieralisi@...nel.org>, <robh@...nel.org>, <bhelgaas@...gle.com>,
 <matthias.bgg@...il.com>, <linux-mediatek@...ts.infradead.org>,
 <linux-kernel@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>,
 <kernel@...labora.com>, <fshao@...omium.org>, "Manivannan Sadhasivam"
 <manivannan.sadhasivam@...aro.org>
Subject: Re: [PATCH v4 1/2] PCI: mediatek-gen3: Add support for setting
 max-link-speed limit

Hello,

> +	if (err > 0) {

You could drop > 0 here.

> +		/* Get the maximum speed supported by the controller */
> +		max_speed = mtk_pcie_get_controller_max_link_speed(pcie);
> +
> +		/* Set max_link_speed only if the controller supports it */
> +		if (max_speed >= 0 && max_speed <= err) {
> +			pcie->max_link_speed = err;
> +			dev_dbg(pcie->dev,
> +				"Max controller link speed Gen%d, override to Gen%u",
> +				max_speed, pcie->max_link_speed);
> +		}
> +	}

I wonder if this debug message would be better served as a warning to let
the user know that the speed has been overridden due to the platform
limitation.  Thoughts?

Also, there is no need to sent a new series if you fine with the
suggestions.  I will mend the code on the branch when applying.

	Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ