Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp276340ybk; Tue, 12 May 2020 23:10:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyW+l+aU189hbdvfA/pK2JV/DkwqPgLS77g9NGnGmTAPUPjqZPdDfSR4cM5dkKqKYIUUklZ X-Received: by 2002:a05:6402:3128:: with SMTP id dd8mr12674985edb.156.1589350216314; Tue, 12 May 2020 23:10:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589350216; cv=none; d=google.com; s=arc-20160816; b=mtYRLJ++yDs8yWYLJ8MG4epW0Czw9dl6GDkFAaLgtmdk9fwa2gG+Xuh6XOZ4ks2CM1 7g1Kd8ZYpYkfEi4rvlmjL2wccpflGoAUjnH1e3gv6PBH1P8ki2mihN9ucvDEl9W2zkPI ofQ/W0Clk8gawxjeewyRNwUWRSNXKfFYdTscU50Ylod5VoYO7LOHTyplJ7d3xAmcFFsc DCOux/0ETMeP3b3u5J8M/wRdg0S1r5eFS14W5rLAnEorxFaR5SijrcT+WwbTVB4y451s Ybq+eGkhiEDjWgI0gfNHS21QQKMgOrQQ995QPhJT3umr0IYiY1FDozupr93Xrxo0I5GV oOdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=llq+P2xS9hRnxN7VKa+cKSHtEacxqIGOmNa3rWsykFA=; b=yzrp2FD/1qh/UDeaqMzCqT4bcHqJ9NLoe/PE1PhXhnnRASWZMDMnOIWN65TBzsi4eD Uq3HoWDzwatd/T+ujft2bmRE/fjx7KKGZWDZCHiD+WHsboj3o6EccQrAoBhsf99FWdqH uP2oVxHc2a1pfESpaudomGxff4OUGKPXHJj7q4BcQV5c1IBMu4geUk6+LUgh47XyFRHU 1KpeO0NlyvL61wfuzreEce4QYHC5glar5bRWcyamDgxgU9/LitRDIeEsuZ9F5wXb4WKt dbE951gK6AKQCkEC2a3xTXsrWA3rixB6UJyYQJ9pbMO5FNxEUW2+UKdHJB8ESln+Yj5r VO/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OhDiGu68; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j19si8739818edp.118.2020.05.12.23.09.53; Tue, 12 May 2020 23:10:16 -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=@gmail.com header.s=20161025 header.b=OhDiGu68; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729327AbgEMGFU (ORCPT + 99 others); Wed, 13 May 2020 02:05:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728964AbgEMGFU (ORCPT ); Wed, 13 May 2020 02:05:20 -0400 Received: from mail-il1-x142.google.com (mail-il1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61193C061A0C; Tue, 12 May 2020 23:05:20 -0700 (PDT) Received: by mail-il1-x142.google.com with SMTP id w18so3803839ilm.13; Tue, 12 May 2020 23:05:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=llq+P2xS9hRnxN7VKa+cKSHtEacxqIGOmNa3rWsykFA=; b=OhDiGu681l8VKu/cUqlcGkDBshf0USyz3q6TF3HiFLF92uoX2JkY8MX+b91AA0P8jg GIXb3UVrxBSWQF5MBDGaVq6I534SKwrh8tO7fDh2xbpy3Ha/uM8MnGDuT4u4NasD0Zqt Fzhy7RFHuAe7uFd8Z89J9lCuxvaUMsOjNWLTkgURTTGa0CA4db7KdmDSG/evutJE81cq hNfzvTN1DsYwrY0QvdtEIBFkvkP2V035Atdd5CC+oqL4T6auSVXGzXK8cC3XWsrghGf5 2t3uCsS1PSVAbe4H9fFPUByp1qvj7RspYUSfcsC4Mg08aamZO1fN2dQmspf/rddEVO6F sPtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=llq+P2xS9hRnxN7VKa+cKSHtEacxqIGOmNa3rWsykFA=; b=iBVXbVzxA0ffooCay+SfYr6SQlQFT0unMeqTIRO7U8m4/P5fbWwDk9jq+4EhWSPQVH kHEWpCtvL//ylize3jwBfeBHc0wR9WWpeerFttzMM93ssAKeAL71ZWiA+pS4nkc4LQvH tGMxAwmeDGB/1bs+pz6DrvDtnM7p3u6JFMrh60OdxJlv+sINL+sY0QganAdPaiasZwU3 UQ9jwSLWW+UoCGK0yk8HlgOh5US6IzujdW2I6LitMuPuNUc0lMykI/Uq72LbyK4628xo nwbOPyM4VsdH6QIQ31/bV1sf9kLctj5gXYYuD4U6EehlIO6VGXB25AaZFpnamCZsqn7A EX3g== X-Gm-Message-State: AGi0PuZEVfhUj2nzjjNn23ybJQCJ53GCTSOZYGPPskQMWEdZkd9xjggf hV6ZGHvWAs7vIUx6V/Pfdm6HhFr6mcGFtd3ZQHk= X-Received: by 2002:a92:d40a:: with SMTP id q10mr1858272ilm.87.1589349919748; Tue, 12 May 2020 23:05:19 -0700 (PDT) MIME-Version: 1.0 References: <8d29eba045ef18c5489e122b3668afc20431f15d.1588043236.git.baolin.wang7@gmail.com> <4b224e7bb703e15469e5cd79a54f7bc00a790fc5.1588043236.git.baolin.wang7@gmail.com> In-Reply-To: From: Jassi Brar Date: Wed, 13 May 2020 01:05:08 -0500 Message-ID: Subject: Re: [PATCH v4 2/2] mailbox: sprd: Add Spreadtrum mailbox driver To: Baolin Wang Cc: Rob Herring , Orson Zhai , Chunyan Zhang , Devicetree List , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 12, 2020 at 11:14 PM Baolin Wang wrote: > > Hi Jassi, > > On Thu, May 7, 2020 at 11:23 AM Baolin Wang wrote: > > > > Hi Jassi, > > > > On Thu, May 7, 2020 at 7:25 AM Jassi Brar wrote: > > > > > > On Wed, May 6, 2020 at 8:29 AM Baolin Wang wrote: > > > > > > > > Hi Jassi, > > > > > > > > On Tue, Apr 28, 2020 at 11:10 AM Baolin Wang wrote: > > > > > > > > > > From: Baolin Wang > > > > > > > > > > The Spreadtrum mailbox controller supports 8 channels to communicate > > > > > with MCUs, and it contains 2 different parts: inbox and outbox, which > > > > > are used to send and receive messages by IRQ mode. > > > > > > > > > > Signed-off-by: Baolin Wang > > > > > Signed-off-by: Baolin Wang > > > > > --- > > > > > Changes from v3: > > > > > - Save the id in mbox_chan.con_priv and remove the 'sprd_mbox_chan' > > > > > > > > > > Changes from v2: > > > > > - None. > > > > > > > > > > Changes from v1: > > > > > - None > > > > > > > > Gentle ping, do you have any other comments? Thanks. > > > > > > > Yea, I am still not sure about the error returned in send_data(). It > > > will either never hit or there will be no easy recovery from it. The > > > api expects the driver to tell it the last-tx was done only when it > > > can send the next message. (There may be case like sending depend on > > > remote, which can't be ensured before hand). > > > > Actually this is an unusual case, suppose the remote target did not > > fetch the message as soon as possile, which will cause the FIFO > > overflow, so in this case we can not send messages to the remote > > target any more, otherwise messages will be lost. Thus we can return > > errors to users to indicate that something wrong with the remote > > target need to be checked. > > > > So this validation in send_data() is mostly for debugging for this > > abnormal case and we will not trigger this issue if the remote target > > works well. So I think it is useful to keep this validation in > > send_data(). Thanks. > > Any comments? Thanks. > Same as my last post. thnx