err = mthca_QUERY_ADAPTER(mdev, &adapter, &status); if (err) { mthca_err(mdev, "QUERY_ADAPTER command failed, aborting.\n"); goto err_close; } if (status) { mthca_err(mdev, "QUERY_ADAPTER returned status 0x%02x, " "aborting.\n", status); err = -EINVAL; goto err_close; }  mdev->eq_table.inta_pin = adapter.inta_pin; mdev->rev_id            = adapter.revision_id;  
static int __devinit mthca_init_tavor(struct mthca_dev *mdev){	u8 status;	int err;	struct mthca_dev_lim        dev_lim;	struct mthca_profile        profile;	struct mthca_init_hca_param init_hca;	struct mthca_adapter        adapter;	err = mthca_SYS_EN(mdev, &status);	if (err) {		mthca_err(mdev, "SYS_EN command failed, aborting.\n");		return err;	}	if (status) {		mthca_err(mdev, "SYS_EN returned status 0x%02x, "			  "aborting.\n", status);		return -EINVAL;	}	err = mthca_QUERY_FW(mdev, &status);	if (err) {		mthca_err(mdev, "QUERY_FW command failed, aborting.\n");		goto err_disable;	}	if (status) {		mthca_err(mdev, "QUERY_FW returned status 0x%02x, "			  "aborting.\n", status);		err = -EINVAL;		goto err_disable;	}	err = mthca_QUERY_DDR(mdev, &status);	if (err) {		mthca_err(mdev, "QUERY_DDR command failed, aborting.\n");		goto err_disable;	}	if (status) {		mthca_err(mdev, "QUERY_DDR returned status 0x%02x, "			  "aborting.\n", status);		err = -EINVAL;		goto err_disable;	}	err = mthca_dev_lim(mdev, &dev_lim);	profile = default_profile;	profile.num_uar   = dev_lim.uar_size / PAGE_SIZE;	profile.uarc_size = 0;	err = mthca_make_profile(mdev, &profile, &dev_lim, &init_hca);	if (err < 0)		goto err_disable;	err = mthca_INIT_HCA(mdev, &init_hca, &status);	if (err) {		mthca_err(mdev, "INIT_HCA command failed, aborting.\n");		goto err_disable;	}	if (status) {		mthca_err(mdev, "INIT_HCA returned status 0x%02x, "			  "aborting.\n", status);		err = -EINVAL;		goto err_disable;	}	err = mthca_QUERY_ADAPTER(mdev, &adapter, &status);	if (err) {		mthca_err(mdev, "QUERY_ADAPTER command failed, aborting.\n");		goto err_close;	}	if (status) {		mthca_err(mdev, "QUERY_ADAPTER returned status 0x%02x, "			  "aborting.\n", status);		err = -EINVAL;		goto err_close;	}	mdev->eq_table.inta_pin = adapter.inta_pin;	mdev->rev_id            = adapter.revision_id;	return 0;err_close:	mthca_CLOSE_HCA(mdev, 0, &status);err_disable:	mthca_SYS_DIS(mdev, &status);	return err;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/2e8b981c5d5c6fe5479ad47c44e3e76ebb5408ef/mthca_main.c/buggy/drivers/infiniband/hw/mthca/mthca_main.c