Re: [PATCH] hw: Fix permissions for OCRDMA_RESET_STATS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx> 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: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux