netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: sfc: checks status of efx_mcdi_rpc
@ 2018-12-26  5:05 Kangjie Lu
  2018-12-28  0:25 ` David Miller
  2019-01-02  9:26 ` Bert Kenward
  0 siblings, 2 replies; 3+ messages in thread
From: Kangjie Lu @ 2018-12-26  5:05 UTC (permalink / raw)
  To: kjlu
  Cc: pakki001, Solarflare linux maintainers, Edward Cree, Bert Kenward,
	David S. Miller, netdev, linux-kernel

efx_mcdi_rpc() could fail. The fix checks its status and issues an error
message if it fails.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
---
 drivers/net/ethernet/sfc/mcdi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/sfc/mcdi.c b/drivers/net/ethernet/sfc/mcdi.c
index dfad93fca0a6..9486e6534dea 100644
--- a/drivers/net/ethernet/sfc/mcdi.c
+++ b/drivers/net/ethernet/sfc/mcdi.c
@@ -1819,6 +1819,9 @@ void efx_mcdi_set_id_led(struct efx_nic *efx, enum efx_led_mode mode)
 
 	rc = efx_mcdi_rpc(efx, MC_CMD_SET_ID_LED, inbuf, sizeof(inbuf),
 			  NULL, 0, NULL);
+	if (rc)
+		netif_err(efx, hw, efx->net_dev, "%s: failed rc=%d\n",
+				__func__, rc);
 }
 
 static int efx_mcdi_reset_func(struct efx_nic *efx)
-- 
2.17.2 (Apple Git-113)

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-02  9:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-26  5:05 [PATCH] net: sfc: checks status of efx_mcdi_rpc Kangjie Lu
2018-12-28  0:25 ` David Miller
2019-01-02  9:26 ` Bert Kenward

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).