[RFC PATCH 1/5] net: macb: Check MDIO state before read/write and use timeouts

2018-03-22 Thread harinikatakamlinux
From: Harini Katakam Replace the while loop in MDIO read/write functions with a timeout. In addition, add a check for MDIO bus busy before initiating a new operation as well to make sure there is no ongoing MDIO operation. Signed-off-by: Shubhrajyoti Datta Signed-off-by: Harini Katakam --- dr

[RFC PATCH 0/5] Macb power management support for ZynqMP

2018-03-22 Thread harinikatakamlinux
From: Harini Katakam This series adds support for macb suspend/resume with system power down and wake on LAN with ARP packets. In relation to the above, this series also updates mdio_read/write function for PM and adds tsu clock management. Harini Katakam (5): net: macb: Check MDIO state befor

[RFC PATCH 3/5] net: macb: Add pm runtime support

2018-03-22 Thread harinikatakamlinux
From: Harini Katakam Add runtime pm functions and move clock handling there. Enable clocks in mdio read/write functions. Signed-off-by: Shubhrajyoti Datta Signed-off-by: Harini Katakam --- drivers/net/ethernet/cadence/macb_main.c | 105 ++- 1 file changed, 90 inser

[RFC PATCH 2/5] net: macb: Support clock management for tsu_clk

2018-03-22 Thread harinikatakamlinux
From: Harini Katakam TSU clock needs to be enabled/disabled as per support in devicetree and it should also be controlled during suspend/resume (WOL has no dependency on this clock). Signed-off-by: Harini Katakam --- drivers/net/ethernet/cadence/macb.h | 3 ++- drivers/net/ethernet/caden

[RFC PATCH 4/5] net: macb: Add support for suspend/resume with full power down

2018-03-22 Thread harinikatakamlinux
From: Harini Katakam When macb device is suspended and system is powered down, the clocks are removed and hence macb should be closed gracefully and restored upon resume. This patch does the same by switching off the net device, suspending phy and performing necessary cleanup of interrupts and BD

[RFC PATCH 5/5] net: macb: Add WOL support with ARP

2018-03-22 Thread harinikatakamlinux
From: Harini Katakam This patch enables ARP wake event support in GEM through the following: -> WOL capability can be selected based on the SoC/GEM IP version rather than a devictree property alone. Hence add a new capability property and set device as "wakeup capable" in probe in this case. ->

[PATCH v3] net: macb: Handle HRESP error

2018-01-26 Thread harinikatakamlinux
From: Harini Katakam Handle HRESP error by doing a SW reset of RX and TX and re-initializing the descriptors, RX and TX queue pointers. Signed-off-by: Harini Katakam Signed-off-by: Michal Simek --- v3 and v2 changes: Fixed patch formatting errors Rebased on latest net-next and reinitialized mu

[PATCH v2] net: macb: Handle HRESP error

2018-01-26 Thread harinikatakamlinux
From: Harini Katakam Handle HRESP error by doing a SW reset of RX and TX and re-initializing the descriptors, RX and TX queue pointers. Signed-off-by: Harini Katakam Signed-off-by: Michal Simek --- v2: Rebased on top of latest net-next and reinitialized all rx queues. drivers/net/ethernet/ca

[PATCH v2] net: macb: Handle HRESP error

2018-01-26 Thread harinikatakamlinux
From: Harini Katakam Handle HRESP error by doing a SW reset of RX and TX and re-initializing the descriptors, RX and TX queue pointers. Signed-off-by: Harini Katakam Signed-off-by: Michal Simek --- v2: Rebased on top of latest net-next and reinitialized all rx queues. drivers/net/ethernet/ca