Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2005569ybt; Sun, 21 Jun 2020 06:24:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyE+ZOMFJLhDrMRrGojau4YTypuN/IjE8P1D4xUuKZnRPy0oqMXaFZ0uPEMvxOua3gM2TVM X-Received: by 2002:a17:906:cd03:: with SMTP id oz3mr12346071ejb.391.1592745866495; Sun, 21 Jun 2020 06:24:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592745866; cv=none; d=google.com; s=arc-20160816; b=G0L6urGi1FVmRMaL5mx91Ns6Gj6ghis+0vbjiDMIogV4b3BzYpQSc7jO6pGq0wZ/d9 zdBp+ivXxlD70ExXkBV7UFOWVBYiiD5L/aVk7uIMM1a+sCKEJtR9VMoIAG6N76u0mAeS hc5QRcxSzuKqoPMyLDCNXij9ZqtMkwlvYVQKAvlDr0gNMFm5tdcZqsyN5qwmty3Y4nmm 08c7uwvYdyKpqtgJRpC6iZVpDKcl4yUq8mZvgFI9wWXq+EE/ApDSpPSU7oBjDFxClM+k VHIptJViY7CXw0b0t6KBOrvJcgVLOGV3YJLfy2ujJ+tYxpqKJ8lkPC6fZoEfld/wa4dj EuGQ== 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=7baMzIyPNg+TFEral2VkSNt/ytu43JUL3f22WRv9/Kc=; b=DLFiog3ZPgccy23kZchZudtusRTaDpGB/9VyNF0DE1HIKTVoaMlPV17l7WJ/ArHDG6 QvUWPUTTnQKI+oAAoqiF5v6mQtFussmJfO2bE8a+QfhYoGf9oeDW7riMQXyzYifCksCb 11zD1Pt0+IigAfoCqaSpubfxmpd7cHKV8ZZszaE5yeg1k1IXGIfsoQK33BHMOaQ8UkOm pvStZcya6+uQsyE7SDrirU4CzWY5/84eCaflP2RoC85+Do6ZsVTVYVHS9gGiYXWgU43q +o+c2xrOmEiYA73VMDij/meLxsF/jHTd9XYEwKvnzpz8Pf1yj42NtEQGI7hAKZAlYsAX 9W1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=grs4E7EK; 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 m29si2643410edb.178.2020.06.21.06.24.04; Sun, 21 Jun 2020 06:24:26 -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=grs4E7EK; 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 S1729806AbgFUNWW (ORCPT + 99 others); Sun, 21 Jun 2020 09:22:22 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:56177 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729596AbgFUNWT (ORCPT ); Sun, 21 Jun 2020 09:22:19 -0400 X-UUID: b4db1b57d7d74d778bdbd5826ad2d26c-20200621 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=7baMzIyPNg+TFEral2VkSNt/ytu43JUL3f22WRv9/Kc=; b=grs4E7EKI0EvgqXzpkf/f+1JM3DRJWcZlASb8JlUMJ7WHSaShKVej6H/QAxhxMbo9iZemsgqFlBou4vvJEjAfDHpN4FGmIs082kURMYkQ+HA11x0ZNoKZjwNpCmOTEMV2ogRIBGqJ49yCMeigj+CBd2BDkSfN1scsyS9fmU60bE=; X-UUID: b4db1b57d7d74d778bdbd5826ad2d26c-20200621 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 1983914733; Sun, 21 Jun 2020 21:22:15 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs05n2.mediatek.inc (172.21.101.140) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 21 Jun 2020 21:22:05 +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.1497.2 via Frontend Transport; Sun, 21 Jun 2020 21:22:06 +0800 From: Dennis YC Hsieh To: Rob Herring , Mark Rutland , Matthias Brugger , Jassi Brar , Bibby Hsieh , CK Hu CC: , , , , , Houlong Wei , HS Liao , Dennis YC Hsieh Subject: [PATCH v7 4/4] mailbox: mediatek: cmdq: clear task in channel before shutdown Date: Sun, 21 Jun 2020 21:22:11 +0800 Message-ID: <1592745731-14614-5-git-send-email-dennis-yc.hsieh@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1592745731-14614-1-git-send-email-dennis-yc.hsieh@mediatek.com> References: <1592745731-14614-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 RG8gc3VjY2VzcyBjYWxsYmFjayBpbiBjaGFubmVsIHdoZW4gc2h1dGRvd24uIEZvciB0aG9zZSB0 YXNrIG5vdCBmaW5pc2gsDQpjYWxsYmFj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