RE: [Patch v7 01/12] net: mana: Add support for auxiliary device

From: Long Li
Date: Wed Oct 19 2022 - 15:52:05 EST


> Subject: Re: [Patch v7 01/12] net: mana: Add support for auxiliary device
>
> On 2022/10/18 3:20, 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.
>
> If the RDMA device is a auxiliary device in the Ethernet driver, is there some
> type of hw reset that affect both net_device and ib_device?
> Is there some kind of handling like pcie hot plug/unplug which already
> handles this case, so the reset handling is not needed in the RDMA and
> Ethernet driver?

The PCI plug/unplug will result in loading/unloading the mana ethernet device,
In mana_remove (), it calls auxiliary_device_delete() first that handles the removal
of the mana_ib device before the ethernet device is removed.

On Hyper-v, PCI ejection events are handled by pci-hyperv (in drivers/pci/controller/pci-hyperv.c)

>
>
> >
> > 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
> >
> > drivers/net/ethernet/microsoft/Kconfig | 1 +
> > drivers/net/ethernet/microsoft/mana/gdma.h | 2 +
> > .../ethernet/microsoft/mana/mana_auxiliary.h | 10 +++
> > drivers/net/ethernet/microsoft/mana/mana_en.c | 83
> ++++++++++++++++++-