diff options
author | Sreekanth Reddy <sreekanth.reddy@broadcom.com> | 2022-05-06 00:18:07 +0530 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-05-10 22:18:47 -0400 |
commit | 2dd8389f96d6d00a24816888262e33a85d414c05 (patch) | |
tree | 2b6f42abb0b5ad63a8f8ab4ce6cbdc4d1ab502e1 /drivers/scsi | |
parent | 1aa529d400253eda76733dbb95b62f6cca7b274a (diff) | |
download | lwn-2dd8389f96d6d00a24816888262e33a85d414c05.tar.gz lwn-2dd8389f96d6d00a24816888262e33a85d414c05.zip |
scsi: mpi3mr: Hidden drives not removed during soft reset
If any drive is missing during reset, the driver checks whether the device
is exposed to the OS. If it is, then it removes the device from the OS and
its own internal list. For hidden devices, even if they are found as
missing during reset, the driver is not removing them from its internal
list.
Modify driver to remove hidden devices from the driver's target device list
if they are missing during soft reset.
Link: https://lore.kernel.org/r/20220505184808.24049-2-sreekanth.reddy@broadcom.com
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/mpi3mr/mpi3mr_os.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c index 3a46f8835f00..70da6d8e7c3c 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_os.c +++ b/drivers/scsi/mpi3mr/mpi3mr_os.c @@ -911,9 +911,11 @@ void mpi3mr_rfresh_tgtdevs(struct mpi3mr_ioc *mrioc) list_for_each_entry_safe(tgtdev, tgtdev_next, &mrioc->tgtdev_list, list) { - if ((tgtdev->dev_handle == MPI3MR_INVALID_DEV_HANDLE) && - tgtdev->host_exposed) { - mpi3mr_remove_tgtdev_from_host(mrioc, tgtdev); + if (tgtdev->dev_handle == MPI3MR_INVALID_DEV_HANDLE) { + dprint_reset(mrioc, "removing target device with perst_id(%d)\n", + tgtdev->perst_id); + if (tgtdev->host_exposed) + mpi3mr_remove_tgtdev_from_host(mrioc, tgtdev); mpi3mr_tgtdev_del_from_list(mrioc, tgtdev); mpi3mr_tgtdev_put(tgtdev); } |