net/designware: Try configuring phy on each dw_eth_init
authorVipin Kumar <vipin.kumar@st.com>
Mon, 26 Mar 2012 00:09:56 +0000 (00:09 +0000)
committerJoe Hershberger <joe.hershberger@ni.com>
Wed, 4 Apr 2012 15:47:21 +0000 (10:47 -0500)
commit13edd1706c56371dc6a67f7bef874f6d8b7af8eb
tree47d3dd15ce60a8bfc0ec7b6318f9764bcc6917eb
parentaa51005c3f7e517164fa000d68672041f6c4191f
net/designware: Try configuring phy on each dw_eth_init

Phy autonegotiation works only when the ethernet cable is plugged in.
Since the phy was configured only at the init time, a plugged in cable
was necessary to initialize the phy properly.

This patch keeps a flag to check if the phy initialization has
succeeded, and calls configure_phy routine at every init if this flag
reports otherwise.

Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Amit Virdi <amit.virdi@st.com>
drivers/net/designware.c
drivers/net/designware.h