mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
nvme: Add NVMEF helper macro as the inverse of NVMEV
This macro accepts a field name and a value for the field and
constructs the shifted field value.
Reviewed by: chuck
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D43604
(cherry picked from commit 3a477a9b70)
This commit is contained in:
parent
8029ffc9c0
commit
7566b99458
1 changed files with 3 additions and 0 deletions
|
|
@ -610,6 +610,9 @@ enum nvme_critical_warning_state {
|
|||
/* Helper macro to extract value from x */
|
||||
#define NVMEV(name, x) (((x) >> name##_SHIFT) & name##_MASK)
|
||||
|
||||
/* Helper macro to construct a field value */
|
||||
#define NVMEF(name, x) (((x) & name##_MASK) << name##_SHIFT)
|
||||
|
||||
/* CC register SHN field values */
|
||||
enum shn_value {
|
||||
NVME_SHN_NORMAL = 0x1,
|
||||
|
|
|
|||
Loading…
Reference in a new issue