Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1735379imm; Fri, 6 Jul 2018 05:41:54 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfOlz8OxUSRSzxPAt2hwbL44dyrAKLfWWJXRsU89yxaEppBJHl+mltjpP3nV/2rRugh8wLV X-Received: by 2002:a63:7252:: with SMTP id c18-v6mr9075047pgn.186.1530880914917; Fri, 06 Jul 2018 05:41:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530880914; cv=none; d=google.com; s=arc-20160816; b=UvQ71sLEhPZ4ayyA3kQHNdX7T0So+kZs2SNeYysRE9ReFeAtwHTqeuaWgtF0eetcmV UYxJT4g7l7AwfWaNLO8IeH0vrGd/W2McgFmuAtJyfTIpYM1lTpwm8cDqpWPtrhDy1FmR U3C+lIMUhRRACKTQ1MfZ2RSwCDFTfbueofHg5YQbH6dEkGonwf+6fFyD+E9xW+6jBQ4T CkiiSzbFpcA+HuvuxWStDbA566/XY/RUcvrB4VvLqFsXT9XGIQXQN3ieOqPsioePH5Iw zBhfPMfWFI7OwIC3iWIIvBODawL8i14J9D5bZJ9bzQJPymSId1ceynSd8P7xp/5IIXia MquQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=9/VsXFcSno3uPlarKeWAhPNd4xKUNNQbBQD9h4QOtj8=; b=D4XbnagG8CmDEfAeeH7lnJE6cTaJ+RRPVgUOMtcOGCreE5mE1C6/sGOz0JVu+l8QUg GphQysdqht8bM05yJB4jGdAK0OoWSskt0JH13H6+rvXuuFTyX8R0R4TQzG7g0vhj0BF3 RgqywwKI+/Ui/uWM7uUiBQFRG3Wuzu1s04YHZ4dXCvfaXt4cc/z6tQGsstyUwN7oSsM1 2gSspDYxjtQsTZEuHco9iwksufHE77TDZHG7lSXC1DvjP3NGfc1564EELlBVmWmt0EL0 J51yd93/2gObeyN5kBW/EoK6pFm4HDs8lYDLwUnIUWLYZj159i+ksm0E3YQ66t33N5rk Ngew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h16-v6si8034928pgb.39.2018.07.06.05.41.40; Fri, 06 Jul 2018 05:41:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933275AbeGFMk3 (ORCPT + 99 others); Fri, 6 Jul 2018 08:40:29 -0400 Received: from alexa-out-blr-02.qualcomm.com ([103.229.18.198]:32534 "EHLO alexa-out-blr.qualcomm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933116AbeGFMin (ORCPT ); Fri, 6 Jul 2018 08:38:43 -0400 X-IronPort-AV: E=Sophos;i="5.51,316,1526322600"; d="scan'208";a="98690" Received: from ironmsg03-blr.qualcomm.com ([10.86.208.132]) by alexa-out-blr.qualcomm.com with ESMTP/TLS/AES256-SHA; 06 Jul 2018 18:00:51 +0530 X-IronPort-AV: E=McAfee;i="5900,7806,8945"; a="470256" Received: from asutoshd-linux.qualcomm.com ([10.206.24.163]) by ironmsg03-blr.qualcomm.com with ESMTP; 06 Jul 2018 18:00:51 +0530 Received: by asutoshd-linux.qualcomm.com (Postfix, from userid 92687) id 82DA82FAD; Fri, 6 Jul 2018 18:00:50 +0530 (IST) From: Asutosh Das To: subhashj@codeaurora.org, cang@codeaurora.org, vivek.gautam@codeaurora.org, rnayak@codeaurora.org, vinholikatti@gmail.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org Cc: Sujit Reddy Thumma , linux-arm-msm@vger.kernel.org, Gilad Broner , Asutosh Das , linux-kernel@vger.kernel.org (open list) Subject: [PATCH v1 3/9] scsi: ufs: Override auto suspend tunables for ufs Date: Fri, 6 Jul 2018 18:00:30 +0530 Message-Id: <6981189193244970a912c8b3f390a00bc37ed14a.1530880006.git.asutoshd@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sujit Reddy Thumma Override auto suspend tunables for UFS device LUNs during initialization so as to efficiently manage background operations and the power consumption. Signed-off-by: Sujit Reddy Thumma Signed-off-by: Gilad Broner Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufshcd.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 77e2b3e..b03f3ea 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -89,6 +89,9 @@ /* Interrupt aggregation default timeout, unit: 40us */ #define INT_AGGR_DEF_TO 0x02 +/* default value of auto suspend is 3 seconds */ +#define UFSHCD_AUTO_SUSPEND_DELAY_MS 3000 /* millisecs */ + #define ufshcd_toggle_vreg(_dev, _vreg, _on) \ ({ \ int _ret; \ @@ -4528,6 +4531,9 @@ static int ufshcd_slave_configure(struct scsi_device *sdev) blk_queue_update_dma_pad(q, PRDT_DATA_BYTE_COUNT_PAD - 1); blk_queue_max_segment_size(q, PRDT_DATA_BYTE_COUNT_MAX); + sdev->autosuspend_delay = UFSHCD_AUTO_SUSPEND_DELAY_MS; + sdev->use_rpm_auto = 1; + return 0; } -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.