Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp358256ybt; Wed, 24 Jun 2020 00:42:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxD+WPlCyAbFHxZWaRELu7BFIhmiPEeTx7Xp7r7MztxtSNanoIi3rriqJmVwKaLk4iT6riJ X-Received: by 2002:a17:906:4cd0:: with SMTP id q16mr15435696ejt.418.1592984541556; Wed, 24 Jun 2020 00:42:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592984541; cv=none; d=google.com; s=arc-20160816; b=uDseloIkbbvr3pATsJDlDw4U+dto8NbCNAOSi6oyTg/7qLr9GDOJih6/pXWzGVHX9F fQCGI4fjtIN9myz/5TDf1Z3idijri16G/c5rZOoyFFRHqk4XR+YPFks+wNz7lwE3uuJK zK7RZmF9J1ErGC+uxyw2OSL0TtODPNsUaTnD8JH6k1GdJfJKX08cCgeBXANbXVKiG3OI xzb71W7DpkgwG55SvHQKOSgLo6nPx6d+1gr2n38+1E0ykMHgMgcnHh9ay0KH3iLW3ikf BYAFFjH8z9aPJOWsYKvkuBjrWPH25aO93cUPb16R/8nllP7QGlPBDy5yPFP1CSJ32YNP I5Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=M1lXlZEsofHnM4YP6dSvdFgmILznueI0uqT9VKT/klI=; b=OlX47ym+I6p8SpvsRZP2Ze3as3uWiNINf01GF9RiXCw9AZ0ZYj1OrEgkhTXpa0ObdN arWgKaSz0qf/ur1fNjd+Ne0X9UqWo/7MT9B3fWgyNB++BAWOweLkgjBDYGTBepm9GJu5 QUhVJRNQZvYdWFZQL35wCAJWJbiPOJZG5s4wjwfNZRkWn0q9LWIhQdDHwww55Gd7d+CH ot+DmPm3BgqYi51ObmxFl3u0nbFnEMXPXv8VYcnaHg2i+vn9czkuq+Ge+/583FLKVKN0 NKXmyWQa9NFyGNm+6n1DDLIqRcqQH4LVDEAbXKjfBHjPQ1s7nnFEV5yH4uav/gARL0B3 Cw+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=lV6vSWqz; 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 r4si8555638edl.262.2020.06.24.00.41.58; Wed, 24 Jun 2020 00:42:21 -0700 (PDT) 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=lV6vSWqz; 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 S2389952AbgFXHlS (ORCPT + 99 others); Wed, 24 Jun 2020 03:41:18 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:29398 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2388375AbgFXHlS (ORCPT ); Wed, 24 Jun 2020 03:41:18 -0400 X-UUID: 5cf62a969b1341c1b72ce22c6faff6d8-20200624 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=M1lXlZEsofHnM4YP6dSvdFgmILznueI0uqT9VKT/klI=; b=lV6vSWqzZAnGgTC1ayCD36KacD71F8a+3JQKtaK8FZDczz9y+9lWPm8pls3A7hGtCIDwRGPtDqMLAs/1rSNo7ypdO2nSul9dae93ULAnLY1PCjG+sP7ct0uOEqR1e8W3usMIBaIdnppb80dUnPEJvUiupU8Qcs4QKfToeQHJP3k=; X-UUID: 5cf62a969b1341c1b72ce22c6faff6d8-20200624 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 206632329; Wed, 24 Jun 2020 15:41:14 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs02n2.mediatek.inc (172.21.101.101) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 24 Jun 2020 15:41:09 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 24 Jun 2020 15:41:09 +0800 From: Stanley Chu To: , , , , CC: , , , , , , , , , , , , , , Stanley Chu Subject: [PATCH v2] scsi: ufs: Disable WriteBooster capability in non-supported UFS device Date: Wed, 24 Jun 2020 15:41:10 +0800 Message-ID: <20200624074110.21919-1-stanley.chu@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 111037EFB6A6EB6B73CD987E5A9257C4C76DD7E8731A4CB5E12BEB870DCCB8762000:8 X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SWYgVUZTIGRldmljZSBpcyBub3QgcXVhbGlmaWVkIHRvIGVudGVyIHRoZSBkZXRlY3Rpb24gb2Yg V3JpdGVCb29zdGVyDQpwcm9iaW5nIGJ5IGRpc2FsbG93ZWQgVUZTIHZlcnNpb24gb3IgZGV2aWNl IHF1aXJrcywgdGhlbiBXcml0ZUJvb3N0ZXINCmNhcGFiaWxpdHkgaW4gaG9zdCBzaGFs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