Re: [Patch v10 01/12] net: mana: Add support for auxiliary device

From: Leon Romanovsky
Date: Tue Nov 08 2022 - 14:18:29 EST


On Thu, Nov 03, 2022 at 12:16:19PM -0700, longli@xxxxxxxxxxxxxxxxx wrote:
> From: Long Li <longli@xxxxxxxxxxxxx>
>
> In preparation for supporting MANA RDMA driver, add support for auxiliary
> device in the Ethernet driver. The RDMA device is modeled as an auxiliary
> device to the Ethernet device.
>
> Reviewed-by: Dexuan Cui <decui@xxxxxxxxxxxxx>
> Signed-off-by: Long Li <longli@xxxxxxxxxxxxx>
> Acked-by: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>
> ---
> Change log:
> v3: define mana_adev_idx_alloc and mana_adev_idx_free as static
> v7: fix a bug that may assign a negative value to adev->id

<...>

> int mana_probe(struct gdma_dev *gd, bool resuming)
> {
> struct gdma_context *gc = gd->gdma_context;
> @@ -2173,6 +2249,8 @@ int mana_probe(struct gdma_dev *gd, bool resuming)
> break;
> }
> }
> +
> + err = add_adev(gd);
> out:
> if (err)
> mana_remove(gd, false);
> @@ -2189,6 +2267,10 @@ void mana_remove(struct gdma_dev *gd, bool suspending)
> int err;
> int i;
>
> + /* adev currently doesn't support suspending, always remove it */
> + if (gd->adev)

This condition is always true, isn't it?

> + remove_adev(gd);
> +

Thanks