
-----Original Message----- From: Gong Qianyu [mailto:Qianyu.Gong@freescale.com] Sent: Thursday, October 15, 2015 6:33 PM To: u-boot@lists.denx.de Cc: Hu Mingkai-B21284 Mingkai.Hu@freescale.com; Sun York-R58495 yorksun@freescale.com; Hou Zhiqiang-B48286 B48286@freescale.com; Xie Shaohui-B21989 Shaohui.Xie@freescale.com; Song Wenbin-B53747 Wenbin.Song@freescale.com; Wood Scott-B07421 scottwood@freescale.com; Kushwaha Prabhakar-B32579 prabhakar@freescale.com; Wang Huan-B18965 alison.wang@freescale.com; Gong Qianyu-B52263 Qianyu.Gong@freescale.com Subject: [Patch V5 07/17] net/fm: bug fix when CONFIG_PHYLIB not defined
From: Shaohui Xie Shaohui.Xie@freescale.com
phy_shutdown should be wrapped by CONFIG_PHYLIB.
Signed-off-by: Shaohui Xie Shaohui.Xie@freescale.com Signed-off-by: Mingkai Hu Mingkai.Hu@freescale.com Signed-off-by: Gong Qianyu Qianyu.Gong@freescale.com
V5:
- No change.
V4:
- No change.
V3:
- New patch.
drivers/net/fm/eth.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/drivers/net/fm/eth.c b/drivers/net/fm/eth.c index d7d064b..1b62fd8 100644 --- a/drivers/net/fm/eth.c +++ b/drivers/net/fm/eth.c @@ -483,8 +483,10 @@ static void fm_eth_halt(struct eth_device *dev) /* disable bmi Rx port */ bmi_rx_port_disable(fm_eth->rx_port);
+#ifdef CONFIG_PHYLIB if (fm_eth->phydev) phy_shutdown(fm_eth->phydev); +#endif }
static int fm_eth_send(struct eth_device *dev, void *buf, int len)
Thanks for fixing the bug.
I tried by #undef CONFIG_PHYLIB in drivers/net/fm/eth.c and got following warnings for B4860QDS_defconfig. I guess similar warning will be there for LS1043 also. Can you please check and if required fix it.
drivers/net/fm/eth.c: In function 'init_phy': drivers/net/fm/eth.c:627:6: warning: unused variable 'supported' [-Wunused-variable] u32 supported; ^ drivers/net/fm/eth.c:626:21: warning: unused variable 'phydev' [-Wunused-variable] struct phy_device *phydev = NULL; ^ drivers/net/fm/eth.c:625:17: warning: unused variable 'fm_eth' [-Wunused-variable] struct fm_eth *fm_eth = dev->priv; ^ drivers/net/fm/eth.c: At top level: drivers/net/fm/eth.c:84:13: warning: 'dtsec_init_phy' defined but not used [-Wunused-function] static void dtsec_init_phy(struct eth_device *dev) ^ drivers/net/fm/eth.c:99:12: warning: 'tgec_is_fibre' defined but not used [-Wunused-function] static int tgec_is_fibre(struct eth_device *dev)
--prabhakar