Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2585922ybz; Sun, 3 May 2020 04:36:22 -0700 (PDT) X-Google-Smtp-Source: APiQypIBhyT7ob/rpMyQktxdywepTb8O0Q5GPKNtNf2kgsQk0nOvc8gxvoQNodW//S/SnCcBFH+6 X-Received: by 2002:a05:6402:95e:: with SMTP id h30mr10410150edz.117.1588505782732; Sun, 03 May 2020 04:36:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588505782; cv=none; d=google.com; s=arc-20160816; b=vklsHd3Sv7crqZfvORFVyTsWSGb3mA7j3J59VZSilcIRWScTeW8F24qKku2JbvTPD9 OZWPvbwJnPK5+d2WrNIsxC2oG0ZOtLoAakI88a3JpBhnZEOoWoQEW8n0apSkBI+nURoU ewvNK/PIcNX5ZW8G20/8gge5otOaYxl4Y65VerhTT/YuzFqpBPh6uwzXmjuofM0NEw4e xvB8lu3PKX+nsBcxEF6hg1G8cDF2k7uBThoI/dqL5nnwz/rao1IiL+//9K12kXPwtsMV 2iRO1GLE0lionq/8w9/eLVyI6el+1f+3VpzTYct8AMgdSdU+WSMI0eeLsaaJGCdrlmrU 7/cg== 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=fVYZ0Mgjfx1YcZVRskZ3Y6oDtsR9E2RQrmx1zTfiY0RIrQ1ToHaU6L8jwTGMJtxgrE e+gppaUUVr/dG4yNW+NLn0H8RLOrdC6aB+uDMa00KCJPfnyuzu49BqLZmA6SP+qhJEZr wK7GgGvTa2ujhuTo33j8pc5+87fwgrWUMP43jAyMNoS18ICay+5aKG2yI7AP8Ebw1yGd Ck08zqsE0MU7YSnvzB4+yAnxheYe2QA/gbdWMu0VNf6C0hwfNPSgtSqrxK/psYzmNASN 5YiueG1Lr+3ruKMZNHV+0rNfKsLy4nGETw5qVav5Fty90N/2JpQAaxFEB6YUTd4PRSB0 GTEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=gOggZILY; 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 n20si5142022edo.531.2020.05.03.04.36.00; Sun, 03 May 2020 04:36:22 -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=gOggZILY; 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 S1728243AbgECLeb (ORCPT + 99 others); Sun, 3 May 2020 07:34:31 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:8374 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727783AbgECLe0 (ORCPT ); Sun, 3 May 2020 07:34:26 -0400 X-UUID: c6655459bfae45ebb27d381f26da2917-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=gOggZILY4gkklG4RxEzmwGSEgK8r2QstKek+Vjyntj55kkoxQY4oqDZP2iCfJWG0vENfUzeTkVq37GJKGg8ujp3UOQGGEMf2y4+l2mZI7KyU8LHyjmHytNekS9zfSQw3pZw8iSXSU18vxoF0JSH/G/vV4v88eD6IN6U1QnE50rQ=; X-UUID: c6655459bfae45ebb27d381f26da2917-20200503 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 631075042; Sun, 03 May 2020 19:34:20 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 3 May 2020 19:34:16 +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 19:34:15 +0800 From: Stanley Chu To: , , , , , CC: , , , , , , , , , , , Stanley Chu Subject: [PATCH v5 1/8] scsi: ufs: enable WriteBooster on some pre-3.1 UFS devices Date: Sun, 3 May 2020 19:34:08 +0800 Message-ID: <20200503113415.21034-2-stanley.chu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200503113415.21034-1-stanley.chu@mediatek.com> References: <20200503113415.21034-1-stanley.chu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 25FE8DACD941F50E49CEEC629DDD56AB6675B59CD7A67C5982B053F45586EDCC2000: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 ciBmZWF0dXJlIGluIHN1Y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