Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 32d8745c authored by Sumit.Saxena@lsi.com's avatar Sumit.Saxena@lsi.com Committed by James Bottomley
Browse files

[SCSI] megaraid_sas: Set IO request timeout value provided by OS timeout for Tape devices

parent 105900d5
Loading
Loading
Loading
Loading
+12 −0
Original line number Original line Diff line number Diff line
@@ -1527,6 +1527,18 @@ megasas_build_dcdb_fusion(struct megasas_instance *instance,
			 MEGASAS_REQ_DESCRIPT_FLAGS_TYPE_SHIFT);
			 MEGASAS_REQ_DESCRIPT_FLAGS_TYPE_SHIFT);
		cmd->request_desc->SCSIIO.DevHandle =
		cmd->request_desc->SCSIIO.DevHandle =
			local_map_ptr->raidMap.devHndlInfo[device_id].curDevHdl;
			local_map_ptr->raidMap.devHndlInfo[device_id].curDevHdl;
		/*
		 * If the command is for the tape device, set the
		 * FP timeout to the os layer timeout value.
		 */
		if (scmd->device->type == TYPE_TAPE) {
			if ((scmd->request->timeout / HZ) > 0xFFFF)
				io_request->RaidContext.timeoutValue =
					0xFFFF;
			else
				io_request->RaidContext.timeoutValue =
					scmd->request->timeout / HZ;
		}
	} else {
	} else {
		io_request->Function  = MEGASAS_MPI2_FUNCTION_LD_IO_REQUEST;
		io_request->Function  = MEGASAS_MPI2_FUNCTION_LD_IO_REQUEST;
		io_request->DevHandle = device_id;
		io_request->DevHandle = device_id;