From nobody Mon Jan 29 19:03:06 2024 X-Original-To: dev-commits-src-main@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 4TNyP70PVNz59DQg; Mon, 29 Jan 2024 19:03:07 +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 4TNyP662shz40RG; Mon, 29 Jan 2024 19:03:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706554986; 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=lZ44iBPqcUd5pm2OYHCySxstCfoSxc68QCRqtD7a9do=; b=uqArPJGBL71wfYQah4pTRLgRvuVYrIke/7V795yKR6mUQzuCl9ENKKb19cSGgyUzX03Kr6 /ngOwq8IMUdygwN0C3PbK1BQwpQHialjjXxdjF5B9HT9Usy53F4qzunlb0z/BbWKWys6Cm RUPyrNk7wUGwmL79xBuJP2W1HLVfmcZOR1rlqZHIhGbn6kXvx2Dpcc9ly04R14FBQtX+HI a4pOEPFL2p3A+tpJaGaa3iye7oTfs49XwSePv4IhlthpLZeIz0yRx0WHTMn5qDD2g9u5FT n6zTh0VAbPxZFMKiiqoWjSRR0PlMibM7CvKlM4hLy5FLRL5xscCAUrC/O+PGsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706554986; 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=lZ44iBPqcUd5pm2OYHCySxstCfoSxc68QCRqtD7a9do=; b=jxbumPzIrO66MwafXdyna3Sl44Al7QLmu+vRxtBOX/eYDpYxjfOrdCzc1cqdDIxbOGQsVa TZjQ1XpNAzCXRPQsKt+xR+VX7MBXpLgX8cC0HzSwL29OShEcwXEwflkWV9ueFv+ShR0mIV UKW09j8GoH0t63nR6HTuPURf8ka08Acue0kB+2v4HuUusuo6anZ3lzTFqO/W+xIZyV6AjY AbmxwBTEJmJrx4FFGIv8o8S3wlgjyjIJwYBWE8864Mns2u/++ekxiGz1mBOF6D+N4LVUSv +OuH+QUO+D7RI1ns2rDw9lii0fZQy69StMxfr9U/w79mfXvAiHUb0oRsBEEruQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706554986; a=rsa-sha256; cv=none; b=j9YwWyAN12TDst4UeLbXHEM4GQmcqKngD9SqIljIVX9VdJRWHh4E08VGbtlnjQTChrB/61 m1nGO2VWU0ZUJJV92/QwQT6up9kNqBTfV1aydfF0hQHyIdYGYMle3xm5HtMJa0nLY10nl4 UMcBf24vBdzYK+0Pl4WgOqEFxLa60l8f221/8HYnjyX3SMTa1yyOJbWppR8la7lGrnJYOg cddkllmj143LkENE1jqoySnmwN5vrdjQNz4Hlqar+eWDo4JjS8I5Q/Ht8ec7EAjYlHBXMY pSctrfUykNV5MdI2ztGcX/k6EFC8S50beWZTPHjpc8JJZ4nFrwusCphie24Vjg== 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 4TNyP658bfz13rV; Mon, 29 Jan 2024 19:03:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40TJ36Wj058637; Mon, 29 Jan 2024 19:03:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40TJ36lo058634; Mon, 29 Jan 2024 19:03:06 GMT (envelope-from git) Date: Mon, 29 Jan 2024 19:03:06 GMT Message-Id: <202401291903.40TJ36lo058634@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 1dade1f255ee - main - nvme: Rename NVMEB helper macro to NVMEM List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1dade1f255ee535ad357211395b46188bece52dc Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1dade1f255ee535ad357211395b46188bece52dc commit 1dade1f255ee535ad357211395b46188bece52dc Author: John Baldwin AuthorDate: 2024-01-29 18:58:28 +0000 Commit: John Baldwin CommitDate: 2024-01-29 18:58:28 +0000 nvme: Rename NVMEB helper macro to NVMEM The current macro always builds a full mask for a named field, so use the M suffix for mask. Reviewed by: chuck, imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D43601 --- sys/dev/nvme/nvme.h | 2 +- usr.sbin/bhyve/pci_nvme.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index 417651a19bb3..2c36d0813253 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -605,7 +605,7 @@ enum nvme_critical_warning_state { #define NVME_FEAT_SET_FID_MASK (0xff) /* Helper macro to combine *_MASK and *_SHIFT defines */ -#define NVMEB(name) (name##_MASK << name##_SHIFT) +#define NVMEM(name) (name##_MASK << name##_SHIFT) /* Helper macro to extract value from x */ #define NVMEV(name, x) (((x) >> name##_SHIFT) & name##_MASK) diff --git a/usr.sbin/bhyve/pci_nvme.c b/usr.sbin/bhyve/pci_nvme.c index dd6c9a41d17f..2d426fb19096 100644 --- a/usr.sbin/bhyve/pci_nvme.c +++ b/usr.sbin/bhyve/pci_nvme.c @@ -538,12 +538,12 @@ pci_nvme_init_ctrldata(struct pci_nvme_softc *sc) cd->cntrltype = NVME_CNTRLTYPE_IO; cd->oacs = 1 << NVME_CTRLR_DATA_OACS_FORMAT_SHIFT; - cd->oaes = NVMEB(NVME_CTRLR_DATA_OAES_NS_ATTR); + cd->oaes = NVMEM(NVME_CTRLR_DATA_OAES_NS_ATTR); cd->acl = 2; cd->aerl = 4; /* Advertise 1, Read-only firmware slot */ - cd->frmw = NVMEB(NVME_CTRLR_DATA_FRMW_SLOT1_RO) | + cd->frmw = NVMEM(NVME_CTRLR_DATA_FRMW_SLOT1_RO) | (1 << NVME_CTRLR_DATA_FRMW_NUM_SLOTS_SHIFT); cd->lpa = 0; /* TODO: support some simple things like SMART */ cd->elpe = 0; /* max error log page entries */