Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5210001imu; Tue, 25 Dec 2018 21:14:57 -0800 (PST) X-Google-Smtp-Source: ALg8bN43RkW8Qk+iEg2SRGUpC8FqxvGSOUTHXCuaJkd/BFvP6Rkiyxz65NrPZU3TWZzDkYNbLKgF X-Received: by 2002:a17:902:bc3:: with SMTP id 61mr18588450plr.15.1545801297786; Tue, 25 Dec 2018 21:14:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545801297; cv=none; d=google.com; s=arc-20160816; b=pT9F9GCuMrOUjtsU2aFSSNC0jegVjaJ74M57626zLyOLGqYH5kcn1U30Zq7la69Cog KTCmEeCVtEjBtIKCK57Xf//XeUu+Bqm86l4bA8s9wKzvLuABSk/3R2c93c7dmvm97nYV NAAMZ+nBK8pyXerahWwFEGB9Aa+kBsIIu6sCkCseWmwbpo0Fbp54okljtemSp8tvlm6C XWTy3Z9nyoZEpF7ADtFwhRNCpN6wHjBGA8/DFZAnhEFdF4nciLStvp+y/9M220WL2m2L VR53WXgwXCP66X/hCmmEb317DS2PsRb1y2FSyYlYCVp6bOXmC6RbSAfuIaDrsV+ckdpI nrXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=C3cocMi+x63NbAfEzCRDGhWTk24D3gnrZUiQtTnLhXA=; b=ojGKZOBt84GHEDxoAmu1tOeINocoWvWn69V+g+OkLoE/n6OvcYxD2fMGJstXT5Q+nX 421TZxXvpnd2kTn8cyuIyjCVivhEtRgUw9s8QQGN4IFKI1949FaXsjRrvwtvQjydkEMs WRwO6oV85rF45vDB3hNkLpfy95hMM/T45HBrMh+pg1D0xvWKCQFWPhT092Izkh1nyagr Q06StavFeLWUxT+7RPMdDwYTrW/anhydftVmekl/6AfjbUFQQeVqG+iSbn+tc6GCaTJ9 chG/KT7rPPccGdxQfNSPTlSAlwC3L4QakIHD2RqpKfnvqHMq5NicqInRJQX+DItuCthB xgVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@umn.edu header.s=google header.b=FD2hRMDX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=umn.edu Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j21si31981605pfn.277.2018.12.25.21.14.42; Tue, 25 Dec 2018 21:14:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@umn.edu header.s=google header.b=FD2hRMDX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=umn.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725943AbeLZFFs (ORCPT + 99 others); Wed, 26 Dec 2018 00:05:48 -0500 Received: from mta-p6.oit.umn.edu ([134.84.196.206]:38308 "EHLO mta-p6.oit.umn.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725809AbeLZFFs (ORCPT ); Wed, 26 Dec 2018 00:05:48 -0500 Received: from localhost (unknown [127.0.0.1]) by mta-p6.oit.umn.edu (Postfix) with ESMTP id 35381BC2 for ; Wed, 26 Dec 2018 05:05:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at umn.edu Received: from mta-p6.oit.umn.edu ([127.0.0.1]) by localhost (mta-p6.oit.umn.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1a1UOB9HJHu2 for ; Tue, 25 Dec 2018 23:05:47 -0600 (CST) Received: from mail-it1-f200.google.com (mail-it1-f200.google.com [209.85.166.200]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mta-p6.oit.umn.edu (Postfix) with ESMTPS id 079F6BCD for ; Tue, 25 Dec 2018 23:05:47 -0600 (CST) Received: by mail-it1-f200.google.com with SMTP id g7so18843252itg.7 for ; Tue, 25 Dec 2018 21:05:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=umn.edu; s=google; h=from:to:cc:subject:date:message-id; bh=C3cocMi+x63NbAfEzCRDGhWTk24D3gnrZUiQtTnLhXA=; b=FD2hRMDXkLugVPWz6VUrfMbGbzNX/i5shYUMLTsSrR/dwwq6R+Ok8NHn5aea1z3YaT HV3bqcvot13qTUQS7YGmnLv4s4kUi75KAe4julAqNd1VdjtS01jLvR3txbfy1cB75KjY cA9AtzqdSGF95QpbEih6Exw91HwA8+yRgOv4orW6vqrSWaerHXKv0mrzyADJODe/649O j/njIgnrIrFYI0h2Ifko+gkvoPjKMVA/hI8SzgKBm5gKdRoo/OnnrBQmH9pE1UHIgI0E Bw2XTEUzM5P7OsHRflxksiNK92AEj39wvq68gvn1Sc8ja3+QogAN5OXTuA4n3ZKWGN++ 2wpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=C3cocMi+x63NbAfEzCRDGhWTk24D3gnrZUiQtTnLhXA=; b=DHRRWPv4UutK6PdhN/DwGPp+U6PZm09+9+SzndO6+t/9+0jG5q5RGdWv+N4pNCk+Zr TOwgCCwniMHf63prqKhus5KRTJtMG32BHMf989pHKdKwIW+i49mgEFwAoyu7GBHzFHt/ r8FakC4aHQKqy2X7038NQLUyM7flMgHHzXFxegfCvSoPc+yJB4aidKBppeotwMUDwGwS tMy3e7OofSPuC+9A+keSfmn2bYlPaDfO8wbTCPrqSiBTZ8vbhm3hRFG/P2H08luSxuXM A6DlR9HiQFxqufJhMjjG66ojqURfCeCqcUqLiT2MGvT8y3/e8q3z6Vnq6u+J9XfljTa7 0+hQ== X-Gm-Message-State: AA+aEWZ3zqDnyu0bL7XVef90EB1u2tCzNeFRpul8+XqApEoYyzUJfyUu PVB6Zu+pLAATqAzhdpwwS8qqsph2NXzNP2+o4HDkMx2bHXqWk21hsQsk7QN/jQq1Jb46D056Cn7 uMli8DmvuuFPVkNAMnlwBZ1bCVFO8 X-Received: by 2002:a24:3e43:: with SMTP id s64mr12828837its.111.1545800746618; Tue, 25 Dec 2018 21:05:46 -0800 (PST) X-Received: by 2002:a24:3e43:: with SMTP id s64mr12828830its.111.1545800746318; Tue, 25 Dec 2018 21:05:46 -0800 (PST) Received: from localhost.localdomain (host-173-230-104-22.mnmigsc.mn.minneapolis.us.clients.pavlovmedia.net. [173.230.104.22]) by smtp.gmail.com with ESMTPSA id u9sm15070984iol.77.2018.12.25.21.05.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 25 Dec 2018 21:05:45 -0800 (PST) From: Kangjie Lu To: kjlu@umn.edu Cc: pakki001@umn.edu, Solarflare linux maintainers , Edward Cree , Bert Kenward , "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net: sfc: checks status of efx_mcdi_rpc Date: Tue, 25 Dec 2018 23:05:17 -0600 Message-Id: <20181226050517.74381-1-kjlu@umn.edu> X-Mailer: git-send-email 2.17.2 (Apple Git-113) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org efx_mcdi_rpc() could fail. The fix checks its status and issues an error message if it fails. Signed-off-by: Kangjie Lu --- 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)