Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp283854ybl; Wed, 11 Dec 2019 18:21:17 -0800 (PST) X-Google-Smtp-Source: APXvYqy5sKfUvf2sumGXKaWTpRIlACUzblF99I2YR6s9/G2tE7Idi2xM7Q2ERy2gjnFir2X/Eiai X-Received: by 2002:a9d:7305:: with SMTP id e5mr5200359otk.64.1576117276859; Wed, 11 Dec 2019 18:21:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576117276; cv=none; d=google.com; s=arc-20160816; b=yxmLCBY/95CBDCmAmlgp+N1HJgbSioWnLvK1gfyWjzlBHW5wM0bBIWPyufB+AxHuwP 5BEXOFgbPeBlKr3PEvGTgpkbidMR+YXXWxl7qEMw79TGGoxjRSjsoGerZCyQ5oVq98gy 7GSdkXpQYfkVtndENQgpNTC98KCXHtxm3dv6ZBy5ONrZoto83QWhkbeBFi6GHo6IFRF2 UgaoldfAizrcfqDadF2G/b5eug0NHU+DSjqiMS2EvkpXhSj5JNfVl1bSjx1SIecHkNpi WrBh2i29MzG2udvf+47P8u1Gi3r8L8DphLOiRtMlYO13FXqxiI+DP2X4kVyqvHh1iWbL w5gA== 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:date:cc:to:from:subject:message-id :dkim-signature; bh=9c+CKJCw7ds62qe6zhspsMPOjl/4Hp7ooomuS+RoEEI=; b=Qc/syYzC2FxUFEQ7XNErHXm/cl+Q0Fpwb7vx0MiKIR1ejsv2E2pEYzcBeeMnFoJvUG PvodgJfG9yEC8D4j/FI+J+YeTYeT1bMRCUDVgthp2Mh5YBFlMVZAkDTlFvWtfu/meyPh ikeT7EVUYAWGo4nptX5VTfNiYsS3OwG4B3UXHy4fvsdyxMDOFqONhOeluiayu3hvbQo9 wF7LpXPJTmZpA7bA86dfhQ/K/nwoWdPb9hjz+DLhhKWBCM9zyAhSzelTRxDmzGjrWhUl W+TeIhI4YN1s5nc+TaAe25qwceTTG7yKNDd4UYENV2hUjEvXaUMOqBaMr8T+clKV1uSD Nd7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=YfzqF2gB; 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 a20si2408243otf.271.2019.12.11.18.21.05; Wed, 11 Dec 2019 18:21:16 -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=YfzqF2gB; 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 S1727788AbfLLCUd (ORCPT + 99 others); Wed, 11 Dec 2019 21:20:33 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:44367 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727592AbfLLCUc (ORCPT ); Wed, 11 Dec 2019 21:20:32 -0500 X-UUID: 54fa3d0fbbb844c7b2cebbf20008eb2f-20191212 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=9c+CKJCw7ds62qe6zhspsMPOjl/4Hp7ooomuS+RoEEI=; b=YfzqF2gBK9cOf3P5+RyjdFs2uoFb9Bzn0jlneCtjpAaRPkqAU+238zimE7sJYgpLtNzYIf8AqphROllQ0il8eJEu+OgkH0YYFBy/wziUGpGE4FmhXkygG0dh1hTAIpkVm2ExDxRGT0um+URS5a9BZYn/hnl18fkE4MF/5c0Hmp4=; X-UUID: 54fa3d0fbbb844c7b2cebbf20008eb2f-20191212 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 546727836; Thu, 12 Dec 2019 10:20:27 +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; Thu, 12 Dec 2019 10:20:06 +0800 Received: from [172.21.77.33] (172.21.77.33) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 12 Dec 2019 10:19:58 +0800 Message-ID: <1576117225.21687.6.camel@mtkswgap22> Subject: Re: [PATCH v2 04/14] mailbox: mediatek: cmdq: clear task in channel before shutdown From: Dennis-YC Hsieh To: CK Hu CC: Rob Herring , Matthias Brugger , Jassi Brar , , , , , Bibby Hsieh , Houlong Wei , Date: Thu, 12 Dec 2019 10:20:25 +0800 In-Reply-To: <1576116202.16444.4.camel@mtksdaap41> References: <1574819937-6246-1-git-send-email-dennis-yc.hsieh@mediatek.com> <1574819937-6246-6-git-send-email-dennis-yc.hsieh@mediatek.com> <1575946181.16676.4.camel@mtksdaap41> <1576113221.17653.6.camel@mtkswgap22> <1576114297.11762.1.camel@mtksdaap41> <1576115494.17653.21.camel@mtkswgap22> <1576116202.16444.4.camel@mtksdaap41> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 MIME-Version: 1.0 X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-k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