Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp156144lqh; Wed, 27 Mar 2024 19:07:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUw33l3FgmSSpoY3t3z6Ihu1+7rqfbHTiksUYRSVqtsfosE92/i4R6NZJuPQUWXjVrCh1kHRcdXWrJ7UmaTsgOdGIhwmxzA+GbV+E7D8Q== X-Google-Smtp-Source: AGHT+IGrpdHVa+3emMB9SZDe1GJN3YAZgg/fLvVprFaofcQTwCfT/lh84y6x+T9j1556L2xGIQ2Y X-Received: by 2002:a05:6a00:1483:b0:6ea:c42a:d705 with SMTP id v3-20020a056a00148300b006eac42ad705mr1497666pfu.10.1711591655021; Wed, 27 Mar 2024 19:07:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711591655; cv=pass; d=google.com; s=arc-20160816; b=p6W2Ld86+fgKEWPJOVIOZSEkhMDlR7eBNHhmo7P0rAavfxIH1Zy/gKMydE7+iwcZt8 0KTVH02CI3F2j4VhJmcw85YmL7qbfKUEDReWX6xUmnw4CI8ZEnszwuvGKINhBGbm7WwP 67Z7WTJ3PGILyS1H7ORMsLYzL7jr5xhrDSa9RxBqFx6OiK1yb/5ZSqRswa3I7gT62fmF cjo4BkBLUSPLprEi95NATmrbGpt9i9IZcrG/YBG+eSE8CQZwYF7+mSGZbnVAVvurHQLE PPus93dcwAwLTBhM4dKcj++cYZvLcS//z/yusr/fTuu0588u25jIzd8abmBGoZxvxH5J WTVw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=GhxMOvrbOBAez8OYbXm3/LOeprD8f425zFKrPdSdU3s=; fh=EeGZI8jBzJvBRERiRe68S8Gv8bZ1ONQmnFmX8OdPY08=; b=B5/bGRqyDMd0ChrOAmqb3Wme5+sylEwTUFDwWie93mfnLIybyyLCE6vFiM5tuc7Eou MMflk+Sw3KnFoC0ft4v3ideHxgvBpJBJqHu2AOqj/kkmO9i3vlsIe4Wt8kivOUJmcitR UvllDg536s8CErXjHcPjJhMFmWSUXoIjuPbIzk8HM8aTDmbQNqcuASA7TSBu28pjT2l/ tpNwOWfEUq9Kplfk0FrOww1i4pVZS/9/h/JAqK74SaIdgzQrtxHvF+4qyCJn1MtXXU80 I4T88Qiji13Y7XoobQOimynmPDpEhKeYlHHY+eKksCgvpXLPLuL5vszVVuLxIJnbo2kV alug==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=nfschina.com); spf=pass (google.com: domain of linux-kernel+bounces-122318-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-122318-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id x13-20020aa784cd000000b006e72e3bbe3dsi437260pfn.102.2024.03.27.19.07.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 19:07:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-122318-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=nfschina.com); spf=pass (google.com: domain of linux-kernel+bounces-122318-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-122318-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1C8842A22DE for ; Thu, 28 Mar 2024 02:07:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2E11F28DAE; Thu, 28 Mar 2024 02:07:27 +0000 (UTC) Received: from mail.nfschina.com (unknown [42.101.60.195]) by smtp.subspace.kernel.org (Postfix) with SMTP id CBF8524B34; Thu, 28 Mar 2024 02:07:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=42.101.60.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711591646; cv=none; b=OltYwOaSZWjoIp+lfyVGP2IVE3W/icqz4QFIkSCVVJMuK16Y/mW0Q6xyaBvGtWSlgPXlcvieS9fJUMiz5JcanwvGgjkYWsbDTer4rDs7Onhch0p0xNGeU+Ykv9PNZ2zJnnzMD4zdxi8StNJ/uyNKNw/40iPIkiQErIPv4vf/j0A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711591646; c=relaxed/simple; bh=yTwuu2u8c8H/maO1abDOAOXZoUPJjJZpGVG8tk6jnHo=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=tOYAkBpwwBFhPhqmxr3D/ts8Dr1xfOwhEqxmAeab6oO/s4nHNIsemXqP0z1pPT2sSTrZK6DUC/sFuvjLXPIEPdDcx9/IYCdDIIjNS6biusFOgECF8LfQOfgk41X/KLV0BkCQTX1WAhJszspU1r6oYNa0w1zD47q7YrJigT2NmCs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com; spf=pass smtp.mailfrom=nfschina.com; arc=none smtp.client-ip=42.101.60.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nfschina.com Received: from localhost.localdomain (unknown [180.167.10.98]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPSA id 56BBE609FFAEA; Thu, 28 Mar 2024 10:07:12 +0800 (CST) X-MD-Sfrom: suhui@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Su Hui To: sgoutham@marvell.com, gakula@marvell.com, sbhatta@marvell.com, hkelam@marvell.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: Su Hui , dan.carpenter@linaro.org, saikrishnag@marvell.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Simon Horman , Kalesh AP Subject: [PATCH net v3] octeontx2-pf: check negative error code in otx2_open() Date: Thu, 28 Mar 2024 10:06:21 +0800 Message-Id: <20240328020620.4054692-1-suhui@nfschina.com> X-Mailer: git-send-email 2.30.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit otx2_rxtx_enable() return negative error code such as -EIO, check -EIO rather than EIO to fix this problem. Fixes: c926252205c4 ("octeontx2-pf: Disable packet I/O for graceful exit") Signed-off-by: Su Hui Reviewed-by: Subbaraya Sundeep Reviewed-by: Simon Horman Reviewed-by: Kalesh AP --- v3: - split the v2 patchset into individual patches v2: - add "net" in subject drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c index b40bd0e46751..3f46d5e0fb2e 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c @@ -1933,7 +1933,7 @@ int otx2_open(struct net_device *netdev) * mcam entries are enabled to receive the packets. Hence disable the * packet I/O. */ - if (err == EIO) + if (err == -EIO) goto err_disable_rxtx; else if (err) goto err_tx_stop_queues; -- 2.30.2