props->max_msg_sz        = 0x80000000; 
static int mthca_query_port(struct ib_device *ibdev,			    u8 port, struct ib_port_attr *props){	struct ib_smp *in_mad  = NULL;	struct ib_smp *out_mad = NULL;	int err = -ENOMEM;	u8 status;	in_mad  = kmalloc(sizeof *in_mad, GFP_KERNEL);	out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL);	if (!in_mad || !out_mad)		goto out;	memset(in_mad, 0, sizeof *in_mad);	in_mad->base_version       = 1;	in_mad->mgmt_class     	   = IB_MGMT_CLASS_SUBN_LID_ROUTED;	in_mad->class_version  	   = 1;	in_mad->method         	   = IB_MGMT_METHOD_GET;	in_mad->attr_id   	   = IB_SMP_ATTR_PORT_INFO;	in_mad->attr_mod           = cpu_to_be32(port);	err = mthca_MAD_IFC(to_mdev(ibdev), 1, 1,			    port, NULL, NULL, in_mad, out_mad,			    &status);	if (err)		goto out;	if (status) {		err = -EINVAL;		goto out;	}	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));	props->sm_sl             = out_mad->data[36] & 0xf;	props->state             = out_mad->data[32] & 0xf;	props->phys_state        = out_mad->data[33] >> 4;	props->port_cap_flags    = be32_to_cpup((__be32 *) (out_mad->data + 20));	props->gid_tbl_len       = to_mdev(ibdev)->limits.gid_table_len;	props->pkey_tbl_len      = to_mdev(ibdev)->limits.pkey_table_len;	props->qkey_viol_cntr    = be16_to_cpup((__be16 *) (out_mad->data + 48));	props->active_width      = out_mad->data[31] & 0xf;	props->active_speed      = out_mad->data[35] >> 4; out:	kfree(in_mad);	kfree(out_mad);	return err;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/d1887ec2125988adccbd8bf0de638c41440bf80e/mthca_provider.c/clean/drivers/infiniband/hw/mthca/mthca_provider.c