Thread (51 messages) flat view 51 messages, 5 authors, 2022-09-22

Re: [PATCH rfc v0 4/9] net: dsa: qca8k: dsa_inband_request: More normal return values

From: Vladimir Oltean <vladimir.oltean@nxp.com>
Date: 2022-09-19 23:16:25

On Tue, Sep 20, 2022 at 12:18:48AM +0200, Andrew Lunn wrote:
quoted hunk ↗ jump to hunk
wait_for_completion_timeout() has unusual return values.  It can
@@ -591,8 +588,8 @@ qca8k_phy_eth_command(struct qca8k_priv *priv, bool read, int phy,
 	qca8k_mdio_header_fill_seq_num(clear_skb, mgmt_eth_data->seq);
 	mgmt_eth_data->ack = false;
 
-	dsa_inband_wait_for_completion(&mgmt_eth_data->inband,
-				       QCA8K_ETHERNET_TIMEOUT);
+	ret = dsa_inband_request(&mgmt_eth_data->inband, clear_skb,
+				 QCA8K_ETHERNET_TIMEOUT);
Ansuel commented in Message-ID 12edaefc-89a2-f231-156e-5dbe198ae6f6@gmail.com
that not checking the error code here was deliberate, and that when Mattias
did check the error code, things broke.
 
 	mutex_unlock(&mgmt_eth_data->mutex);
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help