From patchwork Mon Jun 30 16:22:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jassi Brar X-Patchwork-Id: 32784 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f197.google.com (mail-ve0-f197.google.com [209.85.128.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 30AC3203C0 for ; Mon, 30 Jun 2014 16:22:33 +0000 (UTC) Received: by mail-ve0-f197.google.com with SMTP id jz11sf19540962veb.8 for ; Mon, 30 Jun 2014 09:22:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mime-version:in-reply-to:references :date:message-id:subject:from:to:cc:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=J9T/6k3xzkTCVs7/nbg5Ik+/FgFHBZG7/El6KANISZc=; b=YI8BDU+8u+ZnfzPypFU2MKnsGRcgC0BPL6pUnRyTrTyRvspFyLqKyLKuP6xYUVknhb S0luGNDWGFlbpDF2D36NS8HIgm6CyHE8ChgZzHs63Vu1sEbWb8k22r6EkbU9O23MsHcj 6vCuRSVixloZcSNyKCI9671CrA2s11xqwnpZ5lgl08afSK4ROD5K0oLZx5GzIgQS8kzc 2eoRtshZh5tc0HlohBk3zwh6BhSoratYVY3PoF9xdLo/1BP833V5E/w1LVF9+puMrQ+8 rBwMCebz/TjrPzQlWOwKjWw55zbHJAuxQl4ZQE/dXZxN4Qp8zWoQ5Qw+T1VjbS5RFooX zGmA== X-Gm-Message-State: ALoCoQkiQfey9CsZVkUY945OlbKNCFhzcmYZyqYoJLBATtwBtD8XawxYYaNOw8+wtFKPNa5pOW4Q X-Received: by 10.52.121.13 with SMTP id lg13mr19388938vdb.8.1404145352997; Mon, 30 Jun 2014 09:22:32 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.16.107 with SMTP id 98ls1482891qga.80.gmail; Mon, 30 Jun 2014 09:22:32 -0700 (PDT) X-Received: by 10.58.220.230 with SMTP id pz6mr39042727vec.9.1404145352930; Mon, 30 Jun 2014 09:22:32 -0700 (PDT) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id sv16si10236986vdb.55.2014.06.30.09.22.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 30 Jun 2014 09:22:32 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.175 as permitted sender) client-ip=209.85.128.175; Received: by mail-ve0-f175.google.com with SMTP id jx11so8318020veb.6 for ; Mon, 30 Jun 2014 09:22:32 -0700 (PDT) X-Received: by 10.58.112.65 with SMTP id io1mr1397125veb.61.1404145352858; Mon, 30 Jun 2014 09:22:32 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp152349vcb; Mon, 30 Jun 2014 09:22:32 -0700 (PDT) X-Received: by 10.140.19.21 with SMTP id 21mr59982488qgg.76.1404145352374; Mon, 30 Jun 2014 09:22:32 -0700 (PDT) Received: from mail-qa0-f49.google.com (mail-qa0-f49.google.com [209.85.216.49]) by mx.google.com with ESMTPS id m9si25677559qav.68.2014.06.30.09.22.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 30 Jun 2014 09:22:32 -0700 (PDT) Received-SPF: pass (google.com: domain of jaswinder.singh@linaro.org designates 209.85.216.49 as permitted sender) client-ip=209.85.216.49; Received: by mail-qa0-f49.google.com with SMTP id w8so6518973qac.36 for ; Mon, 30 Jun 2014 09:22:32 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.140.98.35 with SMTP id n32mr60077564qge.111.1404145347942; Mon, 30 Jun 2014 09:22:27 -0700 (PDT) Received: by 10.140.84.6 with HTTP; Mon, 30 Jun 2014 09:22:27 -0700 (PDT) In-Reply-To: <1404144980.6148.6.camel@hobbes> References: <1402592317-7043-1-git-send-email-jaswinder.singh@linaro.org> <1404144980.6148.6.camel@hobbes> Date: Mon, 30 Jun 2014 21:52:27 +0530 Message-ID: Subject: Re: [PATCHv7 0/5] Common Mailbox Framework From: Jassi Brar To: Lubomir Rintel Cc: lkml , Devicetree List , Matt Porter , Patch Tracking , Bjorn Andersson , Ashwin Chaugule , Greg Kroah-Hartman , "Anna, Suman" , Loic Pallardy , LeyFoon Tan , Craig McGeachie , Courtney Cavin , pa@jasper.es X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: jaswinder.singh@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , On 30 June 2014 21:46, Lubomir Rintel wrote: > Hi Jassi, > > On Thu, 2014-06-12 at 22:28 +0530, Jassi Brar wrote: >> Hello, >> Here is the next revision of Mailbox framwork. > > I'm wondering whether you keep a Git tree with the framework we could > keep the Raspberry Pi mailbox driver based on (bcm2835-mbox)? > > Also, from look at the API it does not seem to me that it's possible to > synchronously (that is without a tx_done callback) collect a response > when a message is sent with tx_block enabled. Equivalent to this: [1] > Thanks, good catch. Could you please give this a try... -jassi diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c index afa63cd..4059602 100644 --- a/drivers/mailbox/mailbox.c +++ b/drivers/mailbox/mailbox.c @@ -101,10 +101,11 @@ static void tx_tick(struct mbox_chan *chan, int r) _msg_submit(chan); /* Notify the client */ + if (mssg && chan->cl->tx_done) + chan->cl->tx_done(chan->cl, mssg, r); + if (chan->cl->tx_block) complete(&chan->tx_complete); - else if (mssg && chan->cl->tx_done) - chan->cl->tx_done(chan->cl, mssg, r); } static void poll_txdone(unsigned long data)