Thread (11 messages) 11 messages, 2 authors, 2019-02-19

Re: [PATCH v2 3/8] net: thunderx: make CFG_DONE message to run through generic send-ack sequence

From: David Miller <davem@davemloft.net>
Date: 2019-02-18 23:33:16
Also in: linux-arm-kernel, lkml

From: Vadim Lomovtsev <redacted>
Date: Mon, 18 Feb 2019 09:52:14 +0000
quoted hunk ↗ jump to hunk
@@ -169,6 +169,20 @@ static int nicvf_check_pf_ready(struct nicvf *nic)
 	return 1;
 }
 
+static int nicvf_send_cfg_done(struct nicvf *nic)
+{
+	union nic_mbx mbx = {};
+
+	mbx.msg.msg = NIC_MBOX_MSG_CFG_DONE;
+	if (nicvf_send_msg_to_pf(nic, &mbx)) {
+		netdev_err(nic->netdev,
+			   "PF didn't respond to CFG DONE msg\n");
+		return 0;
+	}
+
+	return 1;
+}
 ...
quoted hunk ↗ jump to hunk
@@ -1515,8 +1528,7 @@ int nicvf_open(struct net_device *netdev)
 		nicvf_enable_intr(nic, NICVF_INTR_RBDR, qidx);
 
 	/* Send VF config done msg to PF */
-	mbx.msg.msg = NIC_MBOX_MSG_CFG_DONE;
-	nicvf_write_to_mbx(nic, &mbx);
+	nicvf_send_cfg_done(nic);
If the one and only call site doesn't even bother to check the return
value, just make it return void.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help