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/[email protected] Fixes: ae6874b ("scsi: megaraid_sas: Early detection of VD deletion through RaidMap update") Acked-by: Sumit Saxena <[email protected]> Signed-off-by: Guixin Liu <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 6290e23 commit 9b78d8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)