aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/emulex
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-08-14 13:09:05 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-14 13:09:05 -0400
commite3b1fd56f175526db42ae94c457f29c2fa810aca (patch)
tree3e2948ca44fb7fd5348244c2a83eef864b3110b4 /drivers/net/ethernet/emulex
parent0680eb1f485ba5aac2ee02c9f0622239c9a4b16c (diff)
parentd087f6ad724dfbcdc3df8e0191b80d9d8d839e71 (diff)
Merge tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
Pull infiniband/rdma updates from Roland Dreier: "Main set of InfiniBand/RDMA updates for 3.17 merge window: - MR reregistration support - MAD support for RMPP in userspace - iSER and SRP initiator updates - ocrdma hardware driver updates - other fixes..." * tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (52 commits) IB/srp: Fix return value check in srp_init_module() RDMA/ocrdma: report asic-id in query device RDMA/ocrdma: Update sli data structure for endianness RDMA/ocrdma: Obtain SL from device structure RDMA/uapi: Include socket.h in rdma_user_cm.h IB/srpt: Handle GID change events IB/mlx5: Use ARRAY_SIZE instead of sizeof/sizeof[0] IB/mlx4: Use ARRAY_SIZE instead of sizeof/sizeof[0] RDMA/amso1100: Check for integer overflow in c2_alloc_cq_buf() IPoIB: Remove unnecessary test for NULL before debugfs_remove() IB/mad: Add user space RMPP support IB/mad: add new ioctl to ABI to support new registration options IB/mad: Add dev_notice messages for various umad/mad registration failures IB/mad: Update module to [pr|dev]_* style print messages IB/ipoib: Avoid multicast join attempts with invalid P_key IB/umad: Update module to [pr|dev]_* style print messages IB/ipoib: Avoid flushing the workqueue from worker context IB/ipoib: Use P_Key change event instead of P_Key polling mechanism IB/ipath: Add P_Key change event support mlx4_core: Add support for secure-host and SMP firewall ...
Diffstat (limited to 'drivers/net/ethernet/emulex')
-rw-r--r--drivers/net/ethernet/emulex/benet/be.h1
-rw-r--r--drivers/net/ethernet/emulex/benet/be_main.c1
-rw-r--r--drivers/net/ethernet/emulex/benet/be_roce.c18
-rw-r--r--drivers/net/ethernet/emulex/benet/be_roce.h3
4 files changed, 20 insertions, 3 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h
index 811f1351db7a..43e08d0bc3d3 100644
--- a/drivers/net/ethernet/emulex/benet/be.h
+++ b/drivers/net/ethernet/emulex/benet/be.h
@@ -897,5 +897,6 @@ void be_roce_dev_remove(struct be_adapter *);
897 */ 897 */
898void be_roce_dev_open(struct be_adapter *); 898void be_roce_dev_open(struct be_adapter *);
899void be_roce_dev_close(struct be_adapter *); 899void be_roce_dev_close(struct be_adapter *);
900void be_roce_dev_shutdown(struct be_adapter *);
900 901
901#endif /* BE_H */ 902#endif /* BE_H */
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index db4ff14ff18f..9cdeda54674a 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -5014,6 +5014,7 @@ static void be_shutdown(struct pci_dev *pdev)
5014 if (!adapter) 5014 if (!adapter)
5015 return; 5015 return;
5016 5016
5017 be_roce_dev_shutdown(adapter);
5017 cancel_delayed_work_sync(&adapter->work); 5018 cancel_delayed_work_sync(&adapter->work);
5018 cancel_delayed_work_sync(&adapter->func_recovery_work); 5019 cancel_delayed_work_sync(&adapter->func_recovery_work);
5019 5020
diff --git a/drivers/net/ethernet/emulex/benet/be_roce.c b/drivers/net/ethernet/emulex/benet/be_roce.c
index 5bf16603a3e9..ef4672dc7357 100644
--- a/drivers/net/ethernet/emulex/benet/be_roce.c
+++ b/drivers/net/ethernet/emulex/benet/be_roce.c
@@ -120,7 +120,8 @@ static void _be_roce_dev_open(struct be_adapter *adapter)
120{ 120{
121 if (ocrdma_drv && adapter->ocrdma_dev && 121 if (ocrdma_drv && adapter->ocrdma_dev &&
122 ocrdma_drv->state_change_handler) 122 ocrdma_drv->state_change_handler)
123 ocrdma_drv->state_change_handler(adapter->ocrdma_dev, 0); 123 ocrdma_drv->state_change_handler(adapter->ocrdma_dev,
124 BE_DEV_UP);
124} 125}
125 126
126void be_roce_dev_open(struct be_adapter *adapter) 127void be_roce_dev_open(struct be_adapter *adapter)
@@ -136,7 +137,8 @@ static void _be_roce_dev_close(struct be_adapter *adapter)
136{ 137{
137 if (ocrdma_drv && adapter->ocrdma_dev && 138 if (ocrdma_drv && adapter->ocrdma_dev &&
138 ocrdma_drv->state_change_handler) 139 ocrdma_drv->state_change_handler)
139 ocrdma_drv->state_change_handler(adapter->ocrdma_dev, 1); 140 ocrdma_drv->state_change_handler(adapter->ocrdma_dev,
141 BE_DEV_DOWN);
140} 142}
141 143
142void be_roce_dev_close(struct be_adapter *adapter) 144void be_roce_dev_close(struct be_adapter *adapter)
@@ -148,6 +150,18 @@ void be_roce_dev_close(struct be_adapter *adapter)
148 } 150 }
149} 151}
150 152
153void be_roce_dev_shutdown(struct be_adapter *adapter)
154{
155 if (be_roce_supported(adapter)) {
156 mutex_lock(&be_adapter_list_lock);
157 if (ocrdma_drv && adapter->ocrdma_dev &&
158 ocrdma_drv->state_change_handler)
159 ocrdma_drv->state_change_handler(adapter->ocrdma_dev,
160 BE_DEV_SHUTDOWN);
161 mutex_unlock(&be_adapter_list_lock);
162 }
163}
164
151int be_roce_register_driver(struct ocrdma_driver *drv) 165int be_roce_register_driver(struct ocrdma_driver *drv)
152{ 166{
153 struct be_adapter *dev; 167 struct be_adapter *dev;
diff --git a/drivers/net/ethernet/emulex/benet/be_roce.h b/drivers/net/ethernet/emulex/benet/be_roce.h
index a3d9e96c18eb..e6f7eb1a7d87 100644
--- a/drivers/net/ethernet/emulex/benet/be_roce.h
+++ b/drivers/net/ethernet/emulex/benet/be_roce.h
@@ -62,7 +62,8 @@ struct ocrdma_driver {
62 62
63enum { 63enum {
64 BE_DEV_UP = 0, 64 BE_DEV_UP = 0,
65 BE_DEV_DOWN = 1 65 BE_DEV_DOWN = 1,
66 BE_DEV_SHUTDOWN = 2
66}; 67};
67 68
68/* APIs for RoCE driver to register callback handlers, 69/* APIs for RoCE driver to register callback handlers,