mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-25 07:51:28 +00:00
qla2x00t-32gbit: add module to ops template to allow module references
In nvme-fc: it's possible to have connected active controllers and as no references are taken on the LLDD, the LLDD can be unloaded. The controller would enter a reconnect state and as long as the LLDD resumed within the reconnect timeout, the controller would resume. But if a namespace on the controller is the root device, allowing the driver to unload can be problematic. To reload the driver, it may require new io to the boot device, and as it's no longer connected we get into a catch-22 that eventually fails, and the system locks up. Fix this issue by taking a module reference for every connected controller (which is what the core layer did to the transport module). Reference is cleared when the controller is removed. Acked-by: Himanshu Madhani <hmadhani@marvell.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Smart <jsmart2021@gmail.com> Signed-off-by: Keith Busch <kbusch@kernel.org> [ commit 863fbae929c7a5b64e96b8a3ffb34a29eefb9f8f upstream ] git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8723 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -621,6 +621,13 @@ static void qla_nvme_remoteport_delete(struct nvme_fc_remote_port *rport)
|
||||
}
|
||||
|
||||
static struct nvme_fc_port_template qla_nvme_fc_transport = {
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0)
|
||||
/*
|
||||
* See also commit 863fbae929c7 ("nvme_fc: add module to ops template
|
||||
* to allow module references").
|
||||
*/
|
||||
.module = THIS_MODULE,
|
||||
#endif
|
||||
.localport_delete = qla_nvme_localport_delete,
|
||||
.remoteport_delete = qla_nvme_remoteport_delete,
|
||||
.create_queue = qla_nvme_alloc_queue,
|
||||
|
||||
Reference in New Issue
Block a user