RE: [PATCH rdma-core 04/10] providers: Use the new match_device and allocate_device ops

Steve Wise
2017-09-19T21:29:17Z

>
> This is the first step to simplify the provider binding process.
>
> Checking of the ABI version is hoisted into the core code, as are some
> of the common error messages.
>
> Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
> ---

<snip>

> diff --git a/providers/cxgb4/dev.c b/providers/cxgb4/dev.c
> index 492b3978995607..43c5a3c97bc864 100644
> --- a/providers/cxgb4/dev.c
> +++ b/providers/cxgb4/dev.c

<snip>

> @@ -462,22 +455,30 @@ found:
> fw_min, FW_MIN);
> fflush(stderr);
> }
> + return true;
> +}
>
> - PDBG("%s found vendor %d device %d type %d\n",
> - __FUNCTION__, vendor, device,
> CHELSIO_CHIP_VERSION(hca_table[i].device >> 8));
> +static struct verbs_device *c4iw_device_alloc(struct verbs_sysfs_dev
> *sysfs_dev)
> +{
> + struct c4iw_dev *dev;
> + struct hca_ent *hca_ent = sysfs_dev->provider_data;
> +
> + c4iw_page_size = sysconf(_SC_PAGESIZE);
> + c4iw_page_shift = long_log2(c4iw_page_size);
> + c4iw_page_mask = ~(c4iw_page_size - 1);
>
> c4iw_page_size = sysconf(_SC_PAGESIZE);
> c4iw_page_shift = long_log2(c4iw_page_size);
> c4iw_page_mask = ~(c4iw_page_size - 1);

The above doesn't look right.

Other than this, the cxgb bits look ok. Did you test it? 😊

Acked-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>