Skip to content

Commit 9b78d8f

Browse files
guixinliu1995martinkpetersen
authored andcommitted
scsi: megaraid_sas: Correct value passed to scsi_device_lookup()
The "id" parameter currently passed to scsi_device_lookup() when removing a device is incorrect. It should be "ld_target_id % MEGASAS_MAX_DEV_PER_CHANNEL". Link: https://lore.kernel.org/r/1663145283-4872-2-git-send-email-kanie@linux.alibaba.com Fixes: ae6874b ("scsi: megaraid_sas: Early detection of VD deletion through RaidMap update") Acked-by: Sumit Saxena <sumit.saxena@broadcom.com> Signed-off-by: Guixin Liu <kanie@linux.alibaba.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 6290e23 commit 9b78d8f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/scsi/megaraid/megaraid_sas_base.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8924,7 +8924,7 @@ megasas_aen_polling(struct work_struct *work)
89248924
sdev1 = scsi_device_lookup(instance->host,
89258925
MEGASAS_MAX_PD_CHANNELS +
89268926
(ld_target_id / MEGASAS_MAX_DEV_PER_CHANNEL),
8927-
(ld_target_id - MEGASAS_MAX_DEV_PER_CHANNEL),
8927+
(ld_target_id % MEGASAS_MAX_DEV_PER_CHANNEL),
89288928
0);
89298929
if (sdev1)
89308930
megasas_remove_scsi_device(sdev1);

0 commit comments

Comments
 (0)