dmaengine: ioat: Support in-use unbind
authorLogan Gunthorpe <logang@deltatee.com>
Mon, 16 Dec 2019 19:01:20 +0000 (12:01 -0700)
committerVinod Koul <vkoul@kernel.org>
Tue, 24 Dec 2019 04:48:37 +0000 (10:18 +0530)
commitbf453a0a18b224f1379658245c892fd9e1907580
treeb37d4e4917717e30477092f790ac8ed5cebfbfe4
parent8ad342a863590b24ce77681b7e081363fb3333f7
dmaengine: ioat: Support in-use unbind

Don't allocate memory using the devm infrastructure and instead call
kfree with the new dmaengine device_release call back. This ensures
the structures are available until the last reference is dropped.

We also need to ensure we call ioat_shutdown() in ioat_remove() so
that all the channels are quiesced and further transaction fails.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Acked-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/20191216190120.21374-6-logang@deltatee.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/ioat/init.c