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:
Michal Simek
2019-02-15 11:18:53 +01:00
parent 25815c99c0
commit e3a6f1b5f3

View File

@@ -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