Re: [PATCH V1] PCI: dwc: Use dev_info for PCIe link down event logging

Jon Hunter
2022-09-14T15:12:11Z

On 14/09/2022 15:52, Krzysztof Wilczyński wrote:
> Hello,
>
>>> Perhaps it makes sense to make this a dev_dbg() over dev_info(), especially
>>> since it appears that this information is of more use to the developer (who
>>> most likely has the suitable log level set anyway), and given that there is
>>> no way to reliably detect a presence in a slot on some platforms, this
>>> might otherwise, add to the other messages that normal users don't pay
>>> attention to usually - if this is not to be treated as an error.
>>>
>>
>> No, this is clearly not a debug message. As I quoted above, the link up
>> can fail due to an issue with PHY also. In that case, user has to see
>> the log to debug/report the issue.
>
> Apologies! I missed that. Thank you!
>
>> So, either dev_info() or dev_err().
>
> So, there is nothing to do here, then. This stays as dev_err() as per the
> change from:
>
> 14c4ad125cf9 ("PCI: dwc: Log link speed and width if it comes up")

I am not sure I agree. There is a similar change here ...

commit 4b16a8227907118e011fb396022da671a52b2272
Author: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Date: Tue Jun 18 23:32:06 2019 +0530

PCI: tegra: Change link retry log level to debug

If we have a way to determine if a card/device is connected then dev_err
is appropriate, but if not then dev_dbg/info are appropriate IMO.

Jon

--
nvpublic