diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-09-25 08:37:05 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-09-25 08:37:05 -0400 |
commit | 8e5d0661b3948f3c5a143f32d192710375822af2 (patch) | |
tree | ca18920d3f7219f7ffb7ca2fa372b82558938006 /drivers/infiniband/hw | |
parent | 39a6ac11df6579df0361922f05c43f0fac8daa37 (diff) | |
parent | 5698bd757d55b1bb87edd1a9744ab09c142abfc2 (diff) |
Merge tag 'v3.6-rc6' into spi-drivers
Linux 3.6-rc6
Conflicts:
drivers/spi/spi-omap2-mcspi.c
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r-- | drivers/infiniband/hw/amso1100/c2_rnic.c | 2 | ||||
-rw-r--r-- | drivers/infiniband/hw/cxgb3/iwch_cm.c | 2 | ||||
-rw-r--r-- | drivers/infiniband/hw/mlx4/mad.c | 16 | ||||
-rw-r--r-- | drivers/infiniband/hw/mlx4/main.c | 5 | ||||
-rw-r--r-- | drivers/infiniband/hw/mlx4/qp.c | 6 | ||||
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_main.c | 16 | ||||
-rw-r--r-- | drivers/infiniband/hw/qib/qib_iba7322.c | 4 | ||||
-rw-r--r-- | drivers/infiniband/hw/qib/qib_sd7220.c | 2 |
8 files changed, 32 insertions, 21 deletions
diff --git a/drivers/infiniband/hw/amso1100/c2_rnic.c b/drivers/infiniband/hw/amso1100/c2_rnic.c index 8c81992fa6db..e4a73158fc7f 100644 --- a/drivers/infiniband/hw/amso1100/c2_rnic.c +++ b/drivers/infiniband/hw/amso1100/c2_rnic.c | |||
@@ -439,7 +439,7 @@ static int c2_rnic_close(struct c2_dev *c2dev) | |||
439 | 439 | ||
440 | /* | 440 | /* |
441 | * Called by c2_probe to initialize the RNIC. This principally | 441 | * Called by c2_probe to initialize the RNIC. This principally |
442 | * involves initalizing the various limits and resouce pools that | 442 | * involves initializing the various limits and resource pools that |
443 | * comprise the RNIC instance. | 443 | * comprise the RNIC instance. |
444 | */ | 444 | */ |
445 | int __devinit c2_rnic_init(struct c2_dev *c2dev) | 445 | int __devinit c2_rnic_init(struct c2_dev *c2dev) |
diff --git a/drivers/infiniband/hw/cxgb3/iwch_cm.c b/drivers/infiniband/hw/cxgb3/iwch_cm.c index 77b6b182778a..aaf88ef9409c 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_cm.c +++ b/drivers/infiniband/hw/cxgb3/iwch_cm.c | |||
@@ -1680,7 +1680,7 @@ static int close_con_rpl(struct t3cdev *tdev, struct sk_buff *skb, void *ctx) | |||
1680 | * T3A does 3 things when a TERM is received: | 1680 | * T3A does 3 things when a TERM is received: |
1681 | * 1) send up a CPL_RDMA_TERMINATE message with the TERM packet | 1681 | * 1) send up a CPL_RDMA_TERMINATE message with the TERM packet |
1682 | * 2) generate an async event on the QP with the TERMINATE opcode | 1682 | * 2) generate an async event on the QP with the TERMINATE opcode |
1683 | * 3) post a TERMINATE opcde cqe into the associated CQ. | 1683 | * 3) post a TERMINATE opcode cqe into the associated CQ. |
1684 | * | 1684 | * |
1685 | * For (1), we save the message in the qp for later consumer consumption. | 1685 | * For (1), we save the message in the qp for later consumer consumption. |
1686 | * For (2), we move the QP into TERMINATE, post a QP event and disconnect. | 1686 | * For (2), we move the QP into TERMINATE, post a QP event and disconnect. |
diff --git a/drivers/infiniband/hw/mlx4/mad.c b/drivers/infiniband/hw/mlx4/mad.c index c27141fef1ab..9c2ae7efd00f 100644 --- a/drivers/infiniband/hw/mlx4/mad.c +++ b/drivers/infiniband/hw/mlx4/mad.c | |||
@@ -125,6 +125,7 @@ static void update_sm_ah(struct mlx4_ib_dev *dev, u8 port_num, u16 lid, u8 sl) | |||
125 | { | 125 | { |
126 | struct ib_ah *new_ah; | 126 | struct ib_ah *new_ah; |
127 | struct ib_ah_attr ah_attr; | 127 | struct ib_ah_attr ah_attr; |
128 | unsigned long flags; | ||
128 | 129 | ||
129 | if (!dev->send_agent[port_num - 1][0]) | 130 | if (!dev->send_agent[port_num - 1][0]) |
130 | return; | 131 | return; |
@@ -139,11 +140,11 @@ static void update_sm_ah(struct mlx4_ib_dev *dev, u8 port_num, u16 lid, u8 sl) | |||
139 | if (IS_ERR(new_ah)) | 140 | if (IS_ERR(new_ah)) |
140 | return; | 141 | return; |
141 | 142 | ||
142 | spin_lock(&dev->sm_lock); | 143 | spin_lock_irqsave(&dev->sm_lock, flags); |
143 | if (dev->sm_ah[port_num - 1]) | 144 | if (dev->sm_ah[port_num - 1]) |
144 | ib_destroy_ah(dev->sm_ah[port_num - 1]); | 145 | ib_destroy_ah(dev->sm_ah[port_num - 1]); |
145 | dev->sm_ah[port_num - 1] = new_ah; | 146 | dev->sm_ah[port_num - 1] = new_ah; |
146 | spin_unlock(&dev->sm_lock); | 147 | spin_unlock_irqrestore(&dev->sm_lock, flags); |
147 | } | 148 | } |
148 | 149 | ||
149 | /* | 150 | /* |
@@ -197,13 +198,15 @@ static void smp_snoop(struct ib_device *ibdev, u8 port_num, struct ib_mad *mad, | |||
197 | static void node_desc_override(struct ib_device *dev, | 198 | static void node_desc_override(struct ib_device *dev, |
198 | struct ib_mad *mad) | 199 | struct ib_mad *mad) |
199 | { | 200 | { |
201 | unsigned long flags; | ||
202 | |||
200 | if ((mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_LID_ROUTED || | 203 | if ((mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_LID_ROUTED || |
201 | mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) && | 204 | mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) && |
202 | mad->mad_hdr.method == IB_MGMT_METHOD_GET_RESP && | 205 | mad->mad_hdr.method == IB_MGMT_METHOD_GET_RESP && |
203 | mad->mad_hdr.attr_id == IB_SMP_ATTR_NODE_DESC) { | 206 | mad->mad_hdr.attr_id == IB_SMP_ATTR_NODE_DESC) { |
204 | spin_lock(&to_mdev(dev)->sm_lock); | 207 | spin_lock_irqsave(&to_mdev(dev)->sm_lock, flags); |
205 | memcpy(((struct ib_smp *) mad)->data, dev->node_desc, 64); | 208 | memcpy(((struct ib_smp *) mad)->data, dev->node_desc, 64); |
206 | spin_unlock(&to_mdev(dev)->sm_lock); | 209 | spin_unlock_irqrestore(&to_mdev(dev)->sm_lock, flags); |
207 | } | 210 | } |
208 | } | 211 | } |
209 | 212 | ||
@@ -213,6 +216,7 @@ static void forward_trap(struct mlx4_ib_dev *dev, u8 port_num, struct ib_mad *ma | |||
213 | struct ib_mad_send_buf *send_buf; | 216 | struct ib_mad_send_buf *send_buf; |
214 | struct ib_mad_agent *agent = dev->send_agent[port_num - 1][qpn]; | 217 | struct ib_mad_agent *agent = dev->send_agent[port_num - 1][qpn]; |
215 | int ret; | 218 | int ret; |
219 | unsigned long flags; | ||
216 | 220 | ||
217 | if (agent) { | 221 | if (agent) { |
218 | send_buf = ib_create_send_mad(agent, qpn, 0, 0, IB_MGMT_MAD_HDR, | 222 | send_buf = ib_create_send_mad(agent, qpn, 0, 0, IB_MGMT_MAD_HDR, |
@@ -225,13 +229,13 @@ static void forward_trap(struct mlx4_ib_dev *dev, u8 port_num, struct ib_mad *ma | |||
225 | * wrong following the IB spec strictly, but we know | 229 | * wrong following the IB spec strictly, but we know |
226 | * it's OK for our devices). | 230 | * it's OK for our devices). |
227 | */ | 231 | */ |
228 | spin_lock(&dev->sm_lock); | 232 | spin_lock_irqsave(&dev->sm_lock, flags); |
229 | memcpy(send_buf->mad, mad, sizeof *mad); | 233 | memcpy(send_buf->mad, mad, sizeof *mad); |
230 | if ((send_buf->ah = dev->sm_ah[port_num - 1])) | 234 | if ((send_buf->ah = dev->sm_ah[port_num - 1])) |
231 | ret = ib_post_send_mad(send_buf, NULL); | 235 | ret = ib_post_send_mad(send_buf, NULL); |
232 | else | 236 | else |
233 | ret = -EINVAL; | 237 | ret = -EINVAL; |
234 | spin_unlock(&dev->sm_lock); | 238 | spin_unlock_irqrestore(&dev->sm_lock, flags); |
235 | 239 | ||
236 | if (ret) | 240 | if (ret) |
237 | ib_free_send_mad(send_buf); | 241 | ib_free_send_mad(send_buf); |
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c index fe2088cfa6ee..cc05579ebce7 100644 --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c | |||
@@ -423,6 +423,7 @@ static int mlx4_ib_modify_device(struct ib_device *ibdev, int mask, | |||
423 | struct ib_device_modify *props) | 423 | struct ib_device_modify *props) |
424 | { | 424 | { |
425 | struct mlx4_cmd_mailbox *mailbox; | 425 | struct mlx4_cmd_mailbox *mailbox; |
426 | unsigned long flags; | ||
426 | 427 | ||
427 | if (mask & ~IB_DEVICE_MODIFY_NODE_DESC) | 428 | if (mask & ~IB_DEVICE_MODIFY_NODE_DESC) |
428 | return -EOPNOTSUPP; | 429 | return -EOPNOTSUPP; |
@@ -430,9 +431,9 @@ static int mlx4_ib_modify_device(struct ib_device *ibdev, int mask, | |||
430 | if (!(mask & IB_DEVICE_MODIFY_NODE_DESC)) | 431 | if (!(mask & IB_DEVICE_MODIFY_NODE_DESC)) |
431 | return 0; | 432 | return 0; |
432 | 433 | ||
433 | spin_lock(&to_mdev(ibdev)->sm_lock); | 434 | spin_lock_irqsave(&to_mdev(ibdev)->sm_lock, flags); |
434 | memcpy(ibdev->node_desc, props->node_desc, 64); | 435 | memcpy(ibdev->node_desc, props->node_desc, 64); |
435 | spin_unlock(&to_mdev(ibdev)->sm_lock); | 436 | spin_unlock_irqrestore(&to_mdev(ibdev)->sm_lock, flags); |
436 | 437 | ||
437 | /* | 438 | /* |
438 | * If possible, pass node desc to FW, so it can generate | 439 | * If possible, pass node desc to FW, so it can generate |
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index a6d8ea060ea8..f585eddef4b7 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c | |||
@@ -1407,6 +1407,7 @@ static int build_mlx_header(struct mlx4_ib_sqp *sqp, struct ib_send_wr *wr, | |||
1407 | struct mlx4_wqe_mlx_seg *mlx = wqe; | 1407 | struct mlx4_wqe_mlx_seg *mlx = wqe; |
1408 | struct mlx4_wqe_inline_seg *inl = wqe + sizeof *mlx; | 1408 | struct mlx4_wqe_inline_seg *inl = wqe + sizeof *mlx; |
1409 | struct mlx4_ib_ah *ah = to_mah(wr->wr.ud.ah); | 1409 | struct mlx4_ib_ah *ah = to_mah(wr->wr.ud.ah); |
1410 | struct net_device *ndev; | ||
1410 | union ib_gid sgid; | 1411 | union ib_gid sgid; |
1411 | u16 pkey; | 1412 | u16 pkey; |
1412 | int send_size; | 1413 | int send_size; |
@@ -1483,7 +1484,10 @@ static int build_mlx_header(struct mlx4_ib_sqp *sqp, struct ib_send_wr *wr, | |||
1483 | 1484 | ||
1484 | memcpy(sqp->ud_header.eth.dmac_h, ah->av.eth.mac, 6); | 1485 | memcpy(sqp->ud_header.eth.dmac_h, ah->av.eth.mac, 6); |
1485 | /* FIXME: cache smac value? */ | 1486 | /* FIXME: cache smac value? */ |
1486 | smac = to_mdev(sqp->qp.ibqp.device)->iboe.netdevs[sqp->qp.port - 1]->dev_addr; | 1487 | ndev = to_mdev(sqp->qp.ibqp.device)->iboe.netdevs[sqp->qp.port - 1]; |
1488 | if (!ndev) | ||
1489 | return -ENODEV; | ||
1490 | smac = ndev->dev_addr; | ||
1487 | memcpy(sqp->ud_header.eth.smac_h, smac, 6); | 1491 | memcpy(sqp->ud_header.eth.smac_h, smac, 6); |
1488 | if (!memcmp(sqp->ud_header.eth.smac_h, sqp->ud_header.eth.dmac_h, 6)) | 1492 | if (!memcmp(sqp->ud_header.eth.smac_h, sqp->ud_header.eth.dmac_h, 6)) |
1489 | mlx->flags |= cpu_to_be32(MLX4_WQE_CTRL_FORCE_LOOPBACK); | 1493 | mlx->flags |= cpu_to_be32(MLX4_WQE_CTRL_FORCE_LOOPBACK); |
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_main.c b/drivers/infiniband/hw/ocrdma/ocrdma_main.c index 5a044526e4f4..c4e0131f1b57 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_main.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_main.c | |||
@@ -161,7 +161,7 @@ static void ocrdma_add_default_sgid(struct ocrdma_dev *dev) | |||
161 | ocrdma_get_guid(dev, &sgid->raw[8]); | 161 | ocrdma_get_guid(dev, &sgid->raw[8]); |
162 | } | 162 | } |
163 | 163 | ||
164 | #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) | 164 | #if IS_ENABLED(CONFIG_VLAN_8021Q) |
165 | static void ocrdma_add_vlan_sgids(struct ocrdma_dev *dev) | 165 | static void ocrdma_add_vlan_sgids(struct ocrdma_dev *dev) |
166 | { | 166 | { |
167 | struct net_device *netdev, *tmp; | 167 | struct net_device *netdev, *tmp; |
@@ -202,14 +202,13 @@ static int ocrdma_build_sgid_tbl(struct ocrdma_dev *dev) | |||
202 | return 0; | 202 | return 0; |
203 | } | 203 | } |
204 | 204 | ||
205 | #if IS_ENABLED(CONFIG_IPV6) || IS_ENABLED(CONFIG_VLAN_8021Q) | 205 | #if IS_ENABLED(CONFIG_IPV6) |
206 | 206 | ||
207 | static int ocrdma_inet6addr_event(struct notifier_block *notifier, | 207 | static int ocrdma_inet6addr_event(struct notifier_block *notifier, |
208 | unsigned long event, void *ptr) | 208 | unsigned long event, void *ptr) |
209 | { | 209 | { |
210 | struct inet6_ifaddr *ifa = (struct inet6_ifaddr *)ptr; | 210 | struct inet6_ifaddr *ifa = (struct inet6_ifaddr *)ptr; |
211 | struct net_device *event_netdev = ifa->idev->dev; | 211 | struct net_device *netdev = ifa->idev->dev; |
212 | struct net_device *netdev = NULL; | ||
213 | struct ib_event gid_event; | 212 | struct ib_event gid_event; |
214 | struct ocrdma_dev *dev; | 213 | struct ocrdma_dev *dev; |
215 | bool found = false; | 214 | bool found = false; |
@@ -217,11 +216,12 @@ static int ocrdma_inet6addr_event(struct notifier_block *notifier, | |||
217 | bool is_vlan = false; | 216 | bool is_vlan = false; |
218 | u16 vid = 0; | 217 | u16 vid = 0; |
219 | 218 | ||
220 | netdev = vlan_dev_real_dev(event_netdev); | 219 | is_vlan = netdev->priv_flags & IFF_802_1Q_VLAN; |
221 | if (netdev != event_netdev) { | 220 | if (is_vlan) { |
222 | is_vlan = true; | 221 | vid = vlan_dev_vlan_id(netdev); |
223 | vid = vlan_dev_vlan_id(event_netdev); | 222 | netdev = vlan_dev_real_dev(netdev); |
224 | } | 223 | } |
224 | |||
225 | rcu_read_lock(); | 225 | rcu_read_lock(); |
226 | list_for_each_entry_rcu(dev, &ocrdma_dev_list, entry) { | 226 | list_for_each_entry_rcu(dev, &ocrdma_dev_list, entry) { |
227 | if (dev->nic_info.netdev == netdev) { | 227 | if (dev->nic_info.netdev == netdev) { |
diff --git a/drivers/infiniband/hw/qib/qib_iba7322.c b/drivers/infiniband/hw/qib/qib_iba7322.c index 0d7280af99bc..3f6b21e9dc11 100644 --- a/drivers/infiniband/hw/qib/qib_iba7322.c +++ b/drivers/infiniband/hw/qib/qib_iba7322.c | |||
@@ -6346,8 +6346,10 @@ static int qib_init_7322_variables(struct qib_devdata *dd) | |||
6346 | dd->piobcnt4k * dd->align4k; | 6346 | dd->piobcnt4k * dd->align4k; |
6347 | dd->piovl15base = ioremap_nocache(vl15off, | 6347 | dd->piovl15base = ioremap_nocache(vl15off, |
6348 | NUM_VL15_BUFS * dd->align4k); | 6348 | NUM_VL15_BUFS * dd->align4k); |
6349 | if (!dd->piovl15base) | 6349 | if (!dd->piovl15base) { |
6350 | ret = -ENOMEM; | ||
6350 | goto bail; | 6351 | goto bail; |
6352 | } | ||
6351 | } | 6353 | } |
6352 | qib_7322_set_baseaddrs(dd); /* set chip access pointers now */ | 6354 | qib_7322_set_baseaddrs(dd); /* set chip access pointers now */ |
6353 | 6355 | ||
diff --git a/drivers/infiniband/hw/qib/qib_sd7220.c b/drivers/infiniband/hw/qib/qib_sd7220.c index a322d5171a2c..50a8a0d4fe67 100644 --- a/drivers/infiniband/hw/qib/qib_sd7220.c +++ b/drivers/infiniband/hw/qib/qib_sd7220.c | |||
@@ -372,7 +372,7 @@ static void qib_sd_trimdone_monitor(struct qib_devdata *dd, | |||
372 | /* Read CTRL reg for each channel to check TRIMDONE */ | 372 | /* Read CTRL reg for each channel to check TRIMDONE */ |
373 | if (baduns & (1 << chn)) { | 373 | if (baduns & (1 << chn)) { |
374 | qib_dev_err(dd, | 374 | qib_dev_err(dd, |
375 | "Reseting TRIMDONE on chn %d (%s)\n", | 375 | "Resetting TRIMDONE on chn %d (%s)\n", |
376 | chn, where); | 376 | chn, where); |
377 | ret = qib_sd7220_reg_mod(dd, IB_7220_SERDES, | 377 | ret = qib_sd7220_reg_mod(dd, IB_7220_SERDES, |
378 | IB_CTRL2(chn), 0x10, 0x10); | 378 | IB_CTRL2(chn), 0x10, 0x10); |