Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1256977ybj; Thu, 7 May 2020 19:23:49 -0700 (PDT) X-Google-Smtp-Source: APiQypKl53Eb6GxGpbCnczwqWI5dAzjT506BunvuGyMIZVd8TBHb/gTuAlUe+z/Cao8J22rvwZM2 X-Received: by 2002:a05:6402:17e3:: with SMTP id t3mr311199edy.203.1588904629725; Thu, 07 May 2020 19:23:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588904629; cv=none; d=google.com; s=arc-20160816; b=iZRZHuKvLJNLxKxKAetRcFSohRJqIIegAxsv3qM78Tj/HBM5ZDJBNQFC1aCDGjYh8N HcV+EXa0HqnrbiGPGJ9BrcCHz2N08TWGLnAl+wG+cWikfFOaH8TgdZE3WTHwY+E29pPu BgKpuWIdMaWRCVSfLVJ7G4hYMr7/WR0LaRLmVY5SKpmxBtUvp95fa/F9tT8mNWRAip1Z cj96jnATktVSe16AXCmGk9F+Sob/KtdzN3m9+QVQTVcQgY8WY8Khw+yovpA7/nRBqfcv hCSQXHd28lnW4Q/f/qu+3NDESB9IvKNPNdlNYZr+kJhIXKgV1X5gMx/R2zAKwCAV9au0 1ZnA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JBuZf0Qkj65b9uld8oTOWr8+VQkGT4GG8umDIgvSSr0=; b=kgr6vBjoBPQwzlDpQhn/KPWcSjlZ8vpWLvv6AUN4rLjmEf9cblnoJzZx4EiwCqDlM/ igiwd6UCNaE3h2aOLyvEjwfgPmM/ByhQ6JK4ZOLqQNCqnO6augGT72mZgTltzp5JIe0/ XjRr1Zj8j2hXV6ZOz5wGs+Hf8vIu5IIkIoB2E+RJwgHknAhC9pHTm9Ta5xInJXGKOQBh mo3yu6Za1H9oQhQx2dg5ZNeNowKy85UGDP14KmCLtCJh0nwW9hE6dc1AiWAk/mVpXNDk ZwmcqsYnB3GfvhtkTpStCjH5p68A+Atavt7cXjq/JtdW91Zjaip5jiUm64wssvWJtE73 Ahdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=MeYlboo+; 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 f25si146949edw.292.2020.05.07.19.23.27; Thu, 07 May 2020 19:23:49 -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=MeYlboo+; 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 S1727856AbgEHCV7 (ORCPT + 99 others); Thu, 7 May 2020 22:21:59 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:24446 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727787AbgEHCV5 (ORCPT ); Thu, 7 May 2020 22:21:57 -0400 X-UUID: 23898d550abb48a898a673d8e1e4e46a-20200508 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:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=JBuZf0Qkj65b9uld8oTOWr8+VQkGT4GG8umDIgvSSr0=; b=MeYlboo+DQFwJ9ZKtehayEmbSgTzhdghrHDnsLazQNmlFgRK/wbmyCsu5TfjUhtqMD2T6Jm3UtUtJew8DHiBT8z+6SMh/loPHOb4Z9eoDVYDDEBWmVDenUoXSrTfSMIvH6Duhk+s7yY1Bn7beSiG1ZeXTteeQ9GTTqU1Q2BfMuY=; X-UUID: 23898d550abb48a898a673d8e1e4e46a-20200508 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 62124899; Fri, 08 May 2020 10:21:49 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs02n2.mediatek.inc (172.21.101.101) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 8 May 2020 10:21:41 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 8 May 2020 10:21:41 +0800 From: Stanley Chu To: , , , , , CC: , , , , , , , , , , , Stanley Chu Subject: [PATCH v7 1/8] scsi: ufs: enable WriteBooster on some pre-3.1 UFS devices Date: Fri, 8 May 2020 10:21:34 +0800 Message-ID: <20200508022141.10783-2-stanley.chu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200508022141.10783-1-stanley.chu@mediatek.com> References: <20200508022141.10783-1-stanley.chu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: E48BA401090DA8C8C8940FEABED170B25EEAC08AA5E75A9EB472EC0BAF9D4E4D2000: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 V3JpdGVCb29zdGVyIGZlYXR1cmUgY2FuIGJlIHN1cHBvcnRlZCBieSBzb21lIHByZS0zLjEgVUZT IGRldmljZXMNCmJ5IHVwZ3JhZGluZyBmaXJtd2FyZS4NCg0KVG8gZW5hYmxlIFd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