From: David S. Miller Date: Sun, 11 Sep 2016 04:21:51 +0000 (-0700) Subject: Merge branch 'mlx5-next' X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=55fdbb01b19fbc16e633ae4f5bc3d61f18dce897;p=linux-beck.git Merge branch 'mlx5-next' Saeed Mahameed says: ==================== Mellanox 100G mlx5 seamless error recovery This series from Mohamad improves the driver load/unload flows to seamlessly handle pci errors and device internal errors recovery reset flows. Current pci and internal error handling is too heavy and is done with a full restart of the driver by unregistering mlx5 interfaces (mlx5e netedevs and mlx5_ib) which will cause losing all the current interfaces and mlx5 core configurations. To improve this, we add new callback functions of mlx5 interface object (attach/detach) to be called upon reset flows when errors are detected rather than calling register and unregister interfaces. On their side, interfaces such as (mlx5e and mlx5_ib) can choose to implement those callback, if not, the old heavy reset will be called for that interface. For non-interface mlx5 modules such as sriov and eswitch, we refactored and reorganized the code in a way that the software state objects are created only once on driver load. Those software state objects are kept upon reset recovery flows and only freed once on driver unload. On seamless soft reset flows, only hardware resources are released on stop and re-allocated on start according to the current soft state. In this series only mlx5e interface implements attach/detach callbacks so that the netdevice will be kept alive on reset. On detach only hardware resources are released and the netdevice will be marked as detached to the stack. Once attached again it will re-allocate the hardware resources according to the current netdevice state, and all the configurations and the software state will be kept or restored after recovery. Note: I will be out of office all next week, in case of any updates or V2 is required, Tariq will post the new series, I hope it is ok. ==================== Signed-off-by: David S. Miller --- 55fdbb01b19fbc16e633ae4f5bc3d61f18dce897