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

Commit 717a1ad6 authored by Gilad Broner's avatar Gilad Broner Committed by Subhash Jadavani
Browse files

scsi: sd: separate timeout for discard command



discard command does not necessarily take the same time
as other commands. Distinguishing the timeout for discard
command allows better fine tuning.

Change-Id: Ibb049b9532c064f96d98aa8b8cacce1abe77c776
Signed-off-by: default avatarGilad Broner <gbroner@codeaurora.org>
parent 6e348575
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -699,7 +699,7 @@ static int sd_setup_discard_cmnd(struct scsi_device *sdp, struct request *rq)

	sector >>= ilog2(sdp->sector_size) - 9;
	nr_sectors >>= ilog2(sdp->sector_size) - 9;
	rq->timeout = SD_TIMEOUT;
	rq->timeout = SD_DISCARD_TIMEOUT;

	memset(rq->cmd, 0, rq->cmd_len);

+1 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@
 * Time out in seconds for disks and Magneto-opticals (which are slower).
 */
#define SD_TIMEOUT		(30 * HZ)
#define SD_DISCARD_TIMEOUT	(30 * HZ)
#define SD_MOD_TIMEOUT		(75 * HZ)
#define SD_FLUSH_TIMEOUT	(60 * HZ)
#define SD_WRITE_SAME_TIMEOUT	(120 * HZ)