Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp685719pxb; Tue, 5 Apr 2022 18:44:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwg7TsSYD2YybJyV9iTbzkqbMPXXxgq2bC2/2QlLYAN+ClDmFmAcLTgH4J5R1+o3fm+ZuNJ X-Received: by 2002:a05:6402:278f:b0:41b:79b1:39b4 with SMTP id b15-20020a056402278f00b0041b79b139b4mr6427828ede.163.1649209384138; Tue, 05 Apr 2022 18:43:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649209384; cv=none; d=google.com; s=arc-20160816; b=Vz7hyr4pt9ZOpuS1lgc1uMbelOTlrRAbcRik2NnBUKTQvZYe5V3Fjx1wdTYoEE5vPw VdpPYYTnmiKZDrwwkn5S30BmJyGlNAkoKorJL5FlMMIZXAN6pe61d81AqfL45cbnYkI6 vos+MaCM+wTU9diBjZjRusS+1Zriu1R1Idk2wwx5r50DestG7CSFLWdbiwrsR7xK0cGp ImAb/z2epdIHQQIoQgHGMC3KFd3u6h93sfkk/BqUEWpcORFiR4mxLDE0adHHJllgUOz7 jx8hpO1GS4vjHw2mdUaaJOvV0vhGT+wIiD3sHiDpT1/cJUhOVUThXpXEeKDAcnqbFd37 gXTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Dq8TAigKp24eTVmdLhWNzIxkQ0auHWvo/59EwJgHzcI=; b=F+lNXH0DZvSvjSrJfne/Ufr7cMpCtNXKX7T+1Nk1uJ+KoM2DbeOR3X0tqFznFS8++Z F1V2wJblwKtQN637h22nMS0usCqF3WcQg/XRYUJevulzVbL+nl2s6BgituR+bFsJJ6Rl RT2jTSvktTqadA8F8jiwt80/FJdclKvtvxqtPSPFniuGT1/dLR/Iyrc7+BFR91uA49uB AyecJOXiUlszFgq4krX7tE5M8Fb3ABjoIwc44rXbbK2oKhNVUQLgS6f3+Z7g3QKnWf72 NO8qFxGGRvTnslUsRv6tkJFoXj1AZr2USMZM+Bs4qk/IqdYpioSx6NI44BenNo6cZku6 E+ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VDnhiI6f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h11-20020a50e10b000000b004190214bb99si10426259edl.423.2022.04.05.18.42.37; Tue, 05 Apr 2022 18:43:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VDnhiI6f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1385062AbiDEMbF (ORCPT + 99 others); Tue, 5 Apr 2022 08:31:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343495AbiDEI44 (ORCPT ); Tue, 5 Apr 2022 04:56:56 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FDCE1CB06; Tue, 5 Apr 2022 01:52:49 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B3122609D0; Tue, 5 Apr 2022 08:52:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE77BC385A0; Tue, 5 Apr 2022 08:52:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649148768; bh=RMDCIpgqoRMmnnuBwu/bpCkTKuBa8Q1wElxe8DXBVS0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VDnhiI6fJBAdyITiKu6d/ovopCceed+TY3v+MO2Q9G8Fx0Rhzukcu3QbcYsAuwkjt qzkF+Ow/YYUNhd9X2R1+StHWPvYtt5zLbEVIOS8mElfFHMWNy3/ssb/5rnUzBfK0GE gtXMZo3IRtDTFCQbOznFXRpbfnrQ04xy0joQ5XCM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shannon Nelson , "David S. Miller" , Sasha Levin Subject: [PATCH 5.16 0426/1017] ionic: fix up printing of timeout error Date: Tue, 5 Apr 2022 09:22:19 +0200 Message-Id: <20220405070406.937720244@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Shannon Nelson [ Upstream commit 4cc787bd88be6974f3362fa49fd8c5609bd039b8 ] Make sure we print the TIMEOUT string if we had a timeout error, rather than printing the wrong status. Fixes: 8c9d956ab6fb ("ionic: allow adminq requests to override default error message") Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/pensando/ionic/ionic_main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_main.c b/drivers/net/ethernet/pensando/ionic/ionic_main.c index a548f2a01806..2e4294a4fa83 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_main.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_main.c @@ -215,9 +215,13 @@ static void ionic_adminq_flush(struct ionic_lif *lif) void ionic_adminq_netdev_err_print(struct ionic_lif *lif, u8 opcode, u8 status, int err) { + const char *stat_str; + + stat_str = (err == -ETIMEDOUT) ? "TIMEOUT" : + ionic_error_to_str(status); + netdev_err(lif->netdev, "%s (%d) failed: %s (%d)\n", - ionic_opcode_to_str(opcode), opcode, - ionic_error_to_str(status), err); + ionic_opcode_to_str(opcode), opcode, stat_str, err); } static int ionic_adminq_check_err(struct ionic_lif *lif, -- 2.34.1