summaryrefslogtreecommitdiff
path: root/drivers/net/phy/motorcomm.c
AgeCommit message (Collapse)Author
2021-05-30net: phy: abort loading yt8511 driver in unsupported modesPeter Geis
While investigating the clang `ge` uninitialized variable report, it was discovered the default switch would have unintended consequences. Due to the switch to __phy_modify, the driver would modify the ID values in the default scenario. Fix this by promoting the interface mode switch and aborting when the mode is not a supported RGMII mode. This prevents the `ge` and `fe` variables from ever being used uninitialized. Fixes: 48e8c6f1612b ("net: phy: add driver for Motorcomm yt8511 phy") Reported-by: kernel test robot <lkp@intel.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Peter Geis <pgwipeout@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-05-30net: phy: fix yt8511 clang uninitialized variable warningPeter Geis
clang doesn't preinitialize variables. If phy_select_page failed and returned an error, phy_restore_page would be called with `ret` being uninitialized. Even though phy_restore_page won't use `ret` in this scenario, initialize `ret` to silence the warning. Fixes: 48e8c6f1612b ("net: phy: add driver for Motorcomm yt8511 phy") Reported-by: kernel test robot <lkp@intel.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Peter Geis <pgwipeout@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-05-21net: phy: add driver for Motorcomm yt8511 phyPeter Geis
Add a driver for the Motorcomm yt8511 phy that will be used in the production Pine64 rk3566-quartz64 development board. It supports gigabit transfer speeds, rgmii, and 125mhz clk output. Signed-off-by: Peter Geis <pgwipeout@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>