props->vendor_id           = be32_to_cpup((u32 *) (out_mad->data + 36)) & 
props->vendor_id           = be32_to_cpup((__be32 *) (out_mad->data + 36)) & 
static int mthca_query_device(struct ib_device *ibdev,			      struct ib_device_attr *props){	struct ib_smp *in_mad  = NULL;	struct ib_smp *out_mad = NULL;	int err = -ENOMEM;	struct mthca_dev* mdev = to_mdev(ibdev);	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(props, 0, sizeof *props);	props->fw_ver              = mdev->fw_ver;	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_NODE_INFO;	err = mthca_MAD_IFC(mdev, 1, 1,			    1, NULL, NULL, in_mad, out_mad,			    &status);	if (err)		goto out;	if (status) {		err = -EINVAL;		goto out;	}	props->device_cap_flags    = mdev->device_cap_flags;	props->vendor_id           = be32_to_cpup((u32 *) (out_mad->data + 36)) &		0xffffff;	props->vendor_part_id      = be16_to_cpup((u16 *) (out_mad->data + 30));	props->hw_ver              = be16_to_cpup((u16 *) (out_mad->data + 32));	memcpy(&props->sys_image_guid, out_mad->data +  4, 8);	memcpy(&props->node_guid,      out_mad->data + 12, 8);	props->max_mr_size         = ~0ull;	props->max_qp              = mdev->limits.num_qps - mdev->limits.reserved_qps;	props->max_qp_wr           = 0xffff;	props->max_sge             = mdev->limits.max_sg;	props->max_cq              = mdev->limits.num_cqs - mdev->limits.reserved_cqs;	props->max_cqe             = 0xffff;	props->max_mr              = mdev->limits.num_mpts - mdev->limits.reserved_mrws;	props->max_pd              = mdev->limits.num_pds - mdev->limits.reserved_pds;	props->max_qp_rd_atom      = 1 << mdev->qp_table.rdb_shift;	props->max_qp_init_rd_atom = 1 << mdev->qp_table.rdb_shift;	props->local_ca_ack_delay  = mdev->limits.local_ca_ack_delay;	err = 0; out:	kfree(in_mad);	kfree(out_mad);	return err;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/97f52eb438be7caebe026421545619d8a0c1398a/mthca_provider.c/buggy/drivers/infiniband/hw/mthca/mthca_provider.c