Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp288573ybk; Tue, 12 May 2020 23:37:14 -0700 (PDT) X-Google-Smtp-Source: APiQypIvDpQJYSRNvEBJlcGXccnTw5aTu7+A91MGDNvBssk682uVWJih3KbdxphcfS9EcGWR5ZOj X-Received: by 2002:aa7:c402:: with SMTP id j2mr19168167edq.284.1589351833948; Tue, 12 May 2020 23:37:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589351833; cv=none; d=google.com; s=arc-20160816; b=aJ5XthtQTV9Nm7T1Tv3c4jx0SK9tana06WZH/ObKZ6qNFehehhfwLlQTJa0nhLMUSe pd4tB+dzCcDLhGfHnKuEluLJTLnvDpdVAfAKRx3rsePwa+8XoL3E8RKTmR35TJ8r6N2n 1YbmmlsC+anEo7hUMwZBv7PsO26W+tZ1hACHq4t7KHBSuX00I6a14OL4BGRS6U2U1eki xNPmiE7WJimFnTdT+DMPOqoaexP6s1qXeKyo/vceIeA6sm2tgTKne4RBNBhqRgq9Kbxz G9YF8YFPOmYhztlVqLbTsSC5uSaLBZqynrtuSg3DZIfAf8+T8DuPtkroObibtiTWEecs aGaA== 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=krXK6kZ32e/DR3mFxC2FGM2vIFqONMy2uV/TIX0FVDM=; b=UbC/w2Fvc1sKhCGc9qJAgaudziA5B3HYd0LnVglTl8DNlAz3ub2vcH4xyQUBoIfPPR UaV2SLt5UO2cWQWAIPe3gjFffMad6aKMlvbilA1jznXkcIhaC25MuEu+GpLA7AIhT7z3 e+GZIRHXc6Ee26uGeOVXzAyVhdSGJBzyi6zyAkSeJU9xcGKIIZ+MgAShmQBzePjS5z9l boISpQ2l7sR02j90+EfIor9p4Flle2Fq3R2C2xrw2XWjCj8JrSZqyLgNeh+DNsPyskCz 8crTn6rbAuh6m9vlc3JwyPhFL1/zRAZUrZVQCNlrgX9NG7/6Y08TKY6JyhvqsYGDqeD8 F8DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=frhhnar7; 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 o6si10068592edz.574.2020.05.12.23.36.51; Tue, 12 May 2020 23:37:13 -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=frhhnar7; 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 S1732419AbgEMGco (ORCPT + 99 others); Wed, 13 May 2020 02:32:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729482AbgEMGck (ORCPT ); Wed, 13 May 2020 02:32:40 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16D05C061A0C; Tue, 12 May 2020 23:32:40 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id r17so9579005lff.9; Tue, 12 May 2020 23:32:40 -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=krXK6kZ32e/DR3mFxC2FGM2vIFqONMy2uV/TIX0FVDM=; b=frhhnar7CKQR2XF4Gs7FLnJvOeAo/JsvYEUzT8TLjEVb6kqd31MBao6wcIFeBL3qg+ KwkF1Amy5O8k2ZXdiMmlmf+LSJt3xL8s9ss5Az4ue5CXlNw9OcCvTSnEeI+VrUu3K1vo K3Jerui34Obxv4lspAwcu5qRexjClFphoMQYY5QtDLC0E2zXn0Obo9qMJEiXcq4YRXIw ThGRjP6sspwo39HZICoCCR3J7IHG7IqQeuGf+qWW20WRpkcXxsYfOJYrpCtRxLbNp3lu aABlwegv63RSx26E+0g8aUtS0nx6o1Af6kWXyjnyySpLjVnlw+SNmO8W+Jc3wzYOozDl g7Gg== 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=krXK6kZ32e/DR3mFxC2FGM2vIFqONMy2uV/TIX0FVDM=; b=JBsEP5UNvJo3LpJnTeKjp3srq1ulcBRzmF4LM/DVVAVv0iVD9wkZrOsRka3y68fakK BYpPPpqFeCMEbJ/MBIKsOwR0BKYZj0LVSW3ViTeP20d9c425i/oQWkzdroR/5CVoCEL5 Vx8qqKvSZRzLuTe0nrC5EAO5v/NWVm9cnVl8oNJndy3CJOkH5zdz56tkPHVP29gflQTN IlY05ia4zjk8CBiWB1Y6M41dyLPoG18JT58Q1ae1PMzTPftFBbtyP0mui7PQWsCKAW3D J8HvkP/d/Aq4ewaYHZklGA4Di5rHNM3g/S/RCvk4eBvJkcHSZud4HeA0/HLLA/bl7HP5 wfeA== X-Gm-Message-State: AOAM533NHvFhjKIQj4pemkArpi3GG7RTp6RNCq95kpi4fdQnqXQS67mO p3f/ACsvcsxaWTC4T1KmGU6WQzOQjRAYgn2/6KnS1g== X-Received: by 2002:a05:6512:10cd:: with SMTP id k13mr16946641lfg.153.1589351558460; Tue, 12 May 2020 23:32:38 -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: Baolin Wang Date: Wed, 13 May 2020 14:32:23 +0800 Message-ID: Subject: Re: [PATCH v4 2/2] mailbox: sprd: Add Spreadtrum mailbox driver To: Jassi Brar 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 Wed, May 13, 2020 at 2:05 PM Jassi Brar wrote: > > 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. I think I've explained the reason why we need add this validation in my previous email, I am not sure how do you think? You still want to remove this validation? -- Baolin Wang