From patchwork Tue Apr 19 01:36:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Bao D. Nguyen" X-Patchwork-Id: 563456 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2515DC433F5 for ; Tue, 19 Apr 2022 01:37:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245483AbiDSBkE (ORCPT ); Mon, 18 Apr 2022 21:40:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235649AbiDSBkC (ORCPT ); Mon, 18 Apr 2022 21:40:02 -0400 Received: from alexa-out-sd-01.qualcomm.com (alexa-out-sd-01.qualcomm.com [199.106.114.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C392201BE; Mon, 18 Apr 2022 18:37:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1650332242; x=1681868242; h=from:to:cc:subject:date:message-id:mime-version; bh=tmgwZkvCV2R6IyuCglak7yhL3N9zBgqGkPbpA6ubX9c=; b=JzyHl3yLWykIOmzk0BxiSjdnYx+7WcT9SiV2Kdbx6jxZw+xeOK+xqAIf 5kBqdoVLVqtg8BXEDaWKlLSY3XOPCsVsU2rpyQkr4NAWnasRnG0yRmoj1 X0q2LCUdkFymsrm5Hu3fT3RXoZ00ePQMNrL7k1cb0i4/o3pucDb3A2umO A=; Received: from unknown (HELO ironmsg01-sd.qualcomm.com) ([10.53.140.141]) by alexa-out-sd-01.qualcomm.com with ESMTP; 18 Apr 2022 18:37:21 -0700 X-QCInternal: smtphost Received: from unknown (HELO nasanex01a.na.qualcomm.com) ([10.52.223.231]) by ironmsg01-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2022 18:37:21 -0700 Received: from stor-berry.qualcomm.com (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Mon, 18 Apr 2022 18:37:20 -0700 From: "Bao D. Nguyen" To: , , , CC: "Bao D. Nguyen" , , Alim Akhtar , "Avri Altman" , "James E.J. Bottomley" , Bart Van Assche , Bean Huo , "Daejun Park" , Adrian Hunter , "Can Guo" , Asutosh Das , open list Subject: [PATCH v1 1/1] scsi: ufs: Increase the UIC command timeout to 5 seconds Date: Mon, 18 Apr 2022 18:36:05 -0700 Message-ID: <55bd9cf4216e80e73e63cf25c042d60e67592b44.1650331167.git.quic_nguyenb@quicinc.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01a.na.qualcomm.com (10.52.223.231) Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Increase the UIC command timeout to avoid false and unnecessary UFS errors printout. There are increasing number of false UIC command timeout error events where the actual cause of the issues is interrupt starvation. When looking into these issues closely, it was clear that the UIC command completed successfully, but the CPUs were hogged by other subsystems for more than 500ms, causing a false UIC command timeout. Increase the UIC command timeout to 5 seconds to avoid false and time consuming support calls so that we can shift the focus to where the real issue would be. Signed-off-by: Bao D. Nguyen --- drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 3f9caaf..806acf4 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -35,7 +35,7 @@ UTP_TASK_REQ_COMPL |\ UFSHCD_ERROR_MASK) /* UIC command timeout, unit: ms */ -#define UIC_CMD_TIMEOUT 500 +#define UIC_CMD_TIMEOUT 5000 /* NOP OUT retries waiting for NOP IN response */ #define NOP_OUT_RETRIES 10