From nobody Sun Apr 30 06:58:17 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HHG6YPPz48sSD; Sun, 30 Apr 2023 06:58:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8HHG16sqz3Nyd; Sun, 30 Apr 2023 06:58:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N4OgmsG0GUacdTUTM+mS2qO6odQKaQA59WnaXtEF5yk=; b=r29vOzlL0M3tAyZKXf7Zq7vsqidFa+SIq01OsA1F+2LxJL32LWLfM7YEe/Wxn45x8pdHJo BWxTACD/hH0PauIcHHLHuAzmaPQh7huiPCn5kXh9tp/Sk/75uLqW/BsHtkX41hLYf9pOEL XVLOezvM28yQFnw67cnxoXfUPTk8eCJc96FRukSR6wMT1cUz7gvav+bej+fkzwT7C9rtSc k3tpL3YtXg6Vvr6ILz9YwPMJ5U+dkYgP/IQSgEHL11lwj54ez1cnkNALAerotYBlLvZSv1 T7qdbO6dexAEUte+Pg4XF7r3Ip02xMudon4AUZvDS/L5lH75AEl3SGQTlSWhfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N4OgmsG0GUacdTUTM+mS2qO6odQKaQA59WnaXtEF5yk=; b=kg7YhDQuZyEWIsyU0KcpysehOFh3wZ2MIrrNIKnN30nYdSdpTgpqPJbd4AeC1nLubBzjbz 33brSLGcHuLbRy/CZ1NivVhFAEiSdqqVwum5dfed1dqzsEgqq0KAva94cnz6tezgrUL8z4 YyF5fmYQp+ar/hBDCUXcs0rLtuHHQCSB9viLpQl2MGshwADioWRmmLd/6DB2GmAVehe98W RAGzESHgNzBjCo7FcjrncXHDweLnQhxgtN+Beq+aRiPm+iKdIGuXzvPa9Q7a1UcpC5FQzl 9uUyrUFtst0UUatr8WlU4tNlPyrLm6cug1y78KQrq5jtcSg29fwMOeCU61tUpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837898; a=rsa-sha256; cv=none; b=Eg5eVn7aAGPouPMz/NBuBos7v2JoXxxhxIcTUhhhgFY34tmlGeYCMKTQP3t1Uh+eW9E7Tg PQEM6OqA4KudOkbpQ6upLfZsJIRLoBpjNNKcEIg7Lnnh24TXEI/HQKsI/WW+gzrF43rD4W QKdD5/jPt9QrpK6Gy4bNYIWXey8hN0YIcXusFJlptpnqi2s+sgvzEbcsuELjfiHl2dSDvK y2NM2x9hsGdBCS4l1emshCbf91LRYh33U8+U1FvyS69aLTJh6zAe7ESJjpAS/wjGe9LoyP 4uaY4hM1Rz/wU2rhQ10bCdYIpMq1Y8cSxvE0tXss8y47+QAP+rxGQ/79RWFejg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HHG0CFCzDhX; Sun, 30 Apr 2023 06:58:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6wHdj072004; Sun, 30 Apr 2023 06:58:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6wHTt072003; Sun, 30 Apr 2023 06:58:17 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:58:17 GMT Message-Id: <202304300658.33U6wHTt072003@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 699eed180783 - stable/13 - mlx5: Don't give zero number of pages to the firmware. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 699eed1807838c743f8ce804b23c61e4ca51f3e8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=699eed1807838c743f8ce804b23c61e4ca51f3e8 commit 699eed1807838c743f8ce804b23c61e4ca51f3e8 Author: Hans Petter Selasky AuthorDate: 2023-04-18 11:22:41 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:19 +0000 mlx5: Don't give zero number of pages to the firmware. Can happen when using virtual mlx5_core functions, VFs. Sponsored by: NVIDIA Networking (cherry picked from commit 95bf70a4bf7982091bb59200bc2db2cb5cd840d7) --- sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c b/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c index d298da67057a..730c7ee8bee9 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c @@ -509,7 +509,10 @@ int mlx5_satisfy_startup_pages(struct mlx5_core_dev *dev, int boot) mlx5_core_dbg(dev, "requested %d %s pages for func_id 0x%x\n", npages, boot ? "boot" : "init", func_id); - return give_pages(dev, func_id, npages, 0); + if (npages > 0) + return give_pages(dev, func_id, npages, 0); + else + return 0; } enum {