This is a note to let you know that I've just added the patch titled scsi: mpt3sas: Only one vSES is present even when IOC has multi vSES to the 5.12-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: scsi-mpt3sas-only-one-vses-is-present-even-when-ioc-has-multi-vses.patch and it can be found in the queue-5.12 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 4c51f956965120b3441cdd39c358b87daba13e19 Mon Sep 17 00:00:00 2001 From: Sreekanth Reddy <sreekanth.reddy@xxxxxxxxxxxx> Date: Tue, 30 Mar 2021 16:20:04 +0530 Subject: scsi: mpt3sas: Only one vSES is present even when IOC has multi vSES From: Sreekanth Reddy <sreekanth.reddy@xxxxxxxxxxxx> commit 4c51f956965120b3441cdd39c358b87daba13e19 upstream. Whenever the driver is adding a vSES to virtual-phys list it is reinitializing the list head. Hence those vSES devices which were added previously are lost. Stop reinitializing the list every time a new vSES device is added. Link: https://lore.kernel.org/r/20210330105004.20413-1-sreekanth.reddy@xxxxxxxxxxxx Cc: stable@xxxxxxxxxxxxxxx #v5.11.10+ Signed-off-by: Sreekanth Reddy <sreekanth.reddy@xxxxxxxxxxxx> Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c @@ -6483,6 +6483,9 @@ _scsih_alloc_vphy(struct MPT3SAS_ADAPTER if (!vphy) return NULL; + if (!port->vphys_mask) + INIT_LIST_HEAD(&port->vphys_list); + /* * Enable bit corresponding to HBA phy number on its * parent hba_port object's vphys_mask field. @@ -6490,7 +6493,6 @@ _scsih_alloc_vphy(struct MPT3SAS_ADAPTER port->vphys_mask |= (1 << phy_num); vphy->phy_mask |= (1 << phy_num); - INIT_LIST_HEAD(&port->vphys_list); list_add_tail(&vphy->list, &port->vphys_list); ioc_info(ioc, Patches currently in stable-queue which might be from sreekanth.reddy@xxxxxxxxxxxx are queue-5.12/scsi-mpt3sas-block-pci-config-access-from-userspace-during-reset.patch queue-5.12/scsi-mpt3sas-only-one-vses-is-present-even-when-ioc-has-multi-vses.patch