Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp870823pxb; Tue, 1 Feb 2022 12:08:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJwo75Fa11raZHhquM5hflPjeDH0TQN6NfEcMIJgKxtingasr3xG2RKtB1yei0rsp9Jzh0HV X-Received: by 2002:a17:90b:1e05:: with SMTP id pg5mr4253608pjb.86.1643746088264; Tue, 01 Feb 2022 12:08:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643746088; cv=none; d=google.com; s=arc-20160816; b=uFtFT7RtXw3+W97oVwQ2YkA8lRbtyD3i5ngdyOiW201rjVl3lDFem0RS/mI2WqrzKE Dq0Qxt3MoFdoXdX7bzE5NTictMmbRSr5O+u9STAgFzYMDAzcXFg4In9qpohstQu9eVSA qGIeHnBw243u5WAmmRQhE/tq0raVGeQBnSiR6uFfp/6+bvEFizgIhEXP4umkrM6ofrlI uYXufo8kZrrxh8LSbX88qdJ2LButKpHPJk9uykMSCBGK+MniF1FX+2BorViY4+XrlZSa BkdXiuaP7tANClZFWGKYSm00hLBbkub0pFP4Mqq6rM5g33E5U/Z9CX9rJG0b8SlHIj86 yQag== 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=3989MG5OFDy01/2PvJuDYwopagVWEMlbyZlME6TovtY=; b=V7fvT3O7bKyNi8JnAwS0leb1nlr0tiSpuIEWu68FbO0c5wG3hjt7IE38WfDJO8N2H/ bIDeOganbxg1B2F6Fece8ZmtdfWWSg0Gsv5xZevSFyedejP1KBIBe9WGZtun5d73hHkv NDDc7WtJcmXRJSTYfgELFE5rZntWPSCGw1+YGyYfWGpTDP3TmpKjFXpMn/FFf92puaQh Jqj2FcJjY2IGyH3ryUkWV9gqMi1zwcSNQgdu8mLeQW5TSO9Z8TTN5no2yf//XSBfAB1s YI70GzVt4toonCTJCquDRhgNCyGo09enGj7If+ScPVPM5GywvyjNBHP64Un4XKS+qJj2 z2uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=H3Q7PM5o; 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 b1si2956429pje.2.2022.02.01.12.07.56; Tue, 01 Feb 2022 12:08:08 -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=H3Q7PM5o; 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 S1379195AbiAaL35 (ORCPT + 99 others); Mon, 31 Jan 2022 06:29:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378564AbiAaLUV (ORCPT ); Mon, 31 Jan 2022 06:20:21 -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 53E97C061401; Mon, 31 Jan 2022 03:12:57 -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 0F779B82A60; Mon, 31 Jan 2022 11:12:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 23A00C340EF; Mon, 31 Jan 2022 11:12:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643627574; bh=sYWhTE2WPmqrRkWAOOA4xl4ixQavnpiet0lmQ/VYkgQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H3Q7PM5oP0eIpNn62f3yg71o+5BPSLC5OzLcite8sECa3v5xJR+ri6kZtJq4KCkyf kWhgAo99xf8B4QJ2pgFVS3ZjvcMP3JTHaoSuiIX0m4weVzaCqQ1Rq8wGsd7dpId0n8 4CZSPNnzoDIO0L3S+X4om4o/UhEsHxfLKFZkqWek= 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.15 127/171] octeontx2-pf: Forward error codes to VF Date: Mon, 31 Jan 2022 11:56:32 +0100 Message-Id: <20220131105234.315936007@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220131105229.959216821@linuxfoundation.org> References: <20220131105229.959216821@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 53a3e8de1a51e..b1894d4045b8d 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