Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp3119933pxm; Mon, 28 Feb 2022 12:26:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJxoHy5R/YZ6jtI//LkA5HY1eSbEr4Axo1E259LH2NzO/z388+HRVCY5xfMULFbPTpEmKqRs X-Received: by 2002:a05:6a00:3018:b0:4e1:de9a:a5a3 with SMTP id ay24-20020a056a00301800b004e1de9aa5a3mr23604138pfb.80.1646080003977; Mon, 28 Feb 2022 12:26:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646080003; cv=none; d=google.com; s=arc-20160816; b=yPNx0kOW2nR4qKXtVEwxeu4+Tzr9/ZmYdtuUJfbuuubwzhiq2Oh10zJuRZReO/N2Nc MKpHu1xdqGZ+S4Bnw+pkY1ima1pz6EpdgzkMqQpy17wO7A3L49x2W2Aynsd9MbYwtrzH 9VbdDDslHMz4eZ2ABJTEr1n4EXT9JGwNT6MWF0FMLWkKtI05P4Sya07bRvjZ4Qk39L5u E4gCDi9A2qtjHdLbCVuWTAIWqy7dZlc1x4cOjNUuWkDp/51g1JznG0uLb/PjMbh+v2MY Y7t5+eynWlIcOgf1uu3sOdwxZJPFSX4ecNV5r/apOYyT6GyE1uH76eMt+5yKOFr0CrMo 18qg== 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=HK0ALWFwLpww5la5rn9uDqLl/qjAmT7xCNaaz5zGIJw=; b=kXlM662ikkEfQ2pMIuEZq+S5OW7zyIlrMzBAl4PLduymfz6tWL2+3YG1CfXDkmaC9U NHtC2D44CnM0qNtD5FN1x6JIERkbx39VMwhIbAoHjRMa3tcJXoXCz3laSCMjyLXtfwbv XRPFgIRAEuw01OcBKNAW/pv53t6js8jaO0o7zz04F2LQ3tnVkvDAZH4l5UN9V3Nwp4tQ bm+j6s+OVGLaxT1TTe8zhCMUCRNG7p14sGV90od/cHM3uV1zv7muUklj1gNlK/BvC8Dd ouTPNXx1d9k1NYt7u7vI25zCBldjNKu+7INmNivqh858mAZ1Kw7bcFh5z6bMDI94/gOs z5Wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ysxo7U4F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id i18-20020a170902c95200b0014af1b7c58esi11216525pla.163.2022.02.28.12.26.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Feb 2022 12:26:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ysxo7U4F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DF9241EE9C2; Mon, 28 Feb 2022 11:44:37 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237420AbiB1RzW (ORCPT + 99 others); Mon, 28 Feb 2022 12:55:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239156AbiB1RwB (ORCPT ); Mon, 28 Feb 2022 12:52:01 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F99291341; Mon, 28 Feb 2022 09:39:33 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id B0CD1B815BB; Mon, 28 Feb 2022 17:39:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1193EC340F0; Mon, 28 Feb 2022 17:39:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1646069970; bh=CddVVUFIMUYm1CX/7EsfuhiY7pLEr+i9IuKyrRICjow=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ysxo7U4FQCGGD0Pt29KwH8CikcfINepXVdsoY1HXCLvfLYmpU2EksXLLhmU29nRri gEiVOdPQLLQ+30mTfcQBIj9yopSwp/uLF+YfEgYfzTNF+M88ZAbzgCg0WUZv8axagu phdwlvYhOTGoyyOMlyqfFg/e56Rj5qdZYkq3s/eg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Cris Forno , Sukadev Bhattiprolu , Dany Madden , Jakub Kicinski Subject: [PATCH 5.15 077/139] ibmvnic: schedule failover only if vioctl fails Date: Mon, 28 Feb 2022 18:24:11 +0100 Message-Id: <20220228172355.825625607@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220228172347.614588246@linuxfoundation.org> References: <20220228172347.614588246@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=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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: Sukadev Bhattiprolu commit 277f2bb14361790a70e4b3c649e794b75a91a597 upstream. If client is unable to initiate a failover reset via H_VIOCTL hcall, then it should schedule a failover reset as a last resort. Otherwise, there is no need to do a last resort. Fixes: 334c42414729 ("ibmvnic: improve failover sysfs entry") Reported-by: Cris Forno Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Dany Madden Link: https://lore.kernel.org/r/20220221210545.115283-1-drt@linux.ibm.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/ibm/ibmvnic.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -5733,10 +5733,14 @@ static ssize_t failover_store(struct dev be64_to_cpu(session_token)); rc = plpar_hcall_norets(H_VIOCTL, adapter->vdev->unit_address, H_SESSION_ERR_DETECTED, session_token, 0, 0); - if (rc) + if (rc) { netdev_err(netdev, "H_VIOCTL initiated failover failed, rc %ld\n", rc); + goto last_resort; + } + + return count; last_resort: netdev_dbg(netdev, "Trying to send CRQ_CMD, the last resort\n");