]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
scsi: aacraid: Use correct channel number for raw srb
authorRaghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Thu, 16 Feb 2017 20:51:11 +0000 (12:51 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 22 Feb 2017 23:41:41 +0000 (18:41 -0500)
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>
drivers/scsi/aacraid/commctrl.c

index 614842a9eb07feddab170096d165d9f6031abe35..f6afd50579c038bcf0f2257a62733a828344e59d 100644 (file)
@@ -580,7 +580,7 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg)
                goto cleanup;
        }
 
-       chn = aac_logical_to_phys(user_srbcmd->channel);
+       chn = user_srbcmd->channel;
        if (chn < AAC_MAX_BUSES && user_srbcmd->id < AAC_MAX_TARGETS &&
                dev->hba_map[chn][user_srbcmd->id].devtype ==
                AAC_DEVTYPE_NATIVE_RAW) {