From patchwork Mon Apr 1 03:57:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavan Chebbi X-Patchwork-Id: 13612507 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 105A31362 for ; Mon, 1 Apr 2024 03:54:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711943660; cv=none; b=VYZ7chmiAn0ntedUztS//fLdgfY8PjcDXeCsHerqMwG48SWgIZAvcyL/W45xjV4HWTkD7BFDpvDmqDkHpm2mMHV5awmQMM/saY9ytnQe8vJW53387stg84Q/HXcUm0yhN0YRr0tO225uM1+Kdx9wwmY184YtmIwA1wnWSxaYjDI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711943660; c=relaxed/simple; bh=Qe28pRCJxJls1ow+k4RxJQYhPV2gxMaS3RZ6ERpz9bo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=mzOkP382rn7FONWdZ8n41Wb6OTWJRHJvYzPxmSyLojFOi1ikOvEmHRn8xiMfmt750pdLLAcUKhcCLOeoC/oyywptJPNY0fslIG+B6I2eV5Ea/0yaQWeNSLWzq2bBFMVCCEcHB6Bjdn7qwFhBMRQfDshkKxcqe0XWzsCDlKTMwT0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=YiSteSqE; arc=none smtp.client-ip=209.85.210.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="YiSteSqE" Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-6e6b729669bso3165359b3a.3 for ; Sun, 31 Mar 2024 20:54:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1711943658; x=1712548458; darn=vger.kernel.org; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=za7bKxM04aZAgzTrJxaAjWvgHPwQZblO+XhJYZ/nQdc=; b=YiSteSqEqdLvoIHzpFmS58HAZgoUCdi6/9/xh3K2W1a/28merwCPGW4HEQMdpgIa5x t2Iu/39Qojtg6cNLKd3NKHYshbe6PZ3K6gEcQbRNxxqMadwmpbI+ft5yWb2d6Iw2zBJS eOKZLDaCoidEnc+v6fooBZ3BdDVDDDGPnEv5c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711943658; x=1712548458; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=za7bKxM04aZAgzTrJxaAjWvgHPwQZblO+XhJYZ/nQdc=; b=uWaJoT76sW4hMw2iyiewZ2Dry86IISnVYNnYOZEfH3g6QvX7XU57UUakVRH1oGwcg1 i3KGO2iuYZQxKNlY7mB+cfhoK4f+6nitZh3pXqMUl7jS4VK8tcxh7vv2l0abQaPlcRXA imwCeKeevtSh+NUk3gshfjnNz4JgFkJzNJYUlp6f0XYzoFY7gZEcpTJN7qEdcMQ2YlEa XuTJRmhMQgm/QNjhJ7EqczE4WPAXQACSnZgwVcaYJHI4W7fNK+kcy4NvA/sKTywwroPr UDY+KvpAjoc+7zi/w9YZF7+/KLV1VYLbtu6ySjrQG8RXxRHm/WVwUcm9+nW7G1E1DP7C 2q6w== X-Forwarded-Encrypted: i=1; AJvYcCXaBj8M234HPitlc/g/bSbOBnu0+BDesTqz/xu4CQWd2ZtIbdQBvzwrCpO006HApG7PkSU/oiFK62mov0oRo449+7toT/A8 X-Gm-Message-State: AOJu0YxW2bRgARV9uZVptjM36P6iGL6TMOJTFdRjWMMgVZGxd0AFaTZH G3yrOWJc12N1OwsYxO24t5Zmk9HzrQ9TfydWMs+7aKX7PRNS7A8HWrizxTfVTw== X-Google-Smtp-Source: AGHT+IGww6pSunneW72swmQS3zlzcYw+nQGdUM1BsWYStJCg38YP2A5zaUP0ymu9+RJn4HSsbWByYg== X-Received: by 2002:a05:6a00:a23:b0:6ea:f351:1df9 with SMTP id p35-20020a056a000a2300b006eaf3511df9mr8899073pfh.23.1711943658044; Sun, 31 Mar 2024 20:54:18 -0700 (PDT) Received: from PC-MID-R740.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id j26-20020a62b61a000000b006e73d1c0c0esm6860781pff.154.2024.03.31.20.54.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Mar 2024 20:54:17 -0700 (PDT) From: Pavan Chebbi To: michael.chan@broadcom.com Cc: davem@davemloft.net, edumazet@google.com, gospo@broadcom.com, kuba@kernel.org, netdev@vger.kernel.org, pabeni@redhat.com, Vikas Gupta , Somnath Kotur , Pavan Chebbi Subject: [PATCH net-next 1/7] bnxt_en: Add delay to handle Downstream Port Containment (DPC) AER Date: Sun, 31 Mar 2024 20:57:24 -0700 Message-Id: <20240401035730.306790-2-pavan.chebbi@broadcom.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240401035730.306790-1-pavan.chebbi@broadcom.com> References: <20240401035730.306790-1-pavan.chebbi@broadcom.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org From: Vikas Gupta In case of DPC, after issuing the hot reset, the kernel waits for 100ms for the device to complete the reset. However on some older chips, the firmware may take up to 1 second to complete the reset, only after which the driver can restart the card. Introduce delay of 900ms to handle this scenario on the older chipsets. Signed-off-by: Vikas Gupta Reviewed-by: Michael Chan Reviewed-by: Somnath Kotur Signed-off-by: Pavan Chebbi --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index b4db4b1aaffb..6e24a341ad28 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -15550,6 +15550,10 @@ static pci_ers_result_t bnxt_io_slot_reset(struct pci_dev *pdev) netdev_info(bp->dev, "PCI Slot Reset\n"); + if (!(bp->flags & BNXT_FLAG_CHIP_P5_PLUS) && + test_bit(BNXT_STATE_PCI_CHANNEL_IO_FROZEN, &bp->state)) + msleep(900); + rtnl_lock(); if (pci_enable_device(pdev)) {