Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp681902ybf; Fri, 28 Feb 2020 05:45:53 -0800 (PST) X-Google-Smtp-Source: APXvYqyK9qfmzCJLuytGrT2OQn7SqZIkJB6L4wQX/l2no9VO7lRLKRAJgrTmsx6VxgwFeft7Wxe+ X-Received: by 2002:aca:1a06:: with SMTP id a6mr3045273oia.148.1582897552915; Fri, 28 Feb 2020 05:45:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582897552; cv=none; d=google.com; s=arc-20160816; b=aizMKsMDXhzziJooN6imKCZ505csd/K3n7OG4Hn5X/rW48NUJ0rMoNjOYvHq/Hk3lQ ZWcPnLB4wWpxsd5zdgLMpOyRS6hzNxijsJokotG2Y0aXovhPsQzIyg2UD1Ju3KIKeJOc fF4f05w2CWVnmOXQIPdkelpiMBJ9XGDLg3LiTgEjMYzISy76dqzDEjxT3/7uheNYplsD r+sQhf7P2jo5Y/u1YjHFKjvLSIawc5pW7JJoaorJVL1MrnCUb7Enhao0P/fxF3k0kd7b EX6J/87+8vcGSKcaYval52Lmx2QxeONhWGE02L8JvmOhBdrXrMUJ4UONufjF2Pbjg+op NQHg== 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=Ppb4UkHf8lLsaqd2zlsjL9zcISu4nncSfFXbQqr/dQc=; b=aT9Wne4fRIddLHsphfGuDOA0pywteBtwnClmScH1COvrkUgQqj3ts6/gR0lae/RmOa fw9DhweJfYq+pUM4mEVGNzu412Ps0+pUM3/BFvalHM99JSCMm3KDbt7zQ8SaX8Ystskr kaff/543oc9HVcSpftyRFkMmtbfKHXa4s0Lezjc44mlZXvCPCI4ViRAQkCVnfCiIYIgt Epkm8a3Ubo2BbbjNBVlXlVy74UJ5vkonD2KJWER+1MAHjHOLepmdhMISK8C8TaNtjwBR XT4VOadLd2uYrf2jsgnGK8CwmSj73mCdpvUY6Alkc+07OtfMJZa/noziy6r5403ZMGo9 N7qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=mZ8IDEeJ; 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 z24si1579406otm.135.2020.02.28.05.45.41; Fri, 28 Feb 2020 05:45:52 -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=mZ8IDEeJ; 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 S1727169AbgB1NpT (ORCPT + 99 others); Fri, 28 Feb 2020 08:45:19 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:59345 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727096AbgB1NpS (ORCPT ); Fri, 28 Feb 2020 08:45:18 -0500 X-UUID: 1387cbf876df464ebdec84e5f949395c-20200228 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=Ppb4UkHf8lLsaqd2zlsjL9zcISu4nncSfFXbQqr/dQc=; b=mZ8IDEeJnJvtkOSrt76i5FQ0y1TCwkPxIYEtfUdDN1IOGVFLziiC5CC1242o87YER4UGk/kocSZON3rfVGKnJwYxwImjNqP5siSyJ0oQGyPwFYz1JTvQXbBTntkkqWg3eeOeEd3kk5dbQYCJAws0UucgthXwoOvTGsErV/wNRPk=; X-UUID: 1387cbf876df464ebdec84e5f949395c-20200228 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 619647150; Fri, 28 Feb 2020 21:45:07 +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.1395.4; Fri, 28 Feb 2020 21:44:07 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 28 Feb 2020 21:45:03 +0800 From: Dennis YC Hsieh To: Rob Herring , Matthias Brugger , Jassi Brar CC: , , , , Bibby Hsieh , CK Hu , Houlong Wei , , , Ming-Fan Chen , Dennis YC Hsieh Subject: [PATCH v3 04/13] mailbox: mediatek: cmdq: clear task in channel before shutdown Date: Fri, 28 Feb 2020 21:44:12 +0800 Message-ID: <1582897461-15105-6-git-send-email-dennis-yc.hsieh@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1582897461-15105-1-git-send-email-dennis-yc.hsieh@mediatek.com> References: <1582897461-15105-1-git-send-email-dennis-yc.hsieh@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: AFF8A4E223F36FC7D7DCDD681114757C180A6EEC14B10EAEB2300591246FEA7C2000: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 RG8gc3VjY2VzcyBjYWxsYmFjayBpbiBjaGFubmVsIHdoZW4gc2h1dGRvd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