Commits
![Murali Karicheri](https://secure.gravatar.com/avatar/d0068e4b3ac65b99212b0877f48ec546.jpg?s=96&d=mm)
Murali Karicheri committed 89ae47a7e76
net: ti: prueth_core: move prueth_hostinit() to inside ndo_open() As preparatory patch to introduce support for additional Ethernet types, move prueth_hostinit() to inside ndo_open() as prueth_hostinit() is common across all Ethernet types and make sense to do it as part of ndo_open() since driver needs to support run time changing of Ethernet type. Currently Ethernet type is set inside prueth_change_to_switch_mode() or prueth_change_to_emac_mode() and prueth_hostinit() is invoked there. So move this to inside ndo_open(). Now that driver always do rproc_set_firmware() in ndo_open() based on Ethernet type, remove the restore of firmware names to EMAC firmware in prueth_sw_shutdown_prus(). For switch based firmwarem there are common resources to be initialized when the first port is initialized which are done part of prueth_hostinit(). So introduce a mutex to enter the critical region inside ndo_open() for initialization and in ndo_stop() when last port is down. Also set emac_configured at the end after the port is enabled and use proper input to prueth_port_enable() call. Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>