Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp309323pxb; Mon, 2 Nov 2020 23:22:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJySSJ2jWCIFHzD2fgs8fgtNw5AM9Hh/+BE2xDc4iWBtutnXHoitgE38aBzAXAK8HobVhT45 X-Received: by 2002:aa7:d690:: with SMTP id d16mr20006126edr.329.1604388150468; Mon, 02 Nov 2020 23:22:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604388150; cv=none; d=google.com; s=arc-20160816; b=Ecw3aeLiLbtp+N7tTjOt7DqB64mPX/jpS24euzO9DX2hgkzvf1sPyUVGsaAflS/TqG 7xRS34cpeyf2PA+jk7VpwYALY5YZZCCZ4i4b2o3T3vpzAPdPfrKv4MfRlwDBUT6hIqj5 TFnvo1EmxDLLblimwqPwlJYxxQIoJEZn5PeRJBAxS09gNgGdd55oG9EF2ImbFs9Gg5Dq 1Aqc6hPTLPulIw2aEalwhdLMZb1esD0+blgo4xJKT6vf0ZLuW2IXwfsd605RInSLgE/1 6nUuX16+zE4N+BaPgDzk9/t4YSBD63mNvyuan/jprtKTu5jLQT11+OwQywF6c0PRg8xY 7JdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=0HiuX72A5+naga0hM0w9UJh608t4BeLqxJLiQScTmkA=; b=reEGh1PLkP4MTXVyhUsexb/ut/BnvNEGptV39YNMnq7eJCtyItJVS3EPNt2sdOyaWo H64OlJX47iC2vyBM2h0cJDK2EYCbJDew5227x3EfUlJebewU06zwQWqks/GNeJWwhmto Q4w9hSAf8giUdLUM4jHgY5Meu61SqpSQjVYBP+Cw79DY6pAKKYZ8fUzmyWmtqcNy+rqJ t30MP/1nG2oudHGGsx+ONQmQdR2wxHlkhABGxrbJ2TmsH81mI4YGtm+aJXFbNv/4dqyF drE4U1W1vMgPTLcQ0mHwp9j8LPo12JlSYTi7ho8lYbhvPZaHaQeGnHAUGs69u26CQquu 6+Aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=l1EW4HR2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n2si14616461edi.564.2020.11.02.23.22.08; Mon, 02 Nov 2020 23:22:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=l1EW4HR2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727800AbgKCHUd (ORCPT + 99 others); Tue, 3 Nov 2020 02:20:33 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:39126 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725958AbgKCHUd (ORCPT ); Tue, 3 Nov 2020 02:20:33 -0500 X-UUID: 96c071cbbcdd4140a365f2f15d76e184-20201103 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=0HiuX72A5+naga0hM0w9UJh608t4BeLqxJLiQScTmkA=; b=l1EW4HR2xeaEpzxY/ZsLYfhAh71ejkWfU9vMAJUNpk/Gil2rbv7CCxsebbeNETLAx0RpSoBSOv96N+cgJ9HkTPOeeFnEkRBQJEtxmu5MAhZWWELAN9ML8INEubKhqiJLFRQjlC5XoYOdWO0JdJm3U+g0awH2PHanBmM2vQAf5Xw=; X-UUID: 96c071cbbcdd4140a365f2f15d76e184-20201103 Received: from mtkcas11.mediatek.inc [(172.21.101.40)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 490589687; Tue, 03 Nov 2020 15:20:26 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 3 Nov 2020 15:20:23 +0800 Received: from [172.21.77.33] (172.21.77.33) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 3 Nov 2020 15:20:23 +0800 Message-ID: <1604388023.13152.4.camel@mtkswgap22> Subject: Re: [PATCH v1 2/2] scsi: ufs: Try to save power mode change and UIC cmd completion timeout From: Stanley Chu To: Can Guo CC: , , , , , , , , "Alim Akhtar" , Avri Altman , "James E.J. Bottomley" , "Martin K. Petersen" , Bean Huo , "Bart Van Assche" , Satya Tangirala , open list Date: Tue, 3 Nov 2020 15:20:23 +0800 In-Reply-To: <1604384682-15837-3-git-send-email-cang@codeaurora.org> References: <1604384682-15837-1-git-send-email-cang@codeaurora.org> <1604384682-15837-3-git-send-email-cang@codeaurora.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 MIME-Version: 1.0 X-TM-SNTS-SMTP: 8A9DC330F4C6F4935391C02EBF470A1CB124EA8405DA8D9DDCE34028D1CA38E02000:8 X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SGkgQ2FuLA0KDQpFeGNlcHQgZm9yIGJlbG93I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