[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+sbYW06=taq46tUxP0nto2Tj0p_Jt--AobDwP4TaEwK9mnqLQ@mail.gmail.com>
Date: Tue, 19 Dec 2017 23:14:03 +0530
From: Selvin Xavier <selvin.xavier@...adcom.com>
To: Leon Romanovsky <leon@...nel.org>
Cc: Anton Vasilyev <vasilyev@...ras.ru>,
Devesh Sharma <devesh.sharma@...adcom.com>,
Doug Ledford <dledford@...hat.com>,
Sean Hefty <sean.hefty@...el.com>,
Hal Rosenstock <hal.rosenstock@...il.com>,
Michael Mera <dev@...haelmera.com>, linux-rdma@...r.kernel.org,
linux-kernel <linux-kernel@...r.kernel.org>,
ldv-project@...uxtesting.org
Subject: Re: [PATCH] hw: Fix permissions for OCRDMA_RESET_STATS
On Tue, Dec 19, 2017 at 6:00 PM, Leon Romanovsky <leon@...nel.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,
Selvin
Powered by blists - more mailing lists