Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp212093ybt; Tue, 23 Jun 2020 19:54:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwkycXpjSoB61C/O1xmDBvjzP86ib8yJ+af7g0qF9S8Xio2yjuD1wpWRjUJ9v/T0mmDHLJ X-Received: by 2002:a17:906:4757:: with SMTP id j23mr17529027ejs.431.1592967298819; Tue, 23 Jun 2020 19:54:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592967298; cv=none; d=google.com; s=arc-20160816; b=gq/l8TVGFgxse7bwhY9a2UJHy5tlWwsR+OjYoaA374QgJqxFlUQwB0+suBMgfvSg0U 2JklCwVGKo3YhvNKRP8v/1Tk/U2qt8PTqotLToD4jnVDECqm9MywjBO7XhDHKSAaGQpb NQNDHzkYBkeR5wYkwYgsjocptMXOGgP1em+66SoOH1QqN7nOI8PfYi3PLBfV1RKFwGLA K5OYOVl58XE8JBaa4TzZdIXI7QXIPHE7nc6G5mvlLv3Bjkh7vmis5GHJ1xzIgf69W42O rKBaHE7DzCREwvmKRir2L555JgoOULlvxuoulBesNXi1FvshWtLiBsxle2ztMy7UWJ9g y13Q== 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=nmBWhNWVW28atJNu3hD30DB04FycNq3CbGhifj2PNUM=; b=Iww4K4moxGGG5qujbLr2rc405w9F6mpw8G2PsEMdQsVf09RA2/s4DIW4MarBeIPNsO zkCW1VD4cpDQ9w5IeFz08OjsQFRHNDNeq30iQMqy/mZBMHbTZKIL0yU6QHiogAHU+AMp zqRkTNsXeD+Wb6oTu5CJQwqrYeq9a3041jhZwNN38tQ7U396ovVCTFUlNu/D5k6qU8fb U13lgFQKRuUa3qDHe8L3RHcIQ6cqU7681EeQnyEYi/WjqdncSpV32s95I1tnjlw3ob8P lwquTn4d5jyilr5xecUCDUbwIRmTvb2cH59QLJAZft7Did9lz98JKXYZxbgi+ZrvPHK/ KaLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=sntOimsZ; 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 d17si423266edu.223.2020.06.23.19.54.35; Tue, 23 Jun 2020 19:54:58 -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=sntOimsZ; 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 S2388576AbgFXCv0 (ORCPT + 99 others); Tue, 23 Jun 2020 22:51:26 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:41042 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2388565AbgFXCvZ (ORCPT ); Tue, 23 Jun 2020 22:51:25 -0400 X-UUID: bba5b1b4afc6470e9b672281e3b5b2e9-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=nmBWhNWVW28atJNu3hD30DB04FycNq3CbGhifj2PNUM=; b=sntOimsZs6Z8MWONa8lblO0kx5VZsgFe/sHozNiR/vvEgqEG8/m8oQCHlu65eVeKDf3mNFG4tQUUbY94IjW0oCLHlyvJnFfXxMh/T62oB0eHgUWeL0YDDPC/Kyu0IfM/wWVrUGfOgwt/x7oVt4iAQOwaP3gz7ZbD7EH7ZCRtOAM=; X-UUID: bba5b1b4afc6470e9b672281e3b5b2e9-20200624 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 1358642867; Wed, 24 Jun 2020 10:51:22 +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 10:51:19 +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 10:51:19 +0800 From: Stanley Chu To: , , , , CC: , , , , , , , , , , , , , , Stanley Chu Subject: [PATCH v1] scsi: ufs: Disable WriteBooster capability in non-supported UFS device Date: Wed, 24 Jun 2020 10:51:19 +0800 Message-ID: <20200624025119.6509-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: 7B2E197A1814C3A1321B9BF57C653697187545A33AF642CD635F385EF2542AB02000: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 IHF1aXJrcywgdGhlbiBXcml0ZUJvb3N0ZXINCmNhcGFiaWxpdHkgaW4gaG9zdCBzaGFsbCBiZSBk aXNhYmxlZCB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