Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2375465ybz; Sat, 2 May 2020 23:08:20 -0700 (PDT) X-Google-Smtp-Source: APiQypKF47KMQYxFvyQ5wizbBSAHmMv8wTvTD4lm8g1hWHHHDeEnxGGuClCXwBtlpNKEa01MXWBU X-Received: by 2002:aa7:c609:: with SMTP id h9mr9564893edq.250.1588486100425; Sat, 02 May 2020 23:08:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588486100; cv=none; d=google.com; s=arc-20160816; b=Jzj4k+OPcMBspGD5XaKwh8W9tPvuTVCkbPtj0W9m6kGHeZiOoetymcdGG54yy/pl6c d2iyeopZ0dmXaBSD9fCXpmRqRsybGWQCQLNv6xQcD1OvlwpX/FHNEI4iijV1wBxL1+7B VlHdf/X7OPCcz4FfdnaiwqovA8c4mLwoF74zY/YeaqCSmLxcG787DVb35wKoCvCGo3O7 qksUKMwBDVhhQbX52h4m1Gn3piP7h0Emeb8bDv5v5/yfhQkjT+/haKAdcT/vlhcp1Zc/ vuahXi9zDe4XyoRmIJWZ1dxIMUm8QeJ9fW8HC1s2euwP0rjWCMWDJPSFUIOMh/UPGnPb efmA== 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=v7bzIt6FbMqNxzzK05aI6D5qi1uwWl7jSYZU5TgeLwQ=; b=K2/DP8polzjVpVWPe3+f42qnDy04phLymHt/FUMBToPVSztD1qrpVyEjgIXcK1jFFb knoGbi+6Yw2VD/4XywLBE7xY0uwXrc98cyHI4FCCTpovD0utuQEcxOriZZtKt8y5zNgA W8xStdV0144KMwkWEUddIfM5MLwIQqmxQ9jz+Lv3/38Hs5bZwm274yj+oC1Y4TJbDD+b DyA0fCeDO6lpdbnTTZauTjl617e4kAiE/5WUYkUj+pbefvXKXCpSryIj/FK9hlk67W8U /VMjb66CFayN5ozB29+L5HV9RFxDl8w9GllBuffkojdMjawxpjgWlbj6hs2F/rB9Dr7D IdAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=BDfp66HX; 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 dx23si4696128ejb.181.2020.05.02.23.07.17; Sat, 02 May 2020 23:08:20 -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=BDfp66HX; 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 S1727105AbgECGEN (ORCPT + 99 others); Sun, 3 May 2020 02:04:13 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:44123 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727030AbgECGEG (ORCPT ); Sun, 3 May 2020 02:04:06 -0400 X-UUID: cfb0f8d605854736bbe847ae7772f632-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=v7bzIt6FbMqNxzzK05aI6D5qi1uwWl7jSYZU5TgeLwQ=; b=BDfp66HXRmR1/Wzyl5PnztxLwKVLYsFC5TOcgmsBQdqAmjJ+9J6GSuZx2Ub7WnviH8YpH+zlurgFW3A2hCbqp8sZw6wkkdlwvsMC0OTmXWBd99c1HM6btb1duOYNIbCnqvR9gSCb+7lAxXB8KdzumK37oFnMdMRgnZLzK01GbFs=; X-UUID: cfb0f8d605854736bbe847ae7772f632-20200503 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 869439203; Sun, 03 May 2020 14:03:57 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs05n2.mediatek.inc (172.21.101.140) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 3 May 2020 14:03:55 +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:55 +0800 From: Stanley Chu To: , , , , , CC: , , , , , , , , , , , Stanley Chu Subject: [PATCH v4 6/8] scsi: ufs: add LU Dedicated buffer mode support for WriteBooster Date: Sun, 3 May 2020 14:03:49 +0800 Message-ID: <20200503060351.10572-7-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-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 QWNjb3JkaW5nIHRvIFVGUyBzcGVjaWZpY2F0aW9uLCB0aGVyZSBhcmUgdHdvIFdyaXRlQm9vc3Rl ciBtb2RlIG9mDQpvcGVyYXRpb25zOiAiTFUgZGVkaWNhdGVkIGJ1ZmZlciIgbW9kZSBhbmQgInNo YXJlZCBidWZmZXIiIG1vZGUuDQpJbiB0aGUgIkxVIGRlZGljYXRlZCBidWZmZXIiIG1vZGUsIHRo ZSBXcml0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