Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1411538ybh; Sun, 8 Mar 2020 03:54:10 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvhLhodA0qJ4x7hojsIaeazS3tvDW3uhD0H2UJnHClrap3UXIyaQBtGQZh7sSnjbnwHwu/7 X-Received: by 2002:a05:6830:1d95:: with SMTP id y21mr8915930oti.90.1583664850141; Sun, 08 Mar 2020 03:54:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583664850; cv=none; d=google.com; s=arc-20160816; b=nQ4XBEo3D/DF3y1rEQVxG4IgTNGVEMUfavj5VaLSG9EBQwqii9ij/dMM7hyjaOCYFX qTXSHrfgG9b5DX8Gt8ixVxPaN2+NW3ZmBIEl6MVS3WBTmGWRq3/7ssR91kr4bJJ9DrQ/ MQ8fOogBEC2ZqeTnTEQ+Bx9R/aneyIF1JvfaRahh/GI9ET/Ze1OP1Ef8ie/qoM4LuCUv VfnAwha5JwP4dz3V+iT+PjbrcAGMPX+0Cow6ek5bZtZexIDmvTRskNIjMPyURHOVj4n5 ADD0q7oX+3+l7sUUr1GHm1EAKRhfTMVaUDGDIR92/IVf2QzxjylJcO5KKUQT3PY3ly60 WpYQ== 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=D+dXiJm3APaX+tyDPhHiGjNPGNdy177jnTfCoMxdsUw=; b=ROlu6olZrUeOZ1QjYUUUoG3mxf73JAifsafL7mHp0cW/09fXkNpdg7RWvqRALXwvIM ad+YGAMU6ZjEDQNplCucWQNqKO+uUWpcFUFEQmINn6U/03/i1x3Kt7EKFSwrSOCz+N8S Xn4U6OQqf1HKKl/ziYEOrd8V2KWxFunoIjxFtBPzNW0uZSFohKrGy8MSzlZdNE6l4HL+ 2LzLCEwVvt4sySfGfH8GZrMIYEhoeiasR2gbBZV5PpQK4nTaYyEljM3J7/ljgFfulyi3 DP/bTmQML6zkOMs5zgUmbeRf9n4Qq2d17UwUaOZkZSulFXJpl6ojOZYrbaWdiqaWFNSc 8Qfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="sxd+C6H/"; 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 b2si463833otl.18.2020.03.08.03.53.46; Sun, 08 Mar 2020 03:54:10 -0700 (PDT) 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="sxd+C6H/"; 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 S1726323AbgCHKxH (ORCPT + 99 others); Sun, 8 Mar 2020 06:53:07 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:9987 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726259AbgCHKxH (ORCPT ); Sun, 8 Mar 2020 06:53:07 -0400 X-UUID: 6f359e42dd4d4c46b05d72c003071d9a-20200308 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=D+dXiJm3APaX+tyDPhHiGjNPGNdy177jnTfCoMxdsUw=; b=sxd+C6H/1pJCw+IlJf2+1lPp0CGxZE30QBviNTfBqoTD8JeZjWGixl5rsmWbKUds+RvDXYJj9IptO+GWrF7ILMruAk2SvhoOjgdPEP1MkFxwMxMJ+cYNR6gOMyc5QMGnPmSUykM1Ch6N1E4xzgQyfg2Ro613Pl4rFENkImCBuNo=; X-UUID: 6f359e42dd4d4c46b05d72c003071d9a-20200308 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 278304618; Sun, 08 Mar 2020 18:53:00 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Sun, 8 Mar 2020 18:52:02 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Sun, 8 Mar 2020 18:52:58 +0800 From: Dennis YC Hsieh To: Rob Herring , Mark Rutland , Matthias Brugger , Jassi Brar , Philipp Zabel , David Airlie , Daniel Vetter CC: , , , , , Bibby Hsieh , CK Hu , Houlong Wei , , HS Liao , Dennis YC Hsieh Subject: [PATCH v5 04/13] mailbox: mediatek: cmdq: clear task in channel before shutdown Date: Sun, 8 Mar 2020 18:52:46 +0800 Message-ID: <1583664775-19382-5-git-send-email-dennis-yc.hsieh@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1583664775-19382-1-git-send-email-dennis-yc.hsieh@mediatek.com> References: <1583664775-19382-1-git-send-email-dennis-yc.hsieh@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 RG8gc3VjY2VzcyBjYWxsYmFjayBpbiBjaGFubmVsIHdoZW4gc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