From nobody Thu Jul 30 04:43:45 2026 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 4h9c6B0DHkz6mctD for ; Thu, 30 Jul 2026 04:43:46 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4h9c696bSlz3SXr for ; Thu, 30 Jul 2026 04:43:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1785386625; 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=1JTOFJH2oEn5Ftark7DQ0EH7QQrx4wNahbvw7KRdvZc=; b=aKbQWygK1/RdbLQ5pX0CVf7EemL/+M2kp1hnbmytCxMH2adaQj/3pgr0QtGgfvpuoYh08W WSGSNBtIvf21kvzErBK1fo5+xfLHkHrwJIUobfBaJw35iLmHB078cgnYRekUFhVEPSXfEj CIR6CtLPjowRdGK1+91+JbeMiJpE9jQ3XpwiL11D9MBjX1J6+LScG2dKXMf9WWfzqQBbiU anJjezQplul9oxjVG34Tv5ratAKm6n3uNEenCiZs85PRSewaEoIsu7jj7E3qmGICUX7soD vZxJE57RujuT+b8qG4N6yZPe3tJ2baTXa0Iozvrb3ttjxm01BzyYTXCwkiQzNw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1785386625; a=rsa-sha256; cv=none; b=BaNFHv0xm96yeMylfKOq2RP6X/jWnXEe9i515oIcW0YIcRO6Fq72k3CNll6XjrS72d8VSa 2P6mqiPyr57JJ/rc1SNK/X1Rf/cNtn0vn9FhSB01pvEWrjQ5mk73Lyafzbncs/SnW9Hx1n ODpzSYONSauTTalHReW4oXFNiOmpFu6V6W+cxBJ5upgAnaIeR+wee3dJTgDcbwTQl5V7LR qdatyj0cpJvGdxG2sYYdrxFGffYZ6GrFIwFx6Xabl8fwJvfrzbwuRPgbQSu0QMZja/posZ RSTg3aeotsBYnphfqQrA9z03k4JObQjz7M+XcOotaHF7fnq3bbnBNecOS/Vn4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1785386625; 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=1JTOFJH2oEn5Ftark7DQ0EH7QQrx4wNahbvw7KRdvZc=; b=ns/e3DI99v84Dg11vSoWt+VhY/v7k+Sy/Vn2cRA3gDMq4EW57z4n2NUF+cRpzmmE8cOrw/ LhaU6HKRuu6WNJ+hY82xLUwo5bWJ41q9VvcrvxzzTd8p2yXZg5j82jSLPvV9kuVmrWePwS OtBaIP+m1tW6MsdS6U+ZSrjnHwZigMM0WXU8hWCTAPX9QqFcUpGVeA2ccH2kljxwySC4hl OWoiVAA/XfxLkCYOX2qmjIL+iyZkmxIrFjC04NcFm9YfSt4OtGKwnv6OwpcCLr6hT7d/qF eW0b730xhWO9aHQnfqsq+iMcNh3eK5MrgWoT6tKiot3kh4O+NGWVfpZGOd8LEw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4h9c694tmLzy2K for ; Thu, 30 Jul 2026 04:43:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26c52 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 30 Jul 2026 04:43:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: f879d1cd7df3 - main - igb: Reprogram descriptor queues while disabled 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f879d1cd7df3c5afa69428cc2b07e1675d7776c9 Auto-Submitted: auto-generated Date: Thu, 30 Jul 2026 04:43:45 +0000 Message-Id: <6a6ad681.26c52.53c16a5c@gitrepo.freebsd.org> The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=f879d1cd7df3c5afa69428cc2b07e1675d7776c9 commit f879d1cd7df3c5afa69428cc2b07e1675d7776c9 Author: Kevin Bowling AuthorDate: 2026-07-30 04:37:08 +0000 Commit: Kevin Bowling CommitDate: 2026-07-30 04:42:49 +0000 igb: Reprogram descriptor queues while disabled Disable each igb-class transmit and receive queue and flush before changing its descriptor-ring registers. Restore the head and tail indices that Intel documents as surviving a VF reset. Use the igb queue-enable control instead of programming legacy TXDCTL granularity, low-water, and reserved bits that do not belong to the 82575 and later. Sponsored by: BBOX.io MFC after: 1 week --- sys/dev/e1000/if_em.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 385406a12890..6d534bb54486 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -4008,7 +4008,14 @@ em_initialize_transmit_unit(if_ctx_t ctx) /* Clear checksum offload context. */ offp = (caddr_t)txr + offsetof(struct tx_ring, csum_flags); endp = (caddr_t)(txr + 1); - bzero(offp, endp - offp); + memset(offp, 0, endp - offp); + + if (hw->mac.type >= igb_mac_min) { + txdctl = E1000_READ_REG(hw, E1000_TXDCTL(qid)); + E1000_WRITE_REG(hw, E1000_TXDCTL(qid), + txdctl & ~E1000_TXDCTL_QUEUE_ENABLE); + E1000_WRITE_FLUSH(hw); + } /* Base and Len of TX Ring */ E1000_WRITE_REG(hw, E1000_TDLEN(qid), @@ -4027,9 +4034,12 @@ em_initialize_transmit_unit(if_ctx_t ctx) txdctl |= 0x1f; /* PTHRESH */ txdctl |= 1 << 8; /* HTHRESH */ txdctl |= 1 << 16;/* WTHRESH */ - txdctl |= 1 << 22; /* Reserved bit 22 must always be 1 */ - txdctl |= E1000_TXDCTL_GRAN; - txdctl |= 1 << 25; /* LWTHRESH */ + if (hw->mac.type < igb_mac_min) { + txdctl |= 1 << 22; /* Reserved bit must always be 1 */ + txdctl |= E1000_TXDCTL_GRAN; + txdctl |= 1 << 25; /* LWTHRESH */ + } else + txdctl |= E1000_TXDCTL_QUEUE_ENABLE; E1000_WRITE_REG(hw, E1000_TXDCTL(qid), txdctl); } @@ -4339,6 +4349,11 @@ em_initialize_receive_unit(if_ctx_t ctx) srrctl |= E1000_SRRCTL_DESCTYPE_ADV_ONEBUF; #endif + rxdctl = E1000_READ_REG(hw, E1000_RXDCTL(qid)); + E1000_WRITE_REG(hw, E1000_RXDCTL(qid), + rxdctl & ~E1000_RXDCTL_QUEUE_ENABLE); + E1000_WRITE_FLUSH(hw); + E1000_WRITE_REG(hw, E1000_RDLEN(qid), scctx->isc_nrxd[0] * sizeof(struct e1000_rx_desc)); @@ -4346,9 +4361,10 @@ em_initialize_receive_unit(if_ctx_t ctx) (uint32_t)(bus_addr >> 32)); E1000_WRITE_REG(hw, E1000_RDBAL(qid), (uint32_t)bus_addr); + E1000_WRITE_REG(hw, E1000_RDH(qid), 0); + E1000_WRITE_REG(hw, E1000_RDT(qid), 0); E1000_WRITE_REG(hw, E1000_SRRCTL(qid), srrctl); /* Enable this Queue */ - rxdctl = E1000_READ_REG(hw, E1000_RXDCTL(qid)); rxdctl |= E1000_RXDCTL_QUEUE_ENABLE; rxdctl &= 0xFFF00000; rxdctl |= IGB_RX_PTHRESH;