From: Roland Dreier Date: Tue, 26 Oct 2010 23:09:11 +0000 (-0700) Subject: Merge branches 'amso1100', 'cma', 'cxgb3', 'cxgb4', 'ehca', 'iboe', 'ipoib', 'misc... X-Git-Tag: upstream/snapshot3+hdmi~12637^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=116e9535fe5e00bafab7a637f306b110cf95cff5;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git Merge branches 'amso1100', 'cma', 'cxgb3', 'cxgb4', 'ehca', 'iboe', 'ipoib', 'misc', 'mlx4', 'nes', 'qib' and 'srp' into for-next --- 116e9535fe5e00bafab7a637f306b110cf95cff5 diff --cc drivers/infiniband/hw/mlx4/main.c index 4e94e36,4e94e36,4e94e36,4e94e36,4e94e36,8736bd8,4e94e36,4e94e36,ac6951d,4e94e36,4e94e36,4e94e36..bf3e20c --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c @@@@@@@@@@@@@ -154,28 -154,28 -154,28 -154,28 -154,28 -170,19 -154,28 -154,28 -154,28 -154,28 -154,28 -154,28 +170,19 @@@@@@@@@@@@@ out return err; } ----- ------static int mlx4_ib_query_port(struct ib_device *ibdev, u8 port, ----- ------ struct ib_port_attr *props) +++++ ++++++static enum rdma_link_layer +++++ ++++++mlx4_ib_port_link_layer(struct ib_device *device, u8 port_num) { ----- ------ struct ib_smp *in_mad = NULL; ----- ------ struct ib_smp *out_mad = NULL; ----- ------ int err = -ENOMEM; ----- -- --- ----- -- --- in_mad = kzalloc(sizeof *in_mad, GFP_KERNEL); ----- -- --- out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL); ----- -- --- if (!in_mad || !out_mad) ----- -- --- goto out; ----- -- --- ----- -- --- memset(props, 0, sizeof *props); ----- -- --- ----- -- --- init_query_mad(in_mad); ----- -- --- in_mad->attr_id = IB_SMP_ATTR_PORT_INFO; ----- -- --- in_mad->attr_mod = cpu_to_be32(port); +++++ ++++++ struct mlx4_dev *dev = to_mdev(device)->dev; - in_mad = kzalloc(sizeof *in_mad, GFP_KERNEL); - out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL); - if (!in_mad || !out_mad) - goto out; - - memset(props, 0, sizeof *props); - - init_query_mad(in_mad); - in_mad->attr_id = IB_SMP_ATTR_PORT_INFO; - in_mad->attr_mod = cpu_to_be32(port); - ----- ------ err = mlx4_MAD_IFC(to_mdev(ibdev), 1, 1, port, NULL, NULL, in_mad, out_mad); ----- ------ if (err) ----- ------ goto out; +++++ ++++++ return dev->caps.port_mask & (1 << (port_num - 1)) ? +++++ ++++++ IB_LINK_LAYER_INFINIBAND : IB_LINK_LAYER_ETHERNET; +++++ ++++++} +++++ ++++++static int ib_link_query_port(struct ib_device *ibdev, u8 port, +++++ ++++++ struct ib_port_attr *props, +++++ ++++++ struct ib_smp *out_mad) +++++ ++++++{ props->lid = be16_to_cpup((__be16 *) (out_mad->data + 16)); props->lmc = out_mad->data[34] & 0x7; props->sm_lid = be16_to_cpup((__be16 *) (out_mad->data + 18));