Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp270363ybl; Tue, 28 Jan 2020 23:40:39 -0800 (PST) X-Google-Smtp-Source: APXvYqzryMAaxGaUdShGoNDZRd3+KaN3g/HP4ECuxh1042JCwc/ZP+JlcMGkhPvQzVKMjwwtJqCV X-Received: by 2002:aca:c256:: with SMTP id s83mr5738438oif.57.1580283639638; Tue, 28 Jan 2020 23:40:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580283639; cv=none; d=google.com; s=arc-20160816; b=i70BVqSRDUXxnX3sPQge922fSV+YwUVyZ/wXCe1g0YVWNi/hp0mSJAT9RPMH5/Fijj oZo4xtYZAWYLEY9vAJQiDatc6Zb5LFvroo+BW6/fgLQVEwo8hD27uK3yfk6i3ebUh2CK +NKZsv880MAP6T5jgtSrwl689Jk5R1NqtCagMTKYxDd6QnoQSTR2PslSm1WYexgvdKDB SI8cgKwFvdvhFCmkZfICRLXkiw3IHTTGFfQoY0tUS0bUVRFJ28ocSPPs3NmgClegSOvG NUuZKHQqTzbdyhL9V9YZLQykZScpmROPnRyAP2/NqqVpi111y9rhDHOkfAnJw3lDaU+n HsAA== 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=YOeqNnQON0pZMvJ2TpcgdJrhCqwz0qDgTvW6jd4cUGg=; b=Pp8UkqlVCPFEY84L1/EzL+fXQYhhd/Mg0+hfaT25CRjgteOzZ6iBQREjiVDn/L+mp6 7os60Fyom/uGpkHuOsnJSr9y1JC7+swDO5VaX2RdV2/TQoYLZBX21X9e3R9NOcejyPbX Bsc8wy6q7ok4g9/xQZvlJ7X5Z0e7ZP1YbYanDihK3KaIxZZ7mAdxEo6uBy/26BSNdqD6 KupkmxBway8viI7HapkAW/eMGUBNaGTYqvWJGlfnd6upFen40B9353d9ckN1mLm1c71Z luX+hSka28u0BTzYfeF0/n2WLtbM4HQtYtjyaqHN0QAzQieBXK3UMXk+2CT12O6Foh9h MHOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=uwhjJM78; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id v18si785360otn.174.2020.01.28.23.40.28; Tue, 28 Jan 2020 23:40:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=uwhjJM78; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726250AbgA2HjN (ORCPT + 99 others); Wed, 29 Jan 2020 02:39:13 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:22111 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726068AbgA2HjM (ORCPT ); Wed, 29 Jan 2020 02:39:12 -0500 X-UUID: 07119b957ef44a329d0da2d10ab183f0-20200129 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=YOeqNnQON0pZMvJ2TpcgdJrhCqwz0qDgTvW6jd4cUGg=; b=uwhjJM78Mgoym4qWYTQNIAN8hn7SkXvCXqD67rERbdth76sMZKtcbwmCeQov07Eznd9nsuHgZsol1/N3fRPl1W9ZI1F8p96txiylQSwmUR+YNKBbtgiHVG+WyUOiFZplk3YTDf8NfhJO9SFn/FeOWTmAWBx+KhFqrJH4o6mmNXA=; X-UUID: 07119b957ef44a329d0da2d10ab183f0-20200129 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 954770330; Wed, 29 Jan 2020 15:39:05 +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.1395.4; Wed, 29 Jan 2020 15:38:21 +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.1395.4 via Frontend Transport; Wed, 29 Jan 2020 15:39:12 +0800 From: Stanley Chu To: , , , , , CC: , , , , , , , , , , , Stanley Chu Subject: [PATCH v3 2/4] scsi: ufs-mediatek: support linkoff state during suspend Date: Wed, 29 Jan 2020 15:39:00 +0800 Message-ID: <20200129073902.5786-3-stanley.chu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200129073902.5786-1-stanley.chu@mediatek.com> References: <20200129073902.5786-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 SWYgc3lzdGVtIHN1c3BlbmQgb3IgcnVudGltZSBzdXNwZW5kIG1vZGUgaXMgY29uZmlndXJlZCBh cw0KbGlua29mZiBzdGF0ZSwgcGh5IGNhbiBiZSBwb3dlcmVkIG9mZiBhbmQgcmVmZXJlbmNlIGNs b2NrDQpjYW4gYmUgZ2F0ZWQgaW4gTWVkaWFUZWsgQ2hpcHNldHMuDQoNCkluI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