summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-09-10 21:21:51 -0700
committerDavid S. Miller <davem@davemloft.net>2016-09-10 21:21:51 -0700
commit55fdbb01b19fbc16e633ae4f5bc3d61f18dce897 (patch)
treeeb402961d33d629479e50266cc5cae873059d1a9 /include
parent48b4e51fa7ede17830a2655ed6edde2c738c4461 (diff)
parentf1ee87fe55c86d4c5adc804db15b3ed06169fba5 (diff)
downloadlinux-55fdbb01b19fbc16e633ae4f5bc3d61f18dce897.tar.gz
linux-55fdbb01b19fbc16e633ae4f5bc3d61f18dce897.tar.bz2
linux-55fdbb01b19fbc16e633ae4f5bc3d61f18dce897.zip
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 <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mlx5/driver.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index 5cb9fa7aec61..85c4786427e4 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -828,8 +828,6 @@ void mlx5_pagealloc_init(struct mlx5_core_dev *dev);
void mlx5_pagealloc_cleanup(struct mlx5_core_dev *dev);
int mlx5_pagealloc_start(struct mlx5_core_dev *dev);
void mlx5_pagealloc_stop(struct mlx5_core_dev *dev);
-int mlx5_sriov_init(struct mlx5_core_dev *dev);
-int mlx5_sriov_cleanup(struct mlx5_core_dev *dev);
void mlx5_core_req_pages_handler(struct mlx5_core_dev *dev, u16 func_id,
s32 npages);
int mlx5_satisfy_startup_pages(struct mlx5_core_dev *dev, int boot);
@@ -932,6 +930,8 @@ enum {
struct mlx5_interface {
void * (*add)(struct mlx5_core_dev *dev);
void (*remove)(struct mlx5_core_dev *dev, void *context);
+ int (*attach)(struct mlx5_core_dev *dev, void *context);
+ void (*detach)(struct mlx5_core_dev *dev, void *context);
void (*event)(struct mlx5_core_dev *dev, void *context,
enum mlx5_dev_event event, unsigned long param);
void * (*get_dev)(void *context);