Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2377035ybz; Sat, 2 May 2020 23:10:51 -0700 (PDT) X-Google-Smtp-Source: APiQypJ9IGnwzB4SH2FkGUO71xkwYWEBxuzZjt5mmPVjTuK9iJW3ZmQQNs/0D2IgwvYbC/hVUuyp X-Received: by 2002:a17:906:17c1:: with SMTP id u1mr10034465eje.47.1588486251280; Sat, 02 May 2020 23:10:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588486251; cv=none; d=google.com; s=arc-20160816; b=yPiQUJxa1NIY69qctX5WpR9F8YmcA0IscNZV4al9Zd7IBZP9uP703jmGArSoBwbtlA ssLIRJ63IdjQo8ydqKg8nTj9hvw0mIi2iZK0dKvkiJWDIn3FTA86M9v0BgsefmjB/DYi cfOAfQAmDZDX65ztyIBGnOVzY/+6RN4U1txZCF+FFyvMkQLPRYtcZgjLPeEBKiJKjlz4 efa7ZK68HGd04NJTVWWyYARHeWKpJfYGP5B9MH21wnEkOKz547NOxV/zDMUZqIqKIwxs aD8MoaVpE7qjouakBXTfDr3/l0QLjnoN/PSLTNtc6L+F9YxWB9RliDEy084imqQbhOgT oaIQ== 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=P0+EdMMlqrbn6s/fgafm/GQVGO99rsji8UKcxqPpK7g=; b=BYs5JTCTGYpyygDdpVbq477gNYr4+L975howE45Xn3Up6HMEWzONjmTF8Pg6uPfwFn ExhczMDhRQgXoJAaO9wzfCHSdKatpICUGcUiUiB03E1TLcC/cMW2XvX1dBakZDlpyfKY TnRaOYZazujR8WQz7txZSnyCBEkxD3/0SFyVTIsIkiBrJONuLXFcpTcGDT1DU0H1SGbf kdF9nj8EMVKj19RorRu83AEtpc/CBRcCikZLByEACk6lXN33xEaNHG+Vc2fZlfHJwV/Q /etOikXmi+XNs54rMHZOhbC8fbUKBQMlo/flISOw1JDDVrDnspgFbT96eKsvZHQxR9Vi OMCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=YhxoeIGz; 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 r10si4483120edo.480.2020.05.02.23.10.28; Sat, 02 May 2020 23:10:51 -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=YhxoeIGz; 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 S1727122AbgECGEX (ORCPT + 99 others); Sun, 3 May 2020 02:04:23 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:43183 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726955AbgECGEG (ORCPT ); Sun, 3 May 2020 02:04:06 -0400 X-UUID: 9099d090624944a29e3b762402462828-20200503 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=P0+EdMMlqrbn6s/fgafm/GQVGO99rsji8UKcxqPpK7g=; b=YhxoeIGz0QllQXQkLALmeIw+trYewvmD43Cqrap5JSkPRwlgBc+1WGrt1yFOzAccsxC0FpFkxPtKYKqoJjat3GOqy2aevWCdvVhoJDZIYAVV17WDLmToTqoGa7sCJ2ZK/bEOfVLpthTlEtC9J9M2B8/eNw3d582dGmE83sfVOog=; X-UUID: 9099d090624944a29e3b762402462828-20200503 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 1070879529; Sun, 03 May 2020 14:03:57 +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; Sun, 3 May 2020 14:03:54 +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; Sun, 3 May 2020 14:03:54 +0800 From: Stanley Chu To: , , , , , CC: , , , , , , , , , , , Stanley Chu Subject: [PATCH v4 1/8] scsi: ufs: enable WriteBooster on some pre-3.1 UFS devices Date: Sun, 3 May 2020 14:03:44 +0800 Message-ID: <20200503060351.10572-2-stanley.chu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200503060351.10572-1-stanley.chu@mediatek.com> References: <20200503060351.10572-1-stanley.chu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 30403F4D437B0EA6830088BF6FB1063FD4004AC482DE60283530AF1E6D16B6502000: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 IGRldmljZXMNCmJ5IHVwZ3JhZGluZyBmaXJtd2FyZS4NCg0KVG8gZW5hYmxlIFdyaXRlQm9vc3Rl ciBmZWF0dXJlIGluIHN1Y2ggZGV2aWNlcywgaW50cm9kdW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