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
This commit is contained in:
John Baldwin 2024-01-29 10:58:28 -08:00
parent c426923606
commit 1dade1f255
2 changed files with 3 additions and 3 deletions

View file

@ -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)

View file

@ -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 */