mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-21 10:19:04 +00: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
This commit is contained in:
parent
c85b3903d1
commit
3a477a9b70
|
@ -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