phy: net: Check that input interface type is gmii
There can't be any other interface as input. Only gmii is allowed. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
This commit is contained in:
@@ -62,6 +62,11 @@ static int xilinxgmiitorgmii_probe(struct phy_device *phydev)
|
||||
|
||||
debug("%s\n", __func__);
|
||||
|
||||
if (phydev->interface != PHY_INTERFACE_MODE_GMII) {
|
||||
printf("Incorrect interface type\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Read the phy address again as the one we read in ethernet driver
|
||||
* was overwritten for the purpose of storing the ofnode
|
||||
|
||||
Reference in New Issue
Block a user