On Fri, Apr 26, 2019 at 11:36:56AM -0300, Jason Gunthorpe wrote: > On Fri, Apr 26, 2019 at 06:12:11PM +0800, Liuyixian (Eason) wrote: > > > However, I have talked with our chip team about function clear > > functionality. We think it is necessary to inform the chip to > > perform the outstanding task and some cleanup work and restore > > hardware resources in time when rmmod ko. Otherwise, it is > > dangerous to reuse the hardware as it can not guarantee those > > work can be done well without the notification from our driver. > > If it is dangerous to reuse the hardware then you have to do this > cleanup on device startup, not on device removal. Right, I can think about gazillion ways to brick such HW. The simplest way will be to call SysRq during RDMA traffic and no cleanup function will be called in such case. Thanks > > Jason