OSDN Git Service

net: qcom/emac: Change the order of mac up and sgmii open
authorHemanth Puranik <hpuranik@codeaurora.org>
Mon, 18 Dec 2017 05:57:47 +0000 (11:27 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 18 Dec 2017 18:20:41 +0000 (13:20 -0500)
commitac3241d5c81bf6e85095481435f29a4627ff820e
tree903f1a8ed3c6a288eab8ba5f4e417089996a6add
parentc505873eaece2b4aefd07d339dc7e1400e0235ac
net: qcom/emac: Change the order of mac up and sgmii open

This patch fixes the order of mac_up and sgmii_open for the
reasons noted below:

- If open takes more time(if the SGMII block is not responding or
  if we want to do some delay based task) in this situation we
  will hit NETDEV watchdog
- The main reason : We should signal to upper layers that we are
  ready to receive packets "only" when the entire path is initialized
  not the other way around, this is followed in the reset path where
  we do mac_down, sgmii_reset and mac_up. This also makes the driver
  uniform across the reset and open paths.
- In the future there may be need for delay based tasks to be done in
  sgmii open which will result in NETDEV watchdog
- As per the documentation the order of init should be sgmii, mac, rings
  and DMA

Signed-off-by: Hemanth Puranik <hpuranik@codeaurora.org>
Acked-by: Timur Tabi <timur@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qualcomm/emac/emac.c