Re: [PATCH] sungem: fix PHY initialization hardware failure check and pointe style
From: Andrew Lunn
Date: Thu Apr 02 2026 - 16:04:36 EST
On Thu, Apr 02, 2026 at 07:42:35PM +0000, Joel wrote:
> Currently, bcm5411_init does not validate the result of the PHY register
> reads. This can lead to silent failures if the hardware is unresponsive
> or the MDIO bus times out, as 0xffff would be treated as valid data.
>
> This patch:
> 1: Adds a check for -EIO and 0xffff during BCM5411 initialization.
> 2: Updates gem_init_phy to log an error message fi the PHY-
> specific init fails.
> 3: Cleans up pointer formatting(eg,. foo* bar to foo *bar) to
> align with Linux Kernel Coding Style in the modified files.
A patch which does three things should probably be three patches. We
want lots of small patches, with good commit messages, which are
obviously correct.
Code style changes should definitely be in a different patch to real
changes.
https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html
Andrew
---
pw-bot: cr