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

Commit ba8264d4 authored by Amit Pundir's avatar Amit Pundir
Browse files

ANDROID: USF: Fix MMC/UFS IO latency histograms



Fix MMC/UFS IO latency histograms by aligning with the changes from
upstream commit aebf526b ("block: fold cmd_type into the REQ_OP_ space")

Fixes: android-4.9 commit e2d88788d5b0 ("ANDROID: MMC/UFS IO Latency Histograms.")
Signed-off-by: default avatarAmit Pundir <amit.pundir@linaro.org>
parent ab8e3036
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -2344,10 +2344,13 @@ static int ufshcd_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)

	/* IO svc time latency histogram */
	if (hba != NULL && cmd->request != NULL) {
		if (hba->latency_hist_enabled &&
		    (cmd->request->cmd_type == REQ_TYPE_FS)) {
		if (hba->latency_hist_enabled) {
			switch (req_op(cmd->request)) {
			case REQ_OP_READ:
			case REQ_OP_WRITE:
				cmd->request->lat_hist_io_start = ktime_get();
				cmd->request->lat_hist_enabled = 1;
			}
		} else
			cmd->request->lat_hist_enabled = 0;
	}