112e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris/*
212e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris * Copyright (c) 2014-2015, Intel Corporation.
312e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris *
412e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris * This program is free software; you can redistribute it and/or modify it
512e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris * under the terms and conditions of the GNU Lesser General Public License,
612e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris * version 2.1, as published by the Free Software Foundation.
712e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris *
812e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris * This program is distributed in the hope it will be useful, but WITHOUT ANY
912e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
1012e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for
1112e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris * more details.
1212e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris */
1312e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris#ifndef __NDCTL_H__
1412e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris#define __NDCTL_H__
1512e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
1612e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris#include <linux/types.h>
1712e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
1812e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferrisstruct nd_cmd_smart {
1912e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u32 status;
2012e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u8 data[128];
2112e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris} __packed;
2212e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
2312e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferrisstruct nd_cmd_smart_threshold {
2412e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u32 status;
2512e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u8 data[8];
2612e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris} __packed;
2712e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
2812e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferrisstruct nd_cmd_dimm_flags {
2912e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u32 status;
3012e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u32 flags;
3112e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris} __packed;
3212e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
3312e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferrisstruct nd_cmd_get_config_size {
3412e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u32 status;
3512e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u32 config_size;
3612e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u32 max_xfer;
3712e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris} __packed;
3812e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
3912e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferrisstruct nd_cmd_get_config_data_hdr {
4012e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u32 in_offset;
4112e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u32 in_length;
4212e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u32 status;
4312e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u8 out_buf[0];
4412e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris} __packed;
4512e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
4612e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferrisstruct nd_cmd_set_config_hdr {
4712e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u32 in_offset;
4812e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u32 in_length;
4912e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u8 in_buf[0];
5012e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris} __packed;
5112e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
5212e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferrisstruct nd_cmd_vendor_hdr {
5312e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u32 opcode;
5412e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u32 in_length;
5512e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u8 in_buf[0];
5612e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris} __packed;
5712e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
5812e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferrisstruct nd_cmd_vendor_tail {
5912e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u32 status;
6012e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u32 out_length;
6112e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u8 out_buf[0];
6212e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris} __packed;
6312e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
6412e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferrisstruct nd_cmd_ars_cap {
6512e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u64 address;
6612e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u64 length;
6712e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u32 status;
6812e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u32 max_ars_out;
6912e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris} __packed;
7012e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
7112e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferrisstruct nd_cmd_ars_start {
7212e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u64 address;
7312e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u64 length;
7412e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u16 type;
7512e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u8 reserved[6];
7612e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u32 status;
7712e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris} __packed;
7812e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
7912e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferrisstruct nd_cmd_ars_status {
8012e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u32 status;
8112e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u32 out_length;
8212e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u64 address;
8312e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u64 length;
8412e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u16 type;
8512e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	__u32 num_records;
8612e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	struct nd_ars_record {
8712e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris		__u32 handle;
8812e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris		__u32 flags;
8912e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris		__u64 err_address;
9012e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris		__u64 length;
9112e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	} __packed records[0];
9212e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris} __packed;
9312e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
9412e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferrisenum {
9512e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	ND_CMD_IMPLEMENTED = 0,
9612e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
9712e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	/* bus commands */
9812e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	ND_CMD_ARS_CAP = 1,
9912e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	ND_CMD_ARS_START = 2,
10012e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	ND_CMD_ARS_STATUS = 3,
10112e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
10212e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	/* per-dimm commands */
10312e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	ND_CMD_SMART = 1,
10412e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	ND_CMD_SMART_THRESHOLD = 2,
10512e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	ND_CMD_DIMM_FLAGS = 3,
10612e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	ND_CMD_GET_CONFIG_SIZE = 4,
10712e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	ND_CMD_GET_CONFIG_DATA = 5,
10812e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	ND_CMD_SET_CONFIG_DATA = 6,
10912e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	ND_CMD_VENDOR_EFFECT_LOG_SIZE = 7,
11012e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	ND_CMD_VENDOR_EFFECT_LOG = 8,
11112e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	ND_CMD_VENDOR = 9,
11212e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris};
11312e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
11412e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferrisenum {
11512e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	ND_ARS_VOLATILE = 1,
11612e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	ND_ARS_PERSISTENT = 2,
11712e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris};
11812e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
11912e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferrisstatic inline const char *nvdimm_bus_cmd_name(unsigned cmd)
12012e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris{
12112e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	static const char * const names[] = {
12212e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris		[ND_CMD_ARS_CAP] = "ars_cap",
12312e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris		[ND_CMD_ARS_START] = "ars_start",
12412e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris		[ND_CMD_ARS_STATUS] = "ars_status",
12512e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	};
12612e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
12712e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	if (cmd < ARRAY_SIZE(names) && names[cmd])
12812e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris		return names[cmd];
12912e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	return "unknown";
13012e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris}
13112e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
13212e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferrisstatic inline const char *nvdimm_cmd_name(unsigned cmd)
13312e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris{
13412e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	static const char * const names[] = {
13512e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris		[ND_CMD_SMART] = "smart",
13612e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris		[ND_CMD_SMART_THRESHOLD] = "smart_thresh",
13712e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris		[ND_CMD_DIMM_FLAGS] = "flags",
13812e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris		[ND_CMD_GET_CONFIG_SIZE] = "get_size",
13912e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris		[ND_CMD_GET_CONFIG_DATA] = "get_data",
14012e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris		[ND_CMD_SET_CONFIG_DATA] = "set_data",
14112e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris		[ND_CMD_VENDOR_EFFECT_LOG_SIZE] = "effect_size",
14212e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris		[ND_CMD_VENDOR_EFFECT_LOG] = "effect_log",
14312e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris		[ND_CMD_VENDOR] = "vendor",
14412e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	};
14512e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
14612e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	if (cmd < ARRAY_SIZE(names) && names[cmd])
14712e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris		return names[cmd];
14812e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	return "unknown";
14912e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris}
15012e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
15112e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris#define ND_IOCTL 'N'
15212e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
15312e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris#define ND_IOCTL_SMART			_IOWR(ND_IOCTL, ND_CMD_SMART,\
15412e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris					struct nd_cmd_smart)
15512e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
15612e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris#define ND_IOCTL_SMART_THRESHOLD	_IOWR(ND_IOCTL, ND_CMD_SMART_THRESHOLD,\
15712e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris					struct nd_cmd_smart_threshold)
15812e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
15912e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris#define ND_IOCTL_DIMM_FLAGS		_IOWR(ND_IOCTL, ND_CMD_DIMM_FLAGS,\
16012e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris					struct nd_cmd_dimm_flags)
16112e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
16212e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris#define ND_IOCTL_GET_CONFIG_SIZE	_IOWR(ND_IOCTL, ND_CMD_GET_CONFIG_SIZE,\
16312e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris					struct nd_cmd_get_config_size)
16412e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
16512e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris#define ND_IOCTL_GET_CONFIG_DATA	_IOWR(ND_IOCTL, ND_CMD_GET_CONFIG_DATA,\
16612e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris					struct nd_cmd_get_config_data_hdr)
16712e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
16812e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris#define ND_IOCTL_SET_CONFIG_DATA	_IOWR(ND_IOCTL, ND_CMD_SET_CONFIG_DATA,\
16912e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris					struct nd_cmd_set_config_hdr)
17012e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
17112e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris#define ND_IOCTL_VENDOR			_IOWR(ND_IOCTL, ND_CMD_VENDOR,\
17212e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris					struct nd_cmd_vendor_hdr)
17312e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
17412e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris#define ND_IOCTL_ARS_CAP		_IOWR(ND_IOCTL, ND_CMD_ARS_CAP,\
17512e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris					struct nd_cmd_ars_cap)
17612e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
17712e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris#define ND_IOCTL_ARS_START		_IOWR(ND_IOCTL, ND_CMD_ARS_START,\
17812e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris					struct nd_cmd_ars_start)
17912e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
18012e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris#define ND_IOCTL_ARS_STATUS		_IOWR(ND_IOCTL, ND_CMD_ARS_STATUS,\
18112e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris					struct nd_cmd_ars_status)
18212e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
18312e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris#define ND_DEVICE_DIMM 1            /* nd_dimm: container for "config data" */
18412e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris#define ND_DEVICE_REGION_PMEM 2     /* nd_region: (parent of PMEM namespaces) */
18512e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris#define ND_DEVICE_REGION_BLK 3      /* nd_region: (parent of BLK namespaces) */
18612e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris#define ND_DEVICE_NAMESPACE_IO 4    /* legacy persistent memory */
18712e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris#define ND_DEVICE_NAMESPACE_PMEM 5  /* PMEM namespace (may alias with BLK) */
18812e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris#define ND_DEVICE_NAMESPACE_BLK 6   /* BLK namespace (may alias with PMEM) */
18912e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
19012e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferrisenum nd_driver_flags {
19112e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	ND_DRIVER_DIMM            = 1 << ND_DEVICE_DIMM,
19212e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	ND_DRIVER_REGION_PMEM     = 1 << ND_DEVICE_REGION_PMEM,
19312e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	ND_DRIVER_REGION_BLK      = 1 << ND_DEVICE_REGION_BLK,
19412e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	ND_DRIVER_NAMESPACE_IO    = 1 << ND_DEVICE_NAMESPACE_IO,
19512e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	ND_DRIVER_NAMESPACE_PMEM  = 1 << ND_DEVICE_NAMESPACE_PMEM,
19612e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	ND_DRIVER_NAMESPACE_BLK   = 1 << ND_DEVICE_NAMESPACE_BLK,
19712e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris};
19812e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
19912e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferrisenum {
20012e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	ND_MIN_NAMESPACE_SIZE = 0x00400000,
20112e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris};
20212e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris
20312e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferrisenum ars_masks {
20412e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	ARS_STATUS_MASK = 0x0000FFFF,
20512e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris	ARS_EXT_STATUS_SHIFT = 16,
20612e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris};
20712e1f28cce28271eb109a5bae818a804f0c3bb27Christopher Ferris#endif /* __NDCTL_H__ */
208