From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7D0A1A04BA for ; Sun, 4 Oct 2020 10:38:00 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4DB6F1BDDC; Sun, 4 Oct 2020 10:37:59 +0200 (CEST) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by dpdk.org (Postfix) with ESMTP id 05CB41BC8C; Sun, 4 Oct 2020 10:37:55 +0200 (CEST) Received: by mail-io1-f68.google.com with SMTP id l8so6063057ioh.11; Sun, 04 Oct 2020 01:37:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gkRxx5Oz9If+9s20xxOU9e7q6dKkn3R9F0tRh97CZc4=; b=OWoz8m59uaa0M8Z5o3k8OGugJqwRDWD+t48lJB0eNsOr1hpbJbn6eymXvGnT4r0Pth YVlD1GxNuhO1GTsLk9TpCrjjJZCHma9W5Rg6Zs7oIQAK3haTO8D5nJsmINPK0uNedUu3 nZxXcObVsKh6lCzsac2kfhs5/z8usDVPIbtawAukgd95cUg8NRYVzP/HCpM2A79Dm2pa aJlVKCdc+W3ilxMxtF7CljmanhYz8Of83/P2M25zR2Cw+qQiwu2FgcZ66/scAG1JrpCc F+Me93NRjw91L5NGDprQvaaHT4fvJtpKjjne6nBPIZ62h1vMyAbufV+mXEZ/Ur+lQKMw ERqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gkRxx5Oz9If+9s20xxOU9e7q6dKkn3R9F0tRh97CZc4=; b=EohVGy2gRE4jyQCgELq1UfPde8p5NDh2V9FLaPPkilu8azCzSbOac/uNxE21bFGAD8 t9q6uLOhXoZGQecpLYlg3m97RgyLNdnPIkGDLXu2jG7fFkaTea9kbYTv/+oBW+rHKIRK 1EqJvtmWPegKFWf8VDCJToMlLoiDW/YjSZbo1r7YfC6qebAVizvilnvOiJpXIts1220y 4rGpeeEJA7HJOYAMkWDJlgGd/zPwFBtYFx6JlD4hcQ51T3gcyO1ArY3g/xbpXPd44EYO pkfdWegPheowsFA3UXSchbgyc1nDwCXcUCy5m3CDp5QyCGMshMkTh7L5jVYXC6DDwfcj lvxQ== X-Gm-Message-State: AOAM532i8fZZjhbJLo006ukI0W9zVrjDXeV40zvA8//5qxxq4ZEVkCF/ hFpkFAzvJeEpJKeDhZEyH05kU4nnbTHe7NcwYhc= X-Google-Smtp-Source: ABdhPJwbrSGyQvnonN+lOTIVmEVkztGQDN69Mkp4GS1/u9AVuws8IHPrjNkco27ID6vM2bS0p+xk6f7GIxYzeNZ3io8= X-Received: by 2002:a02:9f0d:: with SMTP id z13mr8721396jal.60.1601800673323; Sun, 04 Oct 2020 01:37:53 -0700 (PDT) MIME-Version: 1.0 References: <20201001224128.15222-1-rmody@marvell.com> <20201002195945.20343-1-rmody@marvell.com> In-Reply-To: <20201002195945.20343-1-rmody@marvell.com> From: Jerin Jacob Date: Sun, 4 Oct 2020 14:07:37 +0530 Message-ID: To: Rasesh Mody Cc: Ferruh Yigit , dpdk-dev , dpdk stable , Igor Russkikh , GR-Everest-DPDK-Dev Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-stable] [PATCH v2] net/qede: fix get link details X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On Sat, Oct 3, 2020 at 1:30 AM Rasesh Mody wrote: > > This patch fixes get current link details, without this change the link > details can be inaccurate if proper lock is not acquired. > > Fixes: 739a5b2f2b49 ("net/qede/base: use passed ptt handler") > Cc: stable@dpdk.org > > Reported-by: Ferruh Yigit > Signed-off-by: Rasesh Mody > Signed-off-by: Igor Russkikh Applied to dpdk-next-net-mrvl/main. Thanks > --- > drivers/net/qede/qede_main.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/drivers/net/qede/qede_main.c b/drivers/net/qede/qede_main.c > index aecb98261..1ae10d99d 100644 > --- a/drivers/net/qede/qede_main.c > +++ b/drivers/net/qede/qede_main.c > @@ -584,13 +584,12 @@ qed_get_current_link(struct ecore_dev *edev, struct qed_link_output *if_link) > hwfn = &edev->hwfns[0]; > if (IS_PF(edev)) { > ptt = ecore_ptt_acquire(hwfn); > - if (!ptt) > - DP_NOTICE(hwfn, true, "Failed to fill link; No PTT\n"); > - > + if (ptt) { > qed_fill_link(hwfn, ptt, if_link); > - > - if (ptt) > ecore_ptt_release(hwfn, ptt); > + } else { > + DP_NOTICE(hwfn, true, "Failed to fill link; No PTT\n"); > + } > } else { > qed_fill_link(hwfn, NULL, if_link); > } > -- > 2.18.1 >