Lines Matching refs:props
360 struct ib_device_attr *props, in mlx4_ib_query_device() argument
402 memset(props, 0, sizeof *props); in mlx4_ib_query_device()
406 props->fw_ver = dev->dev->caps.fw_ver; in mlx4_ib_query_device()
407 props->device_cap_flags = IB_DEVICE_CHANGE_PHY_PORT | in mlx4_ib_query_device()
413 props->device_cap_flags |= IB_DEVICE_BAD_PKEY_CNTR; in mlx4_ib_query_device()
415 props->device_cap_flags |= IB_DEVICE_BAD_QKEY_CNTR; in mlx4_ib_query_device()
417 props->device_cap_flags |= IB_DEVICE_AUTO_PATH_MIG; in mlx4_ib_query_device()
419 props->device_cap_flags |= IB_DEVICE_UD_AV_PORT_ENFORCE; in mlx4_ib_query_device()
421 props->device_cap_flags |= IB_DEVICE_UD_IP_CSUM; in mlx4_ib_query_device()
425 props->device_cap_flags |= IB_DEVICE_UD_TSO; in mlx4_ib_query_device()
427 props->device_cap_flags |= IB_DEVICE_LOCAL_DMA_LKEY; in mlx4_ib_query_device()
431 props->device_cap_flags |= IB_DEVICE_MEM_MGT_EXTENSIONS; in mlx4_ib_query_device()
433 props->device_cap_flags |= IB_DEVICE_XRC; in mlx4_ib_query_device()
435 props->device_cap_flags |= IB_DEVICE_MEM_WINDOW; in mlx4_ib_query_device()
438 props->device_cap_flags |= IB_DEVICE_MEM_WINDOW_TYPE_2B; in mlx4_ib_query_device()
440 props->device_cap_flags |= IB_DEVICE_MEM_WINDOW_TYPE_2A; in mlx4_ib_query_device()
442 props->device_cap_flags |= IB_DEVICE_MANAGED_FLOW_STEERING; in mlx4_ib_query_device()
445 props->device_cap_flags |= IB_DEVICE_RAW_IP_CSUM; in mlx4_ib_query_device()
447 props->vendor_id = be32_to_cpup((__be32 *) (out_mad->data + 36)) & in mlx4_ib_query_device()
449 props->vendor_part_id = dev->dev->persist->pdev->device; in mlx4_ib_query_device()
450 props->hw_ver = be32_to_cpup((__be32 *) (out_mad->data + 32)); in mlx4_ib_query_device()
451 memcpy(&props->sys_image_guid, out_mad->data + 4, 8); in mlx4_ib_query_device()
453 props->max_mr_size = ~0ull; in mlx4_ib_query_device()
454 props->page_size_cap = dev->dev->caps.page_size_cap; in mlx4_ib_query_device()
455 props->max_qp = dev->dev->quotas.qp; in mlx4_ib_query_device()
456 props->max_qp_wr = dev->dev->caps.max_wqes - MLX4_IB_SQ_MAX_SPARE; in mlx4_ib_query_device()
457 props->max_sge = min(dev->dev->caps.max_sq_sg, in mlx4_ib_query_device()
459 props->max_sge_rd = MLX4_MAX_SGE_RD; in mlx4_ib_query_device()
460 props->max_cq = dev->dev->quotas.cq; in mlx4_ib_query_device()
461 props->max_cqe = dev->dev->caps.max_cqes; in mlx4_ib_query_device()
462 props->max_mr = dev->dev->quotas.mpt; in mlx4_ib_query_device()
463 props->max_pd = dev->dev->caps.num_pds - dev->dev->caps.reserved_pds; in mlx4_ib_query_device()
464 props->max_qp_rd_atom = dev->dev->caps.max_qp_dest_rdma; in mlx4_ib_query_device()
465 props->max_qp_init_rd_atom = dev->dev->caps.max_qp_init_rdma; in mlx4_ib_query_device()
466 props->max_res_rd_atom = props->max_qp_rd_atom * props->max_qp; in mlx4_ib_query_device()
467 props->max_srq = dev->dev->quotas.srq; in mlx4_ib_query_device()
468 props->max_srq_wr = dev->dev->caps.max_srq_wqes - 1; in mlx4_ib_query_device()
469 props->max_srq_sge = dev->dev->caps.max_srq_sge; in mlx4_ib_query_device()
470 props->max_fast_reg_page_list_len = MLX4_MAX_FAST_REG_PAGES; in mlx4_ib_query_device()
471 props->local_ca_ack_delay = dev->dev->caps.local_ca_ack_delay; in mlx4_ib_query_device()
472 props->atomic_cap = dev->dev->caps.flags & MLX4_DEV_CAP_FLAG_ATOMIC ? in mlx4_ib_query_device()
474 props->masked_atomic_cap = props->atomic_cap; in mlx4_ib_query_device()
475 props->max_pkeys = dev->dev->caps.pkey_table_len[1]; in mlx4_ib_query_device()
476 props->max_mcast_grp = dev->dev->caps.num_mgms + dev->dev->caps.num_amgms; in mlx4_ib_query_device()
477 props->max_mcast_qp_attach = dev->dev->caps.num_qp_per_mgm; in mlx4_ib_query_device()
478 props->max_total_mcast_qp_attach = props->max_mcast_qp_attach * in mlx4_ib_query_device()
479 props->max_mcast_grp; in mlx4_ib_query_device()
480 props->max_map_per_fmr = dev->dev->caps.max_fmr_maps; in mlx4_ib_query_device()
481 props->hca_core_clock = dev->dev->caps.hca_core_clock * 1000UL; in mlx4_ib_query_device()
482 props->timestamp_mask = 0xFFFFFFFFFFFFULL; in mlx4_ib_query_device()
517 struct ib_port_attr *props, int netw_view) in ib_link_query_port() argument
543 props->lid = be16_to_cpup((__be16 *) (out_mad->data + 16)); in ib_link_query_port()
544 props->lmc = out_mad->data[34] & 0x7; in ib_link_query_port()
545 props->sm_lid = be16_to_cpup((__be16 *) (out_mad->data + 18)); in ib_link_query_port()
546 props->sm_sl = out_mad->data[36] & 0xf; in ib_link_query_port()
547 props->state = out_mad->data[32] & 0xf; in ib_link_query_port()
548 props->phys_state = out_mad->data[33] >> 4; in ib_link_query_port()
549 props->port_cap_flags = be32_to_cpup((__be32 *) (out_mad->data + 20)); in ib_link_query_port()
551 props->gid_tbl_len = out_mad->data[50]; in ib_link_query_port()
553 props->gid_tbl_len = to_mdev(ibdev)->dev->caps.gid_table_len[port]; in ib_link_query_port()
554 props->max_msg_sz = to_mdev(ibdev)->dev->caps.max_msg_sz; in ib_link_query_port()
555 props->pkey_tbl_len = to_mdev(ibdev)->dev->caps.pkey_table_len[port]; in ib_link_query_port()
556 props->bad_pkey_cntr = be16_to_cpup((__be16 *) (out_mad->data + 46)); in ib_link_query_port()
557 props->qkey_viol_cntr = be16_to_cpup((__be16 *) (out_mad->data + 48)); in ib_link_query_port()
558 props->active_width = out_mad->data[31] & 0xf; in ib_link_query_port()
559 props->active_speed = out_mad->data[35] >> 4; in ib_link_query_port()
560 props->max_mtu = out_mad->data[41] & 0xf; in ib_link_query_port()
561 props->active_mtu = out_mad->data[36] >> 4; in ib_link_query_port()
562 props->subnet_timeout = out_mad->data[51] & 0x1f; in ib_link_query_port()
563 props->max_vl_num = out_mad->data[37] >> 4; in ib_link_query_port()
564 props->init_type_reply = out_mad->data[41] >> 4; in ib_link_query_port()
567 if (props->port_cap_flags & IB_PORT_EXTENDED_SPEEDS_SUP) { in ib_link_query_port()
572 props->active_speed = IB_SPEED_FDR; in ib_link_query_port()
575 props->active_speed = IB_SPEED_EDR; in ib_link_query_port()
581 if (props->active_speed == IB_SPEED_QDR) { in ib_link_query_port()
593 props->active_speed = IB_SPEED_FDR10; in ib_link_query_port()
597 if (props->state == IB_PORT_DOWN) in ib_link_query_port()
598 props->active_speed = IB_SPEED_SDR; in ib_link_query_port()
612 struct ib_port_attr *props, int netw_view) in eth_link_query_port() argument
633 props->active_width = (((u8 *)mailbox->buf)[5] == 0x40) ? in eth_link_query_port()
635 props->active_speed = IB_SPEED_QDR; in eth_link_query_port()
636 props->port_cap_flags = IB_PORT_CM_SUP | IB_PORT_IP_BASED_GIDS; in eth_link_query_port()
637 props->gid_tbl_len = mdev->dev->caps.gid_table_len[port]; in eth_link_query_port()
638 props->max_msg_sz = mdev->dev->caps.max_msg_sz; in eth_link_query_port()
639 props->pkey_tbl_len = 1; in eth_link_query_port()
640 props->max_mtu = IB_MTU_4096; in eth_link_query_port()
641 props->max_vl_num = 2; in eth_link_query_port()
642 props->state = IB_PORT_DOWN; in eth_link_query_port()
643 props->phys_state = state_to_phys_state(props->state); in eth_link_query_port()
644 props->active_mtu = IB_MTU_256; in eth_link_query_port()
656 props->active_mtu = tmp ? min(props->max_mtu, tmp) : IB_MTU_256; in eth_link_query_port()
658 props->state = (netif_running(ndev) && netif_carrier_ok(ndev)) ? in eth_link_query_port()
660 props->phys_state = state_to_phys_state(props->state); in eth_link_query_port()
669 struct ib_port_attr *props, int netw_view) in __mlx4_ib_query_port() argument
673 memset(props, 0, sizeof *props); in __mlx4_ib_query_port()
676 ib_link_query_port(ibdev, port, props, netw_view) : in __mlx4_ib_query_port()
677 eth_link_query_port(ibdev, port, props, netw_view); in __mlx4_ib_query_port()
683 struct ib_port_attr *props) in mlx4_ib_query_port() argument
686 return __mlx4_ib_query_port(ibdev, port, props, 0); in mlx4_ib_query_port()
807 struct ib_device_modify *props) in mlx4_ib_modify_device() argument
822 memcpy(ibdev->node_desc, props->node_desc, 64); in mlx4_ib_modify_device()
833 memcpy(mailbox->buf, props->node_desc, 64); in mlx4_ib_modify_device()
869 struct ib_port_modify *props) in mlx4_ib_modify_port() argument
890 cap_mask = (attr.port_cap_flags | props->set_port_cap_mask) & in mlx4_ib_modify_port()
891 ~props->clr_port_cap_mask; in mlx4_ib_modify_port()