mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
scsi: megaraid_sas: Do not set fp_possible if TM capable for non-RW syspdIO, change fp_possible to bool
FIX - firmware wants non-RW SYS PD IOs to avoid FastPath for better tracking and other functionalities if the device is task management capable. Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
25fb13dd2d
commit
1d6dbd1752
1 changed files with 10 additions and 5 deletions
|
@ -2566,7 +2566,8 @@ static void megasas_build_ld_nonrw_fusion(struct megasas_instance *instance,
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
megasas_build_syspd_fusion(struct megasas_instance *instance,
|
megasas_build_syspd_fusion(struct megasas_instance *instance,
|
||||||
struct scsi_cmnd *scmd, struct megasas_cmd_fusion *cmd, u8 fp_possible)
|
struct scsi_cmnd *scmd, struct megasas_cmd_fusion *cmd,
|
||||||
|
bool fp_possible)
|
||||||
{
|
{
|
||||||
u32 device_id;
|
u32 device_id;
|
||||||
struct MPI2_RAID_SCSI_IO_REQUEST *io_request;
|
struct MPI2_RAID_SCSI_IO_REQUEST *io_request;
|
||||||
|
@ -2687,6 +2688,8 @@ megasas_build_io_fusion(struct megasas_instance *instance,
|
||||||
int sge_count;
|
int sge_count;
|
||||||
u8 cmd_type;
|
u8 cmd_type;
|
||||||
struct MPI2_RAID_SCSI_IO_REQUEST *io_request = cmd->io_request;
|
struct MPI2_RAID_SCSI_IO_REQUEST *io_request = cmd->io_request;
|
||||||
|
struct MR_PRIV_DEVICE *mr_device_priv_data;
|
||||||
|
mr_device_priv_data = scp->device->hostdata;
|
||||||
|
|
||||||
/* Zero out some fields so they don't get reused */
|
/* Zero out some fields so they don't get reused */
|
||||||
memset(io_request->LUN, 0x0, 8);
|
memset(io_request->LUN, 0x0, 8);
|
||||||
|
@ -2715,12 +2718,14 @@ megasas_build_io_fusion(struct megasas_instance *instance,
|
||||||
megasas_build_ld_nonrw_fusion(instance, scp, cmd);
|
megasas_build_ld_nonrw_fusion(instance, scp, cmd);
|
||||||
break;
|
break;
|
||||||
case READ_WRITE_SYSPDIO:
|
case READ_WRITE_SYSPDIO:
|
||||||
|
megasas_build_syspd_fusion(instance, scp, cmd, true);
|
||||||
|
break;
|
||||||
case NON_READ_WRITE_SYSPDIO:
|
case NON_READ_WRITE_SYSPDIO:
|
||||||
if (instance->secure_jbod_support &&
|
if (instance->secure_jbod_support ||
|
||||||
(cmd_type == NON_READ_WRITE_SYSPDIO))
|
mr_device_priv_data->is_tm_capable)
|
||||||
megasas_build_syspd_fusion(instance, scp, cmd, 0);
|
megasas_build_syspd_fusion(instance, scp, cmd, false);
|
||||||
else
|
else
|
||||||
megasas_build_syspd_fusion(instance, scp, cmd, 1);
|
megasas_build_syspd_fusion(instance, scp, cmd, true);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue