Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp866287pxb; Tue, 1 Feb 2022 12:03:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJzow826ML52FErvAdOKD7ee9EDtz+tB7UN8JrHApPJlOMImKEUl2q6P8LyV7hfohN2RjlGs X-Received: by 2002:a17:90a:a616:: with SMTP id c22mr4251563pjq.68.1643745821294; Tue, 01 Feb 2022 12:03:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643745821; cv=none; d=google.com; s=arc-20160816; b=CrfFX5XjaRk08TYkXql4Giv31HYdHXXrByslsnYflyPYOJZxpvYyV2Hn+sM5Sh5K4e JnTLPS5fbNnpNp7dxPUccbCXP9+8ySaADirXf3D4fpOCPEYsZhABbpxf5F5xNktPmIKt PiARa9AiS5Xj33YYmi4Wkqdobzg4hhN2tGLTxwnwhd7mII7TcmHHLTkch7tWqtElmsmt tm9ZWRXbs+QMuHtAWkejhfX7o6N1AY5nt6evfLIPIHzm1owSI/zOk4L2l9W1FUhE2FT5 b4+53vWjmD62Ozn8sAyl/zi4O8emIUW4LDjAYUKaD+TmhFkyCtfRYjNypuyISXQtYEXm +qrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=I9n9W6PSXQoLVlgu/GdvYe0eK3itifLHpjly7S9/OmA=; b=uNcq8Fqd6kw2qiPqC5N5K2L3ZnchcYHn1m3tmqXLAks1tOFXPo++KMqRyzLVCa+P7J nbtwd6BG7IBG8UFmIGI8Zy6iEcHxmivlFbOgBJdtf1aaSRoWXNDSrbqXbC0mL/OPHqqG GcD/Mui9i52TxAZJNK3iJBcCp7F6ATXiPc5fJRIzSj0Wwrm9SRYaioG/XP/RQnvQG9Ke gmafnTN3HjV2AzOm21GSj0Ch4IUAyiKRuFUnDpLSyXkwyx9Xi9zSHoj8vOvXUk8gcSTs j5pdfEbxnRl1eUWjNy7P+U8ngv+hc84NKZFchacPAs7CXkxqMbjKGxfilmDs1L+uzLsF QOYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kbndM2cR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h15si18492733pfc.80.2022.02.01.12.03.27; Tue, 01 Feb 2022 12:03:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kbndM2cR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359634AbiAaLQ6 (ORCPT + 99 others); Mon, 31 Jan 2022 06:16:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377226AbiAaLJt (ORCPT ); Mon, 31 Jan 2022 06:09:49 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32406C0613FC; Mon, 31 Jan 2022 03:06:39 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id EDA89B82A60; Mon, 31 Jan 2022 11:06:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1AD48C340EE; Mon, 31 Jan 2022 11:06:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643627196; bh=pdE/ftul88bx3uGjcDMp1tLlzo0wwAG4y/GYzI/oO7A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kbndM2cRJI6gclSUB2ugjYg7q30V5L6VANTJp9xFSH/aSjfBSuXM0ZXmisxudaKhZ w11zTyr7jnfsBPwzmfKw4Ex0/uke1IoS2rqdAlks+GwfOY9RLhcJgV5hSVcd3MVBjk 8kig/mEtXuHURdktV5TBpN1Rb4Z9mdqkJBOBSlt4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Subbaraya Sundeep , Sunil Goutham , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 075/100] octeontx2-pf: Forward error codes to VF Date: Mon, 31 Jan 2022 11:56:36 +0100 Message-Id: <20220131105222.951181036@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220131105220.424085452@linuxfoundation.org> References: <20220131105220.424085452@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Subbaraya Sundeep [ Upstream commit a8db854be28622a2477cb21cdf7f829adbb2c42d ] PF forwards its VF messages to AF and corresponding replies from AF to VF. AF sets proper error code in the replies after processing message requests. Currently PF checks the error codes in replies and sends invalid message to VF. This way VF lacks the information of error code set by AF for its messages. This patch changes that such that PF simply forwards AF replies so that VF can handle error codes. Fixes: d424b6c02415 ("octeontx2-pf: Enable SRIOV and added VF mbox handling") Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c index 044a5b1196acb..161174be51c31 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c @@ -386,7 +386,12 @@ static int otx2_forward_vf_mbox_msgs(struct otx2_nic *pf, dst_mdev->msg_size = mbox_hdr->msg_size; dst_mdev->num_msgs = num_msgs; err = otx2_sync_mbox_msg(dst_mbox); - if (err) { + /* Error code -EIO indicate there is a communication failure + * to the AF. Rest of the error codes indicate that AF processed + * VF messages and set the error codes in response messages + * (if any) so simply forward responses to VF. + */ + if (err == -EIO) { dev_warn(pf->dev, "AF not responding to VF%d messages\n", vf); /* restore PF mbase and exit */ -- 2.34.1