mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-14 08:34:02 +08:00
bnx2x: Add known PHY type check
The populate function will fail in case an unknown external PHY is detected. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ec15b898a4
commit
6db5193b29
@ -11489,6 +11489,10 @@ static int bnx2x_populate_ext_phy(struct bnx2x *bp,
|
||||
return -EINVAL;
|
||||
default:
|
||||
*phy = phy_null;
|
||||
/* In case external PHY wasn't found */
|
||||
if ((phy_type != PORT_HW_CFG_XGXS_EXT_PHY_TYPE_DIRECT) &&
|
||||
(phy_type != PORT_HW_CFG_XGXS_EXT_PHY_TYPE_NOT_CONN))
|
||||
return -EINVAL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user