Re: [PATCH for-next 5/6] RDMA/bnxt_re: Use driver_unregister and unregistration API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 19, 2020 at 02:57:45PM +0530, Selvin Xavier wrote:
> > > On hypervisor, if we don't set rdev->rcfw.res_deinit as done in this
> > > patch, when VF removal is initiated,
> > > the first command will timeout and driver will stop sending any more commands
> > > to FW and proceed with removal. All VFs will exit in the same way.
> > > Just that each
> > > function will wait for one command to timeout. Setting
> > > rdev->rcfw.res_deinit was added
> > > as a hack to avoid this  waiting time.
> >
> > The issue is that pci_driver_unregister undoes the driver binds in
> > FIFO not LIFO order?
> >
> > What happens when the VF binds after the PF?
> 
> This is not dependent on PCI driver unregister. This particular issue
> is happening when bnxt_re
> driver only  is unloaded and the new  ib_unregister_driver is invoked
> by bnxt_re driver in the mod_exit hook.

Oh, now I remember, this driver sits on top of netdev using the
notification stuff so things are a little weird.

> dealloc_driver for each IB device  is called mostly in FIFO
> order(using xa_for_each).  So since PF ib device was added first, it
> gets removed and then VF is removed.

I see.. You could probably arrange to remove your VFs first, then call
ib_unregister_driver() to finish it up and serialize away any
races. That would be reasonably clean and much better than hacking
special stuff in.

> Shall i repost by removing this hack?

Please

Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux