From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AC5C6C433F5 for ; Thu, 25 Nov 2021 06:27:46 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id B84EC1769; Thu, 25 Nov 2021 07:26:54 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B84EC1769 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1637821664; bh=QkXzjKhO/PXPDUH944NjNFDegqrII+xpL5qUP8lckTU=; h=Date:From:To:Subject:References:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=cC7ngLlj2DxYEoKQo4ixRuXzzDKsiNlNyG7SpYfwJUM4/zHyqv4GM1UpE4TRfD9OC Jr2nsbNSJpYTQDqW35/R5KKfIEjbTOzzlupVb7K+25GiRDCE3etlKqmchn1EtrOGcA vMwyVIOdbbLFWlZRW7bWstbCFXgyJSPrC9IsVXIE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 5614CF8049E; Thu, 25 Nov 2021 07:26:54 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id F1358F804AC; Thu, 25 Nov 2021 07:26:52 +0100 (CET) Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id D196DF80087 for ; Thu, 25 Nov 2021 07:26:46 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D196DF80087 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="qg7NUJu8" Received: by mail-pf1-x434.google.com with SMTP id u80so4935604pfc.9 for ; Wed, 24 Nov 2021 22:26:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=3KRVplZvCkFOfOVdJLJgvxv7eUeJSjbE0R2ZMjgK8Fg=; b=qg7NUJu8MPy9axIndKBSZG/A9a117Qks+SvprKKIx/6u5Dvo/wfW0dxXbnZkcYB28o 5B17LrKsuz/lmmXBBKRG1orqyFioG0onD0PqUjHrRQL2hHgz3PwlzwxqosZ3wLqzkj95 UFuYnqXqUObbeHSfCMVySNCroM4b3vD5tROZ069p2SjZyi8C7muv2zb9cvBIyErJBLIf 7yfIgTo4lBszagYEVQnQN7ArIulNHpavFKtGJAway+kSQ+jAAGPVPNJIYzhBBO3ug9dh jt0oPZLzO/XbNsOClyXigay8drAl7EgarlADNCKFMrujlcfFlrXL2QaRS/Wl9NC1qKdr qCgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=3KRVplZvCkFOfOVdJLJgvxv7eUeJSjbE0R2ZMjgK8Fg=; b=epK9qLBLci7mY/EZtqgaChOqX2tIpkpggObnO8ttmeGDaVzsamxzMPRvA5rYAVzXzL Zp42PFbDjPeQ9ioUeC2i4i9AbjwKYEOGwgvDpBLCrpb/sezYo+FnJ0CAvpIoGMAmDlTM /mkr+YeI0YQELvIDGpxjW5Pr40AUZkehOusz8b8mGHuXMrm8bvYcVcU/8OQnf/IArjKG A0KOHqzn4mLk3zLZ4XPOMTnbdqFhAXFPGhBt6hpFsSD5nIyoQFgkdE1vG+sYBw8RGE9S 4379oPxBlzHZHmaOSk1nUnivk7qXhG2cdXOLqCaytIOZeDWr+4Y8xMpkFHcgyR1jv6Ep 1SHw== X-Gm-Message-State: AOAM5330R60BiIC1YF1L5QiQa0dAObrKuJ7uQ0UmcV4sSqFqzjxcuWRE QrGrgvJAdYTq1aeo6ALOSvwAwg== X-Google-Smtp-Source: ABdhPJxroYaq42S+P8YT4URm9RJBoYTh6XWDOXusK9S3jNhc0+OPin92kb/rtWyJBd7dnKPLjtIrIg== X-Received: by 2002:a63:155d:: with SMTP id 29mr14353211pgv.302.1637821602409; Wed, 24 Nov 2021 22:26:42 -0800 (PST) Received: from google.com ([2401:fa00:1:10:cd6a:1959:1c65:cc19]) by smtp.gmail.com with ESMTPSA id o23sm1706196pfp.209.2021.11.24.22.26.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Nov 2021 22:26:42 -0800 (PST) Date: Thu, 25 Nov 2021 14:26:37 +0800 From: Tzung-Bi Shih To: "allen-kh.cheng" Subject: Re: [PATCH v3 3/3] firmware: mediatek: add adsp ipc protocol interface Message-ID: References: <20211124084514.28002-1-allen-kh.cheng@mediatek.com> <20211124084514.28002-4-allen-kh.cheng@mediatek.com> <43976e8aab2e3055195d8e9c2f466a804e4d2ba7.camel@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43976e8aab2e3055195d8e9c2f466a804e4d2ba7.camel@mediatek.com> Cc: devicetree@vger.kernel.org, Linux-ALSA , Kai Vehmanen , cujomalainey@google.com, linux-kernel@vger.kernel.org, Mark Brown , Jassi Brar , Pierre-Louis Bossart , Liam Girdwood , Project_Global_Chrome_Upstream_Group@mediatek.com, Rob Herring , linux-mediatek@lists.infradead.org, Ranjani Sridharan , Matthias Brugger , Takashi Iwai , Daniel Baluta , linux-arm-kernel@lists.infradead.org, sound-open-firmware@alsa-project.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Thu, Nov 25, 2021 at 09:47:22AM +0800, allen-kh.cheng wrote: > On Wed, 2021-11-24 at 18:25 +0800, Tzung-Bi Shih wrote: > > On Wed, Nov 24, 2021 at 04:45:14PM +0800, allen-kh.cheng wrote: > > > + for (i = 0; i < MTK_ADSP_MBOX_NUM; i++) { > > > + chan_name = kasprintf(GFP_KERNEL, "mbox%d", i); > > > + if (!chan_name) > > > + return -ENOMEM; > > > + > > > + dsp_chan = &dsp_ipc->chans[i]; > > > + cl = &dsp_chan->cl; > > > + cl->dev = dev->parent; > > > + cl->tx_block = false; > > > + cl->knows_txdone = false; > > > + cl->tx_prepare = NULL; > > > + cl->rx_callback = adsp_ipc_recv; > > > + > > > + dsp_chan->ipc = dsp_ipc; > > > + dsp_chan->idx = i; > > > + dsp_chan->ch = mbox_request_channel_byname(cl, > > > chan_name); > > > + if (IS_ERR(dsp_chan->ch)) { > > > + ret = PTR_ERR(dsp_chan->ch); > > > + if (ret != -EPROBE_DEFER) > > > + dev_err(dev, "Failed to request mbox > > > chan %d ret %d\n", > > > + i, ret); > > > > If ret == -EPROBE_DEFER, wouldn't it need to return > > -EPROBE_DEFER? It doesn't retry later if -EPROBE_DEFER. > > If ret != -EPROBE_DEFER, it will show a error message then goto out. > > If ret == -EPROBE_DEFER, probe funcation also will goto out. > > > Both of them will return ret. will not go to next round. I see. I misunderstood. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 084E2C433F5 for ; Thu, 25 Nov 2021 06:27:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=o9ZLCf6H5zMibGLji/ZrEr4Dnp3pwD4KiKgoTIyCHfg=; b=mgUt7fToHcV2lF +xUjfyGOSnF40OLqlxUoKLhCYvem0WkYwd9cH7FX0wmWRUuo6/HFmuk9GYvPy3AtNcTKobtTVz9Mg mLzkufJ3u05bimgLdRsPwNs48UPVYGgb3Cdb0g7OqlNO0ddkEqVCyu8kC8x4cVEaIOo4gPWsHBaI3 rZgjfXvqbAtj4tGlz15kq8jkP7hQIBrrzq1iKieQ0T8xPfPOEndD/krfVMu1V67YH+tMgGg+8mN0P 2h8sRy9tDz+kBUo2QV9VupT5NiefIEM5Ldj4zi688lOU3xtSyhIPfB2zr/FlfmDRnS7yQ8raQlXHD 5OBLlHSpJ9exWLvsJEzQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mq8Df-006VCM-JE; Thu, 25 Nov 2021 06:26:55 +0000 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mq8DT-006VAr-N9 for linux-mediatek@lists.infradead.org; Thu, 25 Nov 2021 06:26:44 +0000 Received: by mail-pf1-x434.google.com with SMTP id i12so4963111pfd.6 for ; Wed, 24 Nov 2021 22:26:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=3KRVplZvCkFOfOVdJLJgvxv7eUeJSjbE0R2ZMjgK8Fg=; b=qg7NUJu8MPy9axIndKBSZG/A9a117Qks+SvprKKIx/6u5Dvo/wfW0dxXbnZkcYB28o 5B17LrKsuz/lmmXBBKRG1orqyFioG0onD0PqUjHrRQL2hHgz3PwlzwxqosZ3wLqzkj95 UFuYnqXqUObbeHSfCMVySNCroM4b3vD5tROZ069p2SjZyi8C7muv2zb9cvBIyErJBLIf 7yfIgTo4lBszagYEVQnQN7ArIulNHpavFKtGJAway+kSQ+jAAGPVPNJIYzhBBO3ug9dh jt0oPZLzO/XbNsOClyXigay8drAl7EgarlADNCKFMrujlcfFlrXL2QaRS/Wl9NC1qKdr qCgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=3KRVplZvCkFOfOVdJLJgvxv7eUeJSjbE0R2ZMjgK8Fg=; b=4rOkLumNlTjVCSY/JQ5CN4aSOJDH7jGCVZ26lGH0c60SpF4TDpKl56zPgRrZt345yf p4KM/PJ08wkTyXoOWJMLf/oWhyCawcZtCrPZ2ESJIHGHxiq8uWEcSJOI4OXGlUIjDaax f9YpCY0rM6QbuF4DBWXrQkZ7sELUPKFcYF7HS/5FCYogTf0bk200cGrDmFnEYALsbdRF xUB5CJDvmymjolL0e+BxCNDqCRK25BDwPBQNFlNj7ROYQHlrFtberG18+mGDbk4N6QEj PpmK0ll0Wp9F7O+N6Bp13wx2p8P0iLrvalNREN+CKDOsFYmtD84Ju4oighlfUA6qr7wo 2v7g== X-Gm-Message-State: AOAM5334OhaCgYcVnlrHYYPzr29G1OKLNb4HTQjyBw7K1nmqcWQjn6iS sDlDkHdRnjlcRUrLN1+yaPKEFQ== X-Google-Smtp-Source: ABdhPJxroYaq42S+P8YT4URm9RJBoYTh6XWDOXusK9S3jNhc0+OPin92kb/rtWyJBd7dnKPLjtIrIg== X-Received: by 2002:a63:155d:: with SMTP id 29mr14353211pgv.302.1637821602409; Wed, 24 Nov 2021 22:26:42 -0800 (PST) Received: from google.com ([2401:fa00:1:10:cd6a:1959:1c65:cc19]) by smtp.gmail.com with ESMTPSA id o23sm1706196pfp.209.2021.11.24.22.26.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Nov 2021 22:26:42 -0800 (PST) Date: Thu, 25 Nov 2021 14:26:37 +0800 From: Tzung-Bi Shih To: "allen-kh.cheng" Cc: Jassi Brar , Rob Herring , Matthias Brugger , Linux-ALSA , cujomalainey@google.com, Pierre-Louis Bossart , Liam Girdwood , Ranjani Sridharan , Kai Vehmanen , Daniel Baluta , Mark Brown , Jaroslav Kysela , Takashi Iwai , Project_Global_Chrome_Upstream_Group@mediatek.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, sound-open-firmware@alsa-project.org Subject: Re: [PATCH v3 3/3] firmware: mediatek: add adsp ipc protocol interface Message-ID: References: <20211124084514.28002-1-allen-kh.cheng@mediatek.com> <20211124084514.28002-4-allen-kh.cheng@mediatek.com> <43976e8aab2e3055195d8e9c2f466a804e4d2ba7.camel@mediatek.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <43976e8aab2e3055195d8e9c2f466a804e4d2ba7.camel@mediatek.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211124_222643_769083_2D9DC215 X-CRM114-Status: GOOD ( 17.33 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org On Thu, Nov 25, 2021 at 09:47:22AM +0800, allen-kh.cheng wrote: > On Wed, 2021-11-24 at 18:25 +0800, Tzung-Bi Shih wrote: > > On Wed, Nov 24, 2021 at 04:45:14PM +0800, allen-kh.cheng wrote: > > > + for (i = 0; i < MTK_ADSP_MBOX_NUM; i++) { > > > + chan_name = kasprintf(GFP_KERNEL, "mbox%d", i); > > > + if (!chan_name) > > > + return -ENOMEM; > > > + > > > + dsp_chan = &dsp_ipc->chans[i]; > > > + cl = &dsp_chan->cl; > > > + cl->dev = dev->parent; > > > + cl->tx_block = false; > > > + cl->knows_txdone = false; > > > + cl->tx_prepare = NULL; > > > + cl->rx_callback = adsp_ipc_recv; > > > + > > > + dsp_chan->ipc = dsp_ipc; > > > + dsp_chan->idx = i; > > > + dsp_chan->ch = mbox_request_channel_byname(cl, > > > chan_name); > > > + if (IS_ERR(dsp_chan->ch)) { > > > + ret = PTR_ERR(dsp_chan->ch); > > > + if (ret != -EPROBE_DEFER) > > > + dev_err(dev, "Failed to request mbox > > > chan %d ret %d\n", > > > + i, ret); > > > > If ret == -EPROBE_DEFER, wouldn't it need to return > > -EPROBE_DEFER? It doesn't retry later if -EPROBE_DEFER. > > If ret != -EPROBE_DEFER, it will show a error message then goto out. > > If ret == -EPROBE_DEFER, probe funcation also will goto out. > > > Both of them will return ret. will not go to next round. I see. I misunderstood. _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 90651C433EF for ; Thu, 25 Nov 2021 06:28:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KPeBdhAvuvzmSgbWVKtugHs2QWbSfszI1UBji+eOIPw=; b=oLLSHJJ06A2Sm6 fn9fXXpsL+nwRYy1q/qeEiM71zB0EFohKCPgNve40FTaVbT9h0MdthriSwdtaep66qQfHzE/thbbI 3/asgARjQoziCwXn6nXP1pkXnwyeCf7BqVnHjdeOtYq21jEILHQc500FklHTymGJv4b+vKXZC0kis 1hBiorwGLCfC01KkxdX8q6K1gLMTTdUkqkopnue4Hnf9YLJ5++xrRn1IsHzM3v1X01V5DuS3SxgAV RiaHON15AMaZCes/tRtJibOCTA3JYnpTeGN0oTBkLPj3fAfJAu9YawvYbHhSTlD3shBWWD3gWCqKC q/myQq3Rl66+n65Pee5w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mq8DW-006VBa-7Q; Thu, 25 Nov 2021 06:26:46 +0000 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mq8DT-006VAs-92 for linux-arm-kernel@lists.infradead.org; Thu, 25 Nov 2021 06:26:44 +0000 Received: by mail-pg1-x533.google.com with SMTP id g28so4330148pgg.3 for ; Wed, 24 Nov 2021 22:26:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=3KRVplZvCkFOfOVdJLJgvxv7eUeJSjbE0R2ZMjgK8Fg=; b=qg7NUJu8MPy9axIndKBSZG/A9a117Qks+SvprKKIx/6u5Dvo/wfW0dxXbnZkcYB28o 5B17LrKsuz/lmmXBBKRG1orqyFioG0onD0PqUjHrRQL2hHgz3PwlzwxqosZ3wLqzkj95 UFuYnqXqUObbeHSfCMVySNCroM4b3vD5tROZ069p2SjZyi8C7muv2zb9cvBIyErJBLIf 7yfIgTo4lBszagYEVQnQN7ArIulNHpavFKtGJAway+kSQ+jAAGPVPNJIYzhBBO3ug9dh jt0oPZLzO/XbNsOClyXigay8drAl7EgarlADNCKFMrujlcfFlrXL2QaRS/Wl9NC1qKdr qCgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=3KRVplZvCkFOfOVdJLJgvxv7eUeJSjbE0R2ZMjgK8Fg=; b=BClwAyv1crpBjekMF/vFpCsN+GKhdDLgF/loFKYz6HujMtvYwMr+Bqhn90no2E5YXB aZSP74cEbwuhZ5sFvjRQe8BO28MVUzbhaBvhrRGYeeE7lDHsGacc387xw8FfBKgd4vb/ MPhP6z8cRbvNrviSzKknBUa0h0y5zABnZzizFYzOnTybG9u+iMSw4sVhbACBKEY25l6/ mFr95nfK7TesIQjRhohr3YPPVDrh/Ie8x2wgpX0fOkR+qKtArj6cxHFZI4T9OIjClwPC sDX9r3OX+XskJxNecNzyRIW5wHO66DwtlOft7ATW3hv4zNEJqfl6/jWkI7wTPMFCgh8D zIrQ== X-Gm-Message-State: AOAM530vLt7AWJzjItCjdGA68TEBKIMBIHOy2o/2su1lMe7B3qo6/wRv 3IuvVe7UakeaPQBY/x0/x3GUlg== X-Google-Smtp-Source: ABdhPJxroYaq42S+P8YT4URm9RJBoYTh6XWDOXusK9S3jNhc0+OPin92kb/rtWyJBd7dnKPLjtIrIg== X-Received: by 2002:a63:155d:: with SMTP id 29mr14353211pgv.302.1637821602409; Wed, 24 Nov 2021 22:26:42 -0800 (PST) Received: from google.com ([2401:fa00:1:10:cd6a:1959:1c65:cc19]) by smtp.gmail.com with ESMTPSA id o23sm1706196pfp.209.2021.11.24.22.26.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Nov 2021 22:26:42 -0800 (PST) Date: Thu, 25 Nov 2021 14:26:37 +0800 From: Tzung-Bi Shih To: "allen-kh.cheng" Cc: Jassi Brar , Rob Herring , Matthias Brugger , Linux-ALSA , cujomalainey@google.com, Pierre-Louis Bossart , Liam Girdwood , Ranjani Sridharan , Kai Vehmanen , Daniel Baluta , Mark Brown , Jaroslav Kysela , Takashi Iwai , Project_Global_Chrome_Upstream_Group@mediatek.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, sound-open-firmware@alsa-project.org Subject: Re: [PATCH v3 3/3] firmware: mediatek: add adsp ipc protocol interface Message-ID: References: <20211124084514.28002-1-allen-kh.cheng@mediatek.com> <20211124084514.28002-4-allen-kh.cheng@mediatek.com> <43976e8aab2e3055195d8e9c2f466a804e4d2ba7.camel@mediatek.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <43976e8aab2e3055195d8e9c2f466a804e4d2ba7.camel@mediatek.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211124_222643_346345_289A16D9 X-CRM114-Status: GOOD ( 18.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Nov 25, 2021 at 09:47:22AM +0800, allen-kh.cheng wrote: > On Wed, 2021-11-24 at 18:25 +0800, Tzung-Bi Shih wrote: > > On Wed, Nov 24, 2021 at 04:45:14PM +0800, allen-kh.cheng wrote: > > > + for (i = 0; i < MTK_ADSP_MBOX_NUM; i++) { > > > + chan_name = kasprintf(GFP_KERNEL, "mbox%d", i); > > > + if (!chan_name) > > > + return -ENOMEM; > > > + > > > + dsp_chan = &dsp_ipc->chans[i]; > > > + cl = &dsp_chan->cl; > > > + cl->dev = dev->parent; > > > + cl->tx_block = false; > > > + cl->knows_txdone = false; > > > + cl->tx_prepare = NULL; > > > + cl->rx_callback = adsp_ipc_recv; > > > + > > > + dsp_chan->ipc = dsp_ipc; > > > + dsp_chan->idx = i; > > > + dsp_chan->ch = mbox_request_channel_byname(cl, > > > chan_name); > > > + if (IS_ERR(dsp_chan->ch)) { > > > + ret = PTR_ERR(dsp_chan->ch); > > > + if (ret != -EPROBE_DEFER) > > > + dev_err(dev, "Failed to request mbox > > > chan %d ret %d\n", > > > + i, ret); > > > > If ret == -EPROBE_DEFER, wouldn't it need to return > > -EPROBE_DEFER? It doesn't retry later if -EPROBE_DEFER. > > If ret != -EPROBE_DEFER, it will show a error message then goto out. > > If ret == -EPROBE_DEFER, probe funcation also will goto out. > > > Both of them will return ret. will not go to next round. I see. I misunderstood. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64804C433F5 for ; Thu, 25 Nov 2021 06:31:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347913AbhKYGe2 (ORCPT ); Thu, 25 Nov 2021 01:34:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347914AbhKYGc1 (ORCPT ); Thu, 25 Nov 2021 01:32:27 -0500 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9BE0C061398 for ; Wed, 24 Nov 2021 22:26:43 -0800 (PST) Received: by mail-pf1-x430.google.com with SMTP id g18so4964259pfk.5 for ; Wed, 24 Nov 2021 22:26:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=3KRVplZvCkFOfOVdJLJgvxv7eUeJSjbE0R2ZMjgK8Fg=; b=qg7NUJu8MPy9axIndKBSZG/A9a117Qks+SvprKKIx/6u5Dvo/wfW0dxXbnZkcYB28o 5B17LrKsuz/lmmXBBKRG1orqyFioG0onD0PqUjHrRQL2hHgz3PwlzwxqosZ3wLqzkj95 UFuYnqXqUObbeHSfCMVySNCroM4b3vD5tROZ069p2SjZyi8C7muv2zb9cvBIyErJBLIf 7yfIgTo4lBszagYEVQnQN7ArIulNHpavFKtGJAway+kSQ+jAAGPVPNJIYzhBBO3ug9dh jt0oPZLzO/XbNsOClyXigay8drAl7EgarlADNCKFMrujlcfFlrXL2QaRS/Wl9NC1qKdr qCgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=3KRVplZvCkFOfOVdJLJgvxv7eUeJSjbE0R2ZMjgK8Fg=; b=NsgKDUDVj+9te76oXSBB6A/oSc+Orr425k2pwu9r366E7VghYRJ4Lwh2x19jGWw0AF 04UtR3fhu9Pc5Rpj9bmwRJQod82Qkb4PyUbfE89FeEJuKL96DMqnmesJQDTAJi8JUbRm +xPqazmkiFupC2KNzxy7Vn5WA2yTnh8Rd/AXCYbWKRpCVMU0tIpG59pv/oIsfboNkyXH LArbQe0Do05zK5acOL1N9XjT+s/nFVwtYD+l/eehwOMO5M+eeChmEjx55NEbry2jy6eX 775EcnTv0id2duOEwF+YHOZdUUlDTXqaALQ3U43ab6aBm1giPtplB4xbjNpGMgFqPDdp LQWA== X-Gm-Message-State: AOAM531rYWSy8Ovkw4Kb0T5kC8rnCPYBjcCZe9J+oKe1TXWpAcXNlsGr cGLYj2JK6NO70g6qR6HdUeNPLg== X-Google-Smtp-Source: ABdhPJxroYaq42S+P8YT4URm9RJBoYTh6XWDOXusK9S3jNhc0+OPin92kb/rtWyJBd7dnKPLjtIrIg== X-Received: by 2002:a63:155d:: with SMTP id 29mr14353211pgv.302.1637821602409; Wed, 24 Nov 2021 22:26:42 -0800 (PST) Received: from google.com ([2401:fa00:1:10:cd6a:1959:1c65:cc19]) by smtp.gmail.com with ESMTPSA id o23sm1706196pfp.209.2021.11.24.22.26.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Nov 2021 22:26:42 -0800 (PST) Date: Thu, 25 Nov 2021 14:26:37 +0800 From: Tzung-Bi Shih To: "allen-kh.cheng" Cc: Jassi Brar , Rob Herring , Matthias Brugger , Linux-ALSA , cujomalainey@google.com, Pierre-Louis Bossart , Liam Girdwood , Ranjani Sridharan , Kai Vehmanen , Daniel Baluta , Mark Brown , Jaroslav Kysela , Takashi Iwai , Project_Global_Chrome_Upstream_Group@mediatek.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, sound-open-firmware@alsa-project.org Subject: Re: [PATCH v3 3/3] firmware: mediatek: add adsp ipc protocol interface Message-ID: References: <20211124084514.28002-1-allen-kh.cheng@mediatek.com> <20211124084514.28002-4-allen-kh.cheng@mediatek.com> <43976e8aab2e3055195d8e9c2f466a804e4d2ba7.camel@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43976e8aab2e3055195d8e9c2f466a804e4d2ba7.camel@mediatek.com> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Thu, Nov 25, 2021 at 09:47:22AM +0800, allen-kh.cheng wrote: > On Wed, 2021-11-24 at 18:25 +0800, Tzung-Bi Shih wrote: > > On Wed, Nov 24, 2021 at 04:45:14PM +0800, allen-kh.cheng wrote: > > > + for (i = 0; i < MTK_ADSP_MBOX_NUM; i++) { > > > + chan_name = kasprintf(GFP_KERNEL, "mbox%d", i); > > > + if (!chan_name) > > > + return -ENOMEM; > > > + > > > + dsp_chan = &dsp_ipc->chans[i]; > > > + cl = &dsp_chan->cl; > > > + cl->dev = dev->parent; > > > + cl->tx_block = false; > > > + cl->knows_txdone = false; > > > + cl->tx_prepare = NULL; > > > + cl->rx_callback = adsp_ipc_recv; > > > + > > > + dsp_chan->ipc = dsp_ipc; > > > + dsp_chan->idx = i; > > > + dsp_chan->ch = mbox_request_channel_byname(cl, > > > chan_name); > > > + if (IS_ERR(dsp_chan->ch)) { > > > + ret = PTR_ERR(dsp_chan->ch); > > > + if (ret != -EPROBE_DEFER) > > > + dev_err(dev, "Failed to request mbox > > > chan %d ret %d\n", > > > + i, ret); > > > > If ret == -EPROBE_DEFER, wouldn't it need to return > > -EPROBE_DEFER? It doesn't retry later if -EPROBE_DEFER. > > If ret != -EPROBE_DEFER, it will show a error message then goto out. > > If ret == -EPROBE_DEFER, probe funcation also will goto out. > > > Both of them will return ret. will not go to next round. I see. I misunderstood.