diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/core/mad_rmpp.c | 17 | ||||
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_catas.c | 11 | ||||
-rw-r--r-- | drivers/infiniband/hw/nes/nes_nic.c | 1 | ||||
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 7 | ||||
-rw-r--r-- | drivers/net/mlx4/fw.c | 5 |
5 files changed, 33 insertions, 8 deletions
diff --git a/drivers/infiniband/core/mad_rmpp.c b/drivers/infiniband/core/mad_rmpp.c index 57a3c6f947b2..4e0f2829e0e5 100644 --- a/drivers/infiniband/core/mad_rmpp.c +++ b/drivers/infiniband/core/mad_rmpp.c | |||
@@ -37,7 +37,8 @@ | |||
37 | enum rmpp_state { | 37 | enum rmpp_state { |
38 | RMPP_STATE_ACTIVE, | 38 | RMPP_STATE_ACTIVE, |
39 | RMPP_STATE_TIMEOUT, | 39 | RMPP_STATE_TIMEOUT, |
40 | RMPP_STATE_COMPLETE | 40 | RMPP_STATE_COMPLETE, |
41 | RMPP_STATE_CANCELING | ||
41 | }; | 42 | }; |
42 | 43 | ||
43 | struct mad_rmpp_recv { | 44 | struct mad_rmpp_recv { |
@@ -87,18 +88,22 @@ void ib_cancel_rmpp_recvs(struct ib_mad_agent_private *agent) | |||
87 | 88 | ||
88 | spin_lock_irqsave(&agent->lock, flags); | 89 | spin_lock_irqsave(&agent->lock, flags); |
89 | list_for_each_entry(rmpp_recv, &agent->rmpp_list, list) { | 90 | list_for_each_entry(rmpp_recv, &agent->rmpp_list, list) { |
91 | if (rmpp_recv->state != RMPP_STATE_COMPLETE) | ||
92 | ib_free_recv_mad(rmpp_recv->rmpp_wc); | ||
93 | rmpp_recv->state = RMPP_STATE_CANCELING; | ||
94 | } | ||
95 | spin_unlock_irqrestore(&agent->lock, flags); | ||
96 | |||
97 | list_for_each_entry(rmpp_recv, &agent->rmpp_list, list) { | ||
90 | cancel_delayed_work(&rmpp_recv->timeout_work); | 98 | cancel_delayed_work(&rmpp_recv->timeout_work); |
91 | cancel_delayed_work(&rmpp_recv->cleanup_work); | 99 | cancel_delayed_work(&rmpp_recv->cleanup_work); |
92 | } | 100 | } |
93 | spin_unlock_irqrestore(&agent->lock, flags); | ||
94 | 101 | ||
95 | flush_workqueue(agent->qp_info->port_priv->wq); | 102 | flush_workqueue(agent->qp_info->port_priv->wq); |
96 | 103 | ||
97 | list_for_each_entry_safe(rmpp_recv, temp_rmpp_recv, | 104 | list_for_each_entry_safe(rmpp_recv, temp_rmpp_recv, |
98 | &agent->rmpp_list, list) { | 105 | &agent->rmpp_list, list) { |
99 | list_del(&rmpp_recv->list); | 106 | list_del(&rmpp_recv->list); |
100 | if (rmpp_recv->state != RMPP_STATE_COMPLETE) | ||
101 | ib_free_recv_mad(rmpp_recv->rmpp_wc); | ||
102 | destroy_rmpp_recv(rmpp_recv); | 107 | destroy_rmpp_recv(rmpp_recv); |
103 | } | 108 | } |
104 | } | 109 | } |
@@ -260,6 +265,10 @@ static void recv_cleanup_handler(struct work_struct *work) | |||
260 | unsigned long flags; | 265 | unsigned long flags; |
261 | 266 | ||
262 | spin_lock_irqsave(&rmpp_recv->agent->lock, flags); | 267 | spin_lock_irqsave(&rmpp_recv->agent->lock, flags); |
268 | if (rmpp_recv->state == RMPP_STATE_CANCELING) { | ||
269 | spin_unlock_irqrestore(&rmpp_recv->agent->lock, flags); | ||
270 | return; | ||
271 | } | ||
263 | list_del(&rmpp_recv->list); | 272 | list_del(&rmpp_recv->list); |
264 | spin_unlock_irqrestore(&rmpp_recv->agent->lock, flags); | 273 | spin_unlock_irqrestore(&rmpp_recv->agent->lock, flags); |
265 | destroy_rmpp_recv(rmpp_recv); | 274 | destroy_rmpp_recv(rmpp_recv); |
diff --git a/drivers/infiniband/hw/mthca/mthca_catas.c b/drivers/infiniband/hw/mthca/mthca_catas.c index 056b2a4c6970..0aa0110e4b6c 100644 --- a/drivers/infiniband/hw/mthca/mthca_catas.c +++ b/drivers/infiniband/hw/mthca/mthca_catas.c | |||
@@ -68,11 +68,16 @@ static void catas_reset(struct work_struct *work) | |||
68 | spin_unlock_irq(&catas_lock); | 68 | spin_unlock_irq(&catas_lock); |
69 | 69 | ||
70 | list_for_each_entry_safe(dev, tmpdev, &tlist, catas_err.list) { | 70 | list_for_each_entry_safe(dev, tmpdev, &tlist, catas_err.list) { |
71 | struct pci_dev *pdev = dev->pdev; | ||
71 | ret = __mthca_restart_one(dev->pdev); | 72 | ret = __mthca_restart_one(dev->pdev); |
73 | /* 'dev' now is not valid */ | ||
72 | if (ret) | 74 | if (ret) |
73 | mthca_err(dev, "Reset failed (%d)\n", ret); | 75 | printk(KERN_ERR "mthca %s: Reset failed (%d)\n", |
74 | else | 76 | pci_name(pdev), ret); |
75 | mthca_dbg(dev, "Reset succeeded\n"); | 77 | else { |
78 | struct mthca_dev *d = pci_get_drvdata(pdev); | ||
79 | mthca_dbg(d, "Reset succeeded\n"); | ||
80 | } | ||
76 | } | 81 | } |
77 | 82 | ||
78 | mutex_unlock(&mthca_device_mutex); | 83 | mutex_unlock(&mthca_device_mutex); |
diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c index 538e409d4515..e593af3354b8 100644 --- a/drivers/infiniband/hw/nes/nes_nic.c +++ b/drivers/infiniband/hw/nes/nes_nic.c | |||
@@ -1566,7 +1566,6 @@ static const struct net_device_ops nes_netdev_ops = { | |||
1566 | .ndo_set_mac_address = nes_netdev_set_mac_address, | 1566 | .ndo_set_mac_address = nes_netdev_set_mac_address, |
1567 | .ndo_set_multicast_list = nes_netdev_set_multicast_list, | 1567 | .ndo_set_multicast_list = nes_netdev_set_multicast_list, |
1568 | .ndo_change_mtu = nes_netdev_change_mtu, | 1568 | .ndo_change_mtu = nes_netdev_change_mtu, |
1569 | .ndo_set_mac_address = eth_mac_addr, | ||
1570 | .ndo_validate_addr = eth_validate_addr, | 1569 | .ndo_validate_addr = eth_validate_addr, |
1571 | .ndo_vlan_rx_register = nes_netdev_vlan_rx_register, | 1570 | .ndo_vlan_rx_register = nes_netdev_vlan_rx_register, |
1572 | }; | 1571 | }; |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c index 25874fc680c9..8763c1ea5eb4 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c | |||
@@ -362,12 +362,19 @@ void ipoib_mcast_carrier_on_task(struct work_struct *work) | |||
362 | { | 362 | { |
363 | struct ipoib_dev_priv *priv = container_of(work, struct ipoib_dev_priv, | 363 | struct ipoib_dev_priv *priv = container_of(work, struct ipoib_dev_priv, |
364 | carrier_on_task); | 364 | carrier_on_task); |
365 | struct ib_port_attr attr; | ||
365 | 366 | ||
366 | /* | 367 | /* |
367 | * Take rtnl_lock to avoid racing with ipoib_stop() and | 368 | * Take rtnl_lock to avoid racing with ipoib_stop() and |
368 | * turning the carrier back on while a device is being | 369 | * turning the carrier back on while a device is being |
369 | * removed. | 370 | * removed. |
370 | */ | 371 | */ |
372 | if (ib_query_port(priv->ca, priv->port, &attr) || | ||
373 | attr.state != IB_PORT_ACTIVE) { | ||
374 | ipoib_dbg(priv, "Keeping carrier off until IB port is active\n"); | ||
375 | return; | ||
376 | } | ||
377 | |||
371 | rtnl_lock(); | 378 | rtnl_lock(); |
372 | netif_carrier_on(priv->dev); | 379 | netif_carrier_on(priv->dev); |
373 | rtnl_unlock(); | 380 | rtnl_unlock(); |
diff --git a/drivers/net/mlx4/fw.c b/drivers/net/mlx4/fw.c index cee199ceba2f..3c16602172fc 100644 --- a/drivers/net/mlx4/fw.c +++ b/drivers/net/mlx4/fw.c | |||
@@ -33,6 +33,7 @@ | |||
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include <linux/mlx4/cmd.h> | 35 | #include <linux/mlx4/cmd.h> |
36 | #include <linux/cache.h> | ||
36 | 37 | ||
37 | #include "fw.h" | 38 | #include "fw.h" |
38 | #include "icm.h" | 39 | #include "icm.h" |
@@ -698,6 +699,7 @@ int mlx4_INIT_HCA(struct mlx4_dev *dev, struct mlx4_init_hca_param *param) | |||
698 | #define INIT_HCA_IN_SIZE 0x200 | 699 | #define INIT_HCA_IN_SIZE 0x200 |
699 | #define INIT_HCA_VERSION_OFFSET 0x000 | 700 | #define INIT_HCA_VERSION_OFFSET 0x000 |
700 | #define INIT_HCA_VERSION 2 | 701 | #define INIT_HCA_VERSION 2 |
702 | #define INIT_HCA_CACHELINE_SZ_OFFSET 0x0e | ||
701 | #define INIT_HCA_FLAGS_OFFSET 0x014 | 703 | #define INIT_HCA_FLAGS_OFFSET 0x014 |
702 | #define INIT_HCA_QPC_OFFSET 0x020 | 704 | #define INIT_HCA_QPC_OFFSET 0x020 |
703 | #define INIT_HCA_QPC_BASE_OFFSET (INIT_HCA_QPC_OFFSET + 0x10) | 705 | #define INIT_HCA_QPC_BASE_OFFSET (INIT_HCA_QPC_OFFSET + 0x10) |
@@ -735,6 +737,9 @@ int mlx4_INIT_HCA(struct mlx4_dev *dev, struct mlx4_init_hca_param *param) | |||
735 | 737 | ||
736 | *((u8 *) mailbox->buf + INIT_HCA_VERSION_OFFSET) = INIT_HCA_VERSION; | 738 | *((u8 *) mailbox->buf + INIT_HCA_VERSION_OFFSET) = INIT_HCA_VERSION; |
737 | 739 | ||
740 | *((u8 *) mailbox->buf + INIT_HCA_CACHELINE_SZ_OFFSET) = | ||
741 | (ilog2(cache_line_size()) - 4) << 5; | ||
742 | |||
738 | #if defined(__LITTLE_ENDIAN) | 743 | #if defined(__LITTLE_ENDIAN) |
739 | *(inbox + INIT_HCA_FLAGS_OFFSET / 4) &= ~cpu_to_be32(1 << 1); | 744 | *(inbox + INIT_HCA_FLAGS_OFFSET / 4) &= ~cpu_to_be32(1 << 1); |
740 | #elif defined(__BIG_ENDIAN) | 745 | #elif defined(__BIG_ENDIAN) |