Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp3293932ybf; Tue, 3 Mar 2020 03:19:38 -0800 (PST) X-Google-Smtp-Source: ADFU+vvTJ2uirERO7J3yZq07lT7qoEI4tgIfaWs0S45v86pDDkAAMaLRUnjt0BR7WD/E9v9jQVrL X-Received: by 2002:a9d:6b06:: with SMTP id g6mr2976975otp.93.1583234378116; Tue, 03 Mar 2020 03:19:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583234378; cv=none; d=google.com; s=arc-20160816; b=blKAbxWvI5A9dD57WtpnSTbyV+662XwImLptfWMllBceuVKt9UCsDk4WVOZPq4GS9a m8M8QKWTU+v2dpXVA/WLtseFbWHToF0gesRaiHEX8oxe4SSnwigJN7IJmbqbfPsFUILH UsXkCXr0rjnl7Qi627PooBL3l+35VAkxzhg/sMpzv3x1/D4FN+tX6SWeWwmA2xOKgbtA /MPkTv5kDdQJYq0w2EI3yD7P7XcrurCQrbXlBptOwtlAM1evEFiSp9DKZfRiU///eTNg I7z7I1gdMXQ/T9tD2CD8F4NO0OMYBwbpNWO/M84Aj+YLyPXtKw1f2aio8ndIohnv0WcA iM8Q== 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=n91f0uofl0asqlUlap0WpLknqR4syuPs3+1WSrUJsOQ=; b=gVak4lVCwZZT9FF1ZqjeuEhJm47Xi/BQIj38G7BK1hyzkO1DvY9pOIrSwwUeVQwnod Yn10BqRST+dECko6Qb8RMUzDmThUyHoDUdOCYLi8UBmDSZlU1STKF0dQ3FBTlqUXj7Jo m6cZ4Qul5+FeRFPYNj/a2y6fhmPrkPjWFTPmu9Ff6ECToEw4Zn0ZGXP1GTRzuMJc2N9Z LKarUWEom8k89i56+ywebPofiAPlh1e5rhAhGiMHYrimReC+uaYJHjqzAWlOzlKV25hh 4hncZ2i4CYcPqfw9nrYF7lrSTN7nmpCq4OzneqpcvkACYyh6CGoiEjGGkbp51LN1WiZ1 g8qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=FbN5Rgw3; 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 l145si1506236oih.44.2020.03.03.03.19.25; Tue, 03 Mar 2020 03:19:38 -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=FbN5Rgw3; 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 S1728423AbgCCK7H (ORCPT + 99 others); Tue, 3 Mar 2020 05:59:07 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:30785 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728991AbgCCK7F (ORCPT ); Tue, 3 Mar 2020 05:59:05 -0500 X-UUID: 3e0f67764f874e02a848eefd2615c6ec-20200303 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=n91f0uofl0asqlUlap0WpLknqR4syuPs3+1WSrUJsOQ=; b=FbN5Rgw3Oz4tibQB2vTD0PBOn+JrYGm51Yv+GypvxaJEr0nquJgCj1Ox5zYJcyV3H+33y6Gu9GOJwhleHPmNn82ZeZevxkV4xJ2JWHkgb228iWd/jYDS10ecD8dujVSLqMvrgtl+gMYJL+eobkzxYYdtOGER051eQXh0jM6IVsM=; X-UUID: 3e0f67764f874e02a848eefd2615c6ec-20200303 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 78187045; Tue, 03 Mar 2020 18:58:49 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 3 Mar 2020 18:57:41 +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; Tue, 3 Mar 2020 18:58:11 +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 v4 04/13] mailbox: mediatek: cmdq: clear task in channel before shutdown Date: Tue, 3 Mar 2020 18:58:36 +0800 Message-ID: <1583233125-7827-5-git-send-email-dennis-yc.hsieh@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1583233125-7827-1-git-send-email-dennis-yc.hsieh@mediatek.com> References: <1583233125-7827-1-git-send-email-dennis-yc.hsieh@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: DC30B30E062A9263D4C2EDB9C3BE08E0741AE0EE0162D48019CACD8965CBF2312000: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 RG8gc3VjY2VzcyBjYWxs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