From: Leon Romanovsky <leon@kernel.org>
To: Selvin Xavier <selvin.xavier@broadcom.com>
Cc: Anton Vasilyev <vasilyev@ispras.ru>,
Devesh Sharma <devesh.sharma@broadcom.com>,
Doug Ledford <dledford@redhat.com>,
Sean Hefty <sean.hefty@intel.com>,
Hal Rosenstock <hal.rosenstock@gmail.com>,
Michael Mera <dev@michaelmera.com>,
linux-rdma@vger.kernel.org,
linux-kernel <linux-kernel@vger.kernel.org>,
ldv-project@linuxtesting.org
Subject: Re: [PATCH] hw: Fix permissions for OCRDMA_RESET_STATS
Date: Thu, 21 Dec 2017 07:05:43 +0200 [thread overview]
Message-ID: <20171221050543.GD2942@mtr-leonro.local> (raw)
In-Reply-To: <CA+sbYW06=taq46tUxP0nto2Tj0p_Jt--AobDwP4TaEwK9mnqLQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1662 bytes --]
On Tue, Dec 19, 2017 at 11:14:03PM +0530, Selvin Xavier wrote:
> On Tue, Dec 19, 2017 at 6:00 PM, Leon Romanovsky <leon@kernel.org> wrote:
> >> status = ocrdma_nonemb_mbx_cmd(dev, mqe, dev->stats_mem.va);
> >
> > It still doesn't make a lot of sense to me:
> >
> > ocrdma_mbx_rdma_stats():
> > 1315 if (reset)
> > 1316 req->reset_stats = reset;
> > 1317
> > 1318 status = ocrdma_nonemb_mbx_cmd(dev, mqe, dev->stats_mem.va);
> >
> >
> > 1117 static int ocrdma_nonemb_mbx_cmd(struct ocrdma_dev *dev, struct ocrdma_mqe *mqe,
> > 1118 void *payload_va)
> > 1119 {
> > 1120 int status;
> > 1121 struct ocrdma_mbx_rsp *rsp = payload_va;
> > 1122
> > 1123 if ((mqe->hdr.spcl_sge_cnt_emb & OCRDMA_MQE_HDR_EMB_MASK)
> > 1124 OCRDMA_MQE_HDR_EMB_SHIFT)
> > 1125 BUG();
> > 1126
> > 1127 status = ocrdma_mbx_cmd(dev, mqe);
> >
> > You are not using rsp and/or payload_va to provide data to ocrdma_mbx_cmd.
> >
> > How are you passing reset_stats information to FW?
> >
> This is a command where the response size is more than 236 bytes. So this is
> sent as a non-embedded command where the req/resp will be available in
> payload_va
> and phys address of payload_va (payload_pa) will be send down to
> firmware as MQE. FW will dma the mailbox
> from the payload_pa and response is transferred back.
>
> req->reset_stats = reset; is actually setting the corresponding bit in
> the request structure @payload_va.
> FW receives reset_stats once the request is DMA-ed from payload_pa.
Thanks
>
> > Thanks
> >
>
> Thanks,
> Selvin
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-12-21 5:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-08 15:56 [PATCH] hw: Fix permissions for OCRDMA_RESET_STATS Anton Vasilyev
2017-08-15 18:31 ` Leon Romanovsky
2017-12-19 10:29 ` Selvin Xavier
2017-12-19 12:30 ` Leon Romanovsky
2017-12-19 17:44 ` Selvin Xavier
2017-12-21 5:05 ` Leon Romanovsky [this message]
2017-12-21 2:59 ` Jason Gunthorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171221050543.GD2942@mtr-leonro.local \
--to=leon@kernel.org \
--cc=dev@michaelmera.com \
--cc=devesh.sharma@broadcom.com \
--cc=dledford@redhat.com \
--cc=hal.rosenstock@gmail.com \
--cc=ldv-project@linuxtesting.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=sean.hefty@intel.com \
--cc=selvin.xavier@broadcom.com \
--cc=vasilyev@ispras.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox