Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1667897lqt; Wed, 20 Mar 2024 10:21:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVPLpcl2iwKzzrooQhdXYxbrUedbeIV7oLon7uaaCWSFA/R02kPoWg6QycKSGyeHO3cZ8//iDoVPzK0R5rCibuSLre6qgRMZXbXhBeQ4A== X-Google-Smtp-Source: AGHT+IGml0M7HghVIRhmBNDOXZcrc+vjeIjw/HKBThM3H+dI9u+a/eM6OZvT4etrmGwBgv8oOEj0 X-Received: by 2002:a05:6a00:3c8b:b0:6e7:94a8:a252 with SMTP id lm11-20020a056a003c8b00b006e794a8a252mr2651920pfb.8.1710955259746; Wed, 20 Mar 2024 10:20:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710955259; cv=pass; d=google.com; s=arc-20160816; b=XuksVh0iGdtRvZXkFjkKoN0R5Ta81OKqC5ppaRAto46QfXo5V4TUmGk2DPod4YpQei VzzqhRxCZf5ygOcOjlBwJ0yU6Uopo5sj3eRWWNJkxXPC9EfL9BYRmki76OW1LXXBlTl2 QZ9xzttLv4bRHDnvWaOv0Xui1Vq8H5UJBkAM5Vvs7M8gW+ZkN0IyiqhPlU1ZWrJy8Vz8 waqit7f+IfNIBXn/O55YlF3K4oKrkYkl8sYjok1shRcgNXK7CgRBsn73ckRkxL7ErBoW JaBFNAhhxlPuqOBIAF0yJCg018DGgwiL8OZPTUjoJ1RdC/AEP9Ekum8v9+D2QX17R/gh P84w== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=GuDypbNjlvBbfQVbDBTBAICh1XOtnfNIJ5il1Xye/So=; fh=zlFnTBmEjcKjHkYJJqT31OjWQ01UVDFyonLbUfDhG7M=; b=Wv8EyaPK+pst5KdAhpbpwpJVN31XBBGRerZ1S2m5oVfQAV8LyK4TTAfK+SZA+m8uz8 MJwENpF+gOOM7/09921X4wYxPxWiGpgbMNC5+TuHN7CQ3NMLbcjpJYv0i94puB/Sa5Lb nw8tWW353tcLxL0+XAX2TofHE5nfVb0OHdxZi8d79vekgR7GdqELOdjRrM9+rE4IPipm L/9fTh2AJPhdSsK5uklamc6O9145oM9/Fso5gsHk/+ZS3JCTQCNBtfgDKI5CbRfdaIQm xl4zMpPkjjgjPpmn98lVAa8VWht/Fr4ahizCBuTikSZntPy1TlO5ssr971IkOZhy4wVY lJ3A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=eu0CNpb6; arc=pass (i=1 dkim=pass dkdomain=marvell.com dmarc=pass fromdomain=marvell.com); spf=pass (google.com: domain of linux-kernel+bounces-109224-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109224-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id r2-20020aa78442000000b006e698c1508dsi13199037pfn.71.2024.03.20.10.20.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 10:20:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-109224-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; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=eu0CNpb6; arc=pass (i=1 dkim=pass dkdomain=marvell.com dmarc=pass fromdomain=marvell.com); spf=pass (google.com: domain of linux-kernel+bounces-109224-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109224-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com 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 6ABF0281D91 for ; Wed, 20 Mar 2024 17:20:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8D2F76A353; Wed, 20 Mar 2024 17:20:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="eu0CNpb6" Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4F8276A014; Wed, 20 Mar 2024 17:20:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.156.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710955244; cv=none; b=Fs93PM3+VI4h3mx4o0ULlrDo6brBUptLO1yRjNydhbaen7a91HBZtI9VIWnfeKn0gmMH4PgnCySD65axL5m8wHIQ8yl96PvIZ4g/49SAXzx568Usf0p4+sdVqjVQA+BLXPI+6AwbwKYuQB0wY4eoVQTf0umLts7QYgO660ZbK/Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710955244; c=relaxed/simple; bh=/606eP2z2/2P76YRuiGFsmoave4pKqy70yn+c+cgOqs=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Cu8Pux4HOQjMqylH16uYMdGHnuD18UtctQLdYzxPgRmaWKkF2+lyUsMd6lQ68/XqHlJ6NSSFDZS92WBzums21G8I056lY5bW9hYuad/oZ8WaygfmIt9Ov/7IQfICT55Zamen8Ia9V7SoxfHT3XX80v/gnMFwj5TqVJ1NVfi+AKU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=marvell.com; spf=none smtp.helo=mx0b-0016f401.pphosted.com; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b=eu0CNpb6; arc=none smtp.client-ip=67.231.156.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=marvell.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.helo=mx0b-0016f401.pphosted.com Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 42KFAhqJ003418; Wed, 20 Mar 2024 10:20:23 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s= pfpt0220; bh=GuDypbNjlvBbfQVbDBTBAICh1XOtnfNIJ5il1Xye/So=; b=eu0 CNpb6iqhG/TDxX+fCy31mCWNYtGeXdfugbGAzF79IbC0TjSW6zt409cSoegEOBD7 scNsurnbA/MX847CosPw//+50v1zAjIhL+zHEBky38l+RgsSKXcek8O5jyDPbM5H b5MYf0ldDHcqPIHayWdrVYzC4wWMV6Iiauk4aEu0ntTE2mRK9phqwBTaI4oS7+y+ dEhWLo6GGnQTkZxc4mJtTuT8oy90ftDOYMkWCxoHwYk+V3UoY2hrGRA6JnXOW2fv W+EpHNf4L2UKB+CjliHEvUjwy/CYcGXWNgpdrdXSvAJqr16aL55zr9VVpNe19IbN hYgoX5iUw6ZD43LPI/A== Received: from dc6wp-exch02.marvell.com ([4.21.29.225]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3wxka52e38-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Mar 2024 10:20:23 -0700 (PDT) Received: from DC6WP-EXCH02.marvell.com (10.76.176.209) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.32; Wed, 20 Mar 2024 10:20:22 -0700 Received: from maili.marvell.com (10.69.176.80) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server id 15.2.1258.32 via Frontend Transport; Wed, 20 Mar 2024 10:20:22 -0700 Received: from dc3lp-swdev041.marvell.com (dc3lp-swdev041.marvell.com [10.6.60.191]) by maili.marvell.com (Postfix) with ESMTP id E007A3F7051; Wed, 20 Mar 2024 10:20:18 -0700 (PDT) From: Elad Nachman To: , , , , , , , , , , , , CC: Subject: [PATCH v2 2/5] net: marvell: prestera: enlarge fw restart time Date: Wed, 20 Mar 2024 19:20:05 +0200 Message-ID: <20240320172008.2989693-3-enachman@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240320172008.2989693-1-enachman@marvell.com> References: <20240320172008.2989693-1-enachman@marvell.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Proofpoint-GUID: mrIRt4thHQ8kevDmX95toSMu1m7rpiO4 X-Proofpoint-ORIG-GUID: mrIRt4thHQ8kevDmX95toSMu1m7rpiO4 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-20_10,2024-03-18_03,2023-05-22_02 From: Elad Nachman Increase firmware restart timeout, as current timeout value of 5 seconds was too small, in actual life it can take up to 30 seconds for firmware to shutdown and for the firmware loader to shift to the ready to receive firmware code state. Reported-by: Köry Maincent Closes: https://lore.kernel.org/netdev/20240208101005.29e8c7f3@kmaincent-XPS-13-7390/T/ Fixes: 4c2703dfd7fa ("net: marvell: prestera: Add PCI interface support") Tested-by: Kory Maincent Signed-off-by: Elad Nachman --- drivers/net/ethernet/marvell/prestera/prestera_pci.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/marvell/prestera/prestera_pci.c b/drivers/net/ethernet/marvell/prestera/prestera_pci.c index 35857dc19542..2caa33d195ab 100644 --- a/drivers/net/ethernet/marvell/prestera/prestera_pci.c +++ b/drivers/net/ethernet/marvell/prestera/prestera_pci.c @@ -24,6 +24,11 @@ #define PRESTERA_FW_ARM64_PATH_FMT "mrvl/prestera/mvsw_prestera_fw_arm64-v%u.%u.img" #define PRESTERA_FW_HDR_MAGIC 0x351D9D06 +/* Timeout waiting for firmware CPU to reboot and restart + * the firmware loading software layer, hence becoming + * ready for the next firmware downloading phase: + */ +#define PRESTERA_FW_READY_TIMEOUT_MS 30000 #define PRESTERA_FW_DL_TIMEOUT_MS 50000 #define PRESTERA_FW_BLK_SZ 1024 @@ -765,7 +770,7 @@ static int prestera_fw_load(struct prestera_fw *fw) err = prestera_ldr_wait_reg32(fw, PRESTERA_LDR_READY_REG, PRESTERA_LDR_READY_MAGIC, - 5 * MSEC_PER_SEC); + PRESTERA_FW_READY_TIMEOUT_MS); if (err) { dev_err(fw->dev.dev, "waiting for FW loader is timed out"); return err; -- 2.25.1