[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240311155818.03e20c05@kernel.org>
Date: Mon, 11 Mar 2024 15:58:18 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Subbaraya Sundeep <sbhatta@...vell.com>
Cc: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<davem@...emloft.net>, <edumazet@...gle.com>, <pabeni@...hat.com>,
<sgoutham@...vell.com>, <lcherian@...vell.com>, <gakula@...vell.com>,
<hkelam@...vell.com>, <naveenm@...vell.com>, <horms@...nel.org>
Subject: Re: [net PATCH 1/5] octeontx2: Detect the mbox up or down message
via register
On Tue, 12 Mar 2024 00:46:48 +0530 Subbaraya Sundeep wrote:
> static int mcs_notify_pfvf(struct mcs_intr_event *event, struct rvu *rvu)
> {
> struct mcs_intr_info *req;
> - int err, pf;
> + int pf;
>
> pf = rvu_get_pf(event->pcifunc);
>
> + mutex_lock(&rvu->mbox_lock);
> +
> req = otx2_mbox_alloc_msg_mcs_intr_notify(rvu, pf);
> if (!req)
> return -ENOMEM;
missing unlock here?
> @@ -135,10 +137,11 @@ static int mcs_notify_pfvf(struct mcs_intr_event *event, struct rvu *rvu)
> req->hdr.pcifunc = event->pcifunc;
> req->lmac_id = event->lmac_id;
>
> - otx2_mbox_msg_send(&rvu->afpf_wq_info.mbox_up, pf);
> - err = otx2_mbox_wait_for_rsp(&rvu->afpf_wq_info.mbox_up, pf);
> - if (err)
> - dev_warn(rvu->dev, "MCS notification to pf %d failed\n", pf);
> + otx2_mbox_wait_for_zero(&rvu->afpf_wq_info.mbox_up, pf);
> +
> + otx2_mbox_msg_send_up(&rvu->afpf_wq_info.mbox_up, pf);
> +
> + mutex_unlock(&rvu->mbox_lock);
--
pw-bot: cr
Powered by blists - more mailing lists