Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751403AbdLUFFu (ORCPT ); Thu, 21 Dec 2017 00:05:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:46048 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750718AbdLUFFs (ORCPT ); Thu, 21 Dec 2017 00:05:48 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 214F7218CA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=leon@kernel.org Date: Thu, 21 Dec 2017 07:05:43 +0200 From: Leon Romanovsky To: Selvin Xavier Cc: Anton Vasilyev , Devesh Sharma , Doug Ledford , Sean Hefty , Hal Rosenstock , Michael Mera , linux-rdma@vger.kernel.org, linux-kernel , ldv-project@linuxtesting.org Subject: Re: [PATCH] hw: Fix permissions for OCRDMA_RESET_STATS Message-ID: <20171221050543.GD2942@mtr-leonro.local> References: <1502207797-25589-1-git-send-email-vasilyev@ispras.ru> <20170815183158.GB24282@mtr-leonro.local> <20171219123030.GD2942@mtr-leonro.local> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="MOeiELSuYwpLEKvX" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2692 Lines: 75 --MOeiELSuYwpLEKvX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Dec 19, 2017 at 11:14:03PM +0530, Selvin Xavier wrote: > On Tue, Dec 19, 2017 at 6:00 PM, Leon Romanovsky 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 --MOeiELSuYwpLEKvX Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEkhr/r4Op1/04yqaB5GN7iDZyWKcFAlo7QScACgkQ5GN7iDZy WKfLvRAAx+yLthlDf4QRLo6u8GeM9dJqPY8vP3h395gprS676ao1q/fPhoJuiwxa fNrFAqOZGV+ZMCTJTD8tvA5HTq5bgCVCNyfpnRczKoPXfGUZlM2yKXsLra6RAAIc wSkCTZAjlY/qvvp7x9b5nXAe4CyrV5dtmItTLx9WBHUYh3sQFwtOIwoQX84wOVxj 1mPy2XjolkDpT689jbOC4TrKNm8SXNslfv2wJtHvyFksZX4TRn+KLHS/6lme7s9l AqaEtL2f2Ixp3AObMflTRJ4JFq0X+4Wlj6S4S0E0a8xsSwhb8v6X1Bsn/tEA8JD9 he3BE2R9KaZCvBsNGAc4WVNWFh7BJNFMznihnALuhjO++C6qp2KUG3SXcqj+yf7H WCSinN3DAYsjpQhbjj/0T5qc9+mD2qPzk0czt/9eLFUFrnTsZqodJyGB/4uFCEDi XJxvUWobK+izKFvUwegM2StyRn7iHavJKZcsV7nQIxRCw47x+ls7dOEsa8eGPqNT uLzG05ExSG7u/Wj3XfsgwyHSxiwNl3LOVdBgvdSUris/PQ1HSpE+puAGR9rEbOvQ zz4ceH+IjH/r3k6OywLhrMtn560t7OLhQtBC1Uzv4iQD5DIzY7jP/4JHRTFb0PVg ALMa9StZM/5pHesJO3vI6KO0eBq+dMnjcRH2851ZLQoazsx3muA= =mOFt -----END PGP SIGNATURE----- --MOeiELSuYwpLEKvX--