Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: aacraid: Use correct channel number for raw srb

The channel being used for raw srb commands is retrieved from the utility
sent fibs and is converted into physical channel id. The driver does not
need to to do this since the management utility sends the correct channel
id in the first place and in addition the driver sets inaccurate
information in the cmd sent to the firmware and gets an invalid response.

Fixed by using channel id from srb command.

Cc: stable@vger.kernel.org
Fixes: 423400e64d377c0 ("scsi: aacraid: Include HBA direct interface")
Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Reviewed-by: David Carroll <David.Carroll@microsemi.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Raghava Aditya Renukunta and committed by
Martin K. Petersen
f3ef4a74 1c68856e

+1 -1
+1 -1
drivers/scsi/aacraid/commctrl.c
··· 580 580 goto cleanup; 581 581 } 582 582 583 - chn = aac_logical_to_phys(user_srbcmd->channel); 583 + chn = user_srbcmd->channel; 584 584 if (chn < AAC_MAX_BUSES && user_srbcmd->id < AAC_MAX_TARGETS && 585 585 dev->hba_map[chn][user_srbcmd->id].devtype == 586 586 AAC_DEVTYPE_NATIVE_RAW) {