Skip to content

Commit a8db854

Browse files
Subbaraya Sundeepdavem330
authored andcommitted
octeontx2-pf: Forward error codes to VF
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: d424b6c ("octeontx2-pf: Enable SRIOV and added VF mbox handling") Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent df66b6e commit a8db854

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

  • drivers/net/ethernet/marvell/octeontx2/nic

‎drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,12 @@ static int otx2_forward_vf_mbox_msgs(struct otx2_nic *pf,
394394
dst_mdev->msg_size = mbox_hdr->msg_size;
395395
dst_mdev->num_msgs = num_msgs;
396396
err = otx2_sync_mbox_msg(dst_mbox);
397-
if (err) {
397+
/* Error code -EIO indicate there is a communication failure
398+
* to the AF. Rest of the error codes indicate that AF processed
399+
* VF messages and set the error codes in response messages
400+
* (if any) so simply forward responses to VF.
401+
*/
402+
if (err == -EIO) {
398403
dev_warn(pf->dev,
399404
"AF not responding to VF%d messages\n", vf);
400405
/* restore PF mbase and exit */

0 commit comments

Comments
 (0)