diff options
author | Kevin Hilman <khilman@linaro.org> | 2015-10-13 16:29:43 -0700 |
---|---|---|
committer | Kevin Hilman <khilman@linaro.org> | 2015-10-13 16:29:43 -0700 |
commit | 974070b95b0c8ff6ef0d62109c16aea160cf3c7c (patch) | |
tree | 71da351fb8feb8698f2295e4a4a7def9a4623a81 /drivers/infiniband/hw/mlx4/ah.c | |
parent | 4d869de174c78ae29ca91b41581367c8092d933d (diff) | |
parent | f5552cd830e58c46dffae3617b3ce0c839771981 (diff) |
Merge branch 'linux-3.10.y' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into linux-linaro-lsk-v3.10lsk-v3.10-15.10
* 'linux-3.10.y' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable: (77 commits)
Linux 3.10.90
Revert "iio: bmg160: IIO_BUFFER and IIO_TRIGGERED_BUFFER are required"
vfs: Remove incorrect debugging WARN in prepend_path
fib_rules: fix fib rule dumps across multiple skbs
sctp: fix race on protocol/netns initialization
net/ipv6: Correct PIM6 mrt_lock handling
ipv6: fix exthdrs offload registration in out_rt path
usbnet: Get EVENT_NO_RUNTIME_PM bit before it is cleared
ip6_gre: release cached dst on tunnel removal
rds: fix an integer overflow test in rds_info_getsockopt()
netlink: don't hold mutex in rcu callback when releasing mmapd ring
inet: frags: fix defragmented packet's IP header for af_packet
bonding: fix destruction of bond with devices different from arphrd_ether
ipv6: lock socket in ip6_datagram_connect()
isdn/gigaset: reset tty->receive_room when attaching ser_gigaset
bridge: mdb: fix double add notification
net: Fix skb_set_peeked use-after-free bug
net: Fix skb csum races when peeking
net: Clone skb before setting peeked flag
net: call rcu_read_lock early in process_backlog
...
Diffstat (limited to 'drivers/infiniband/hw/mlx4/ah.c')
-rw-r--r-- | drivers/infiniband/hw/mlx4/ah.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx4/ah.c b/drivers/infiniband/hw/mlx4/ah.c index a251becdaa98..890c23b3d714 100644 --- a/drivers/infiniband/hw/mlx4/ah.c +++ b/drivers/infiniband/hw/mlx4/ah.c @@ -169,9 +169,13 @@ int mlx4_ib_query_ah(struct ib_ah *ibah, struct ib_ah_attr *ah_attr) enum rdma_link_layer ll; memset(ah_attr, 0, sizeof *ah_attr); - ah_attr->sl = be32_to_cpu(ah->av.ib.sl_tclass_flowlabel) >> 28; ah_attr->port_num = be32_to_cpu(ah->av.ib.port_pd) >> 24; ll = rdma_port_get_link_layer(ibah->device, ah_attr->port_num); + if (ll == IB_LINK_LAYER_ETHERNET) + ah_attr->sl = be32_to_cpu(ah->av.eth.sl_tclass_flowlabel) >> 29; + else + ah_attr->sl = be32_to_cpu(ah->av.ib.sl_tclass_flowlabel) >> 28; + ah_attr->dlid = ll == IB_LINK_LAYER_INFINIBAND ? be16_to_cpu(ah->av.ib.dlid) : 0; if (ah->av.ib.stat_rate) ah_attr->static_rate = ah->av.ib.stat_rate - MLX4_STAT_RATE_OFFSET; |