Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3114209pxu; Mon, 14 Dec 2020 21:48:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJwDLFKzjN6GXnCKiJ7HRggZKUF0PRW+QBHozNNKoE5BESOTBOYChNWvyji1qLd+GdxapZZP X-Received: by 2002:a17:906:4a4f:: with SMTP id a15mr26033256ejv.541.1608011331374; Mon, 14 Dec 2020 21:48:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608011331; cv=none; d=google.com; s=arc-20160816; b=zAzPOcnhrCZV56HS9dqXtWgAj7ZjqugtuXHRBnTAtLC5XHuuxfoci1COVceYXxXJbf myzMtl1Pzd6ke4OZB81z/o1yfZqGz3xu6DMFd2N5gUDFK3HplR8KLTsTx7wu6wZrYK+G Mx7LNCg4oPtelTte9ljBf8iDnkr0c6r/qwT3vfaBa8zfPzL2hV/tzxBN28EL4+t1g0wr TxezOiobgiWLTshu8a1Ro1wOM48aMHtPsFGA7uYUuDwL1YgsePicolrUZGwtw+jMkQ/e tPMf5NBz4nphGpYkrqOBNBuZZ00EujJktonjT5fCw5TvN+nAKx6DSlmqlKUQSA33Rz/x GT+w== 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=erBQqg/F/LfS/jBrYQvaDd8rg9F1KF/FXw+LXNZwJhw=; b=KWpmdvKbWkKW7doeaGZ9sdz+s45Y+oidkkMCoCIyFehskhfdLo1MC+avzmpPSUmNBX rd1gH3flq7VvKjVgJPLmXaOjUDimxb+PTxViWQwxe93RZfIg6ZNENtbvUNKleiZ1ex5K FFXlnwsjgCHBV6CmHDsM+5OWLW0YYzLrBui6XoQUP+RCSDc9UBelZA7MrImCL4RCK1J0 kwf1cRvsoqbaB6XTE0NVZ4kvNf4xb2n7rDVN02NHdvNWKr3l0okeVOH4ZfXheamzEdSy YsMubFL5nqbAsLqk0OybjYosQgigblHhbSvAPC8A4F6Lgcb1GyVLEhQLTiRtXCXFKwJy ZuBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=oa4zcLYl; 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 o6si371266ejj.354.2020.12.14.21.48.28; Mon, 14 Dec 2020 21:48:51 -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=oa4zcLYl; 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 S1725775AbgLOFpC (ORCPT + 99 others); Tue, 15 Dec 2020 00:45:02 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:58385 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725889AbgLOFoW (ORCPT ); Tue, 15 Dec 2020 00:44:22 -0500 X-UUID: 22a1ba6971754b448c6bddf86184d764-20201215 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=erBQqg/F/LfS/jBrYQvaDd8rg9F1KF/FXw+LXNZwJhw=; b=oa4zcLYlOklTWYvDD4CEZi8atQqCaXUKlK75L1cI3U6agwjsEzvlg9kvIAKvN7YdkzYvxbXzjIlc0Qr7yY1V6T/XsjOzJEs9JCS5KER9Py4orLayZ+RAbX+yPdPsFsMahZcd0+a2ifdQzBBmeDoZyHwlQXq2nq8BcZYPEbXue18=; X-UUID: 22a1ba6971754b448c6bddf86184d764-20201215 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw02.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 1152028715; Tue, 15 Dec 2020 13:43:33 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 15 Dec 2020 13:43:32 +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, 15 Dec 2020 13:43:32 +0800 Message-ID: <1608011011.10163.9.camel@mtkswgap22> Subject: Re: [PATCH v4 1/3] scsi: ufs: Protect some contexts from unexpected clock scaling 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, 15 Dec 2020 13:43:31 +0800 In-Reply-To: <1607877104-8916-2-git-send-email-cang@codeaurora.org> References: <1607877104-8916-1-git-send-email-cang@codeaurora.org> <1607877104-8916-2-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-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SGkgQ2FuLA0KDQpPbiBTdW4sIDIwMjAtMTItMTMgYXQgMDg6MzEgLTA4MDAsIENhbiBHdW8gd3Jv dGU6DQo+IEluIGNvbnRleHRzIGxp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