diff options
Diffstat (limited to 'drivers/net/ethernet/freescale/fman/fman_memac.c')
-rw-r--r-- | drivers/net/ethernet/freescale/fman/fman_memac.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/fman/fman_memac.c b/drivers/net/ethernet/freescale/fman/fman_memac.c index 45e98fd8b79e..53ef51e3bd9e 100644 --- a/drivers/net/ethernet/freescale/fman/fman_memac.c +++ b/drivers/net/ethernet/freescale/fman/fman_memac.c @@ -507,6 +507,9 @@ static void setup_sgmii_internal_phy(struct fman_mac *memac, { u16 tmp_reg16; + if (WARN_ON(!memac->pcsphy)) + return; + /* SGMII mode */ tmp_reg16 = IF_MODE_SGMII_EN; if (!fixed_link) @@ -1151,7 +1154,8 @@ struct fman_mac *memac_config(struct fman_mac_params *params) /* Save FMan revision */ fman_get_revision(memac->fm, &memac->fm_rev_info); - if (memac->phy_if == PHY_INTERFACE_MODE_SGMII) { + if (memac->phy_if == PHY_INTERFACE_MODE_SGMII || + memac->phy_if == PHY_INTERFACE_MODE_QSGMII) { if (!params->internal_phy_node) { pr_err("PCS PHY node is not available\n"); memac_free(memac); |