summaryrefslogtreecommitdiffstats
path: root/platform-intel.h
diff options
context:
space:
mode:
authorArtur Paszkiewicz <artur.paszkiewicz@intel.com>2014-11-19 13:53:29 +0100
committerNeilBrown <neilb@suse.de>2014-11-25 01:37:38 +0100
commit0858eccf86e9b3611d711717ec65a042f5c7ff9f (patch)
treecc72d3c1d9e05aab07bc8eef28991713e4eb32fa /platform-intel.h
parentimsm: add support for NVMe devices (diff)
downloadmdadm-0858eccf86e9b3611d711717ec65a042f5c7ff9f.tar.xz
mdadm-0858eccf86e9b3611d711717ec65a042f5c7ff9f.zip
imsm: detail-platform improvements
Print platform details per OROM, not per controller, differentiate RST(e) platforms from legacy IMSM, print NVMe device paths, adjust port printing to newer sysfs path. Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'platform-intel.h')
-rw-r--r--platform-intel.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/platform-intel.h b/platform-intel.h
index 6b4ebd81..3e85d44b 100644
--- a/platform-intel.h
+++ b/platform-intel.h
@@ -173,6 +173,17 @@ static inline int fls(int x)
return r;
}
+static inline int imsm_orom_is_enterprise(const struct imsm_orom *orom)
+{
+ return !!(orom->driver_features & IMSM_OROM_CAPABILITIES_EnterpriseSystem);
+}
+
+static inline int imsm_orom_is_nvme(const struct imsm_orom *orom)
+{
+ return memcmp(orom->signature, IMSM_NVME_OROM_COMPAT_SIGNATURE,
+ sizeof(orom->signature)) == 0;
+}
+
enum sys_dev_type {
SYS_DEV_UNKNOWN = 0,
SYS_DEV_SAS,
@@ -194,6 +205,16 @@ struct efi_guid {
__u8 b[16];
};
+struct devid_list {
+ __u16 devid;
+ struct devid_list *next;
+};
+
+struct orom_entry {
+ struct imsm_orom orom;
+ struct devid_list *devid_list;
+};
+
static inline char *guid_str(char *buf, struct efi_guid guid)
{
sprintf(buf, "%02x%02x%02x%02x-%02x%02x-%02x%02x-"
@@ -215,4 +236,6 @@ int devt_attached_to_hba(dev_t dev, const char *hba_path);
char *devt_to_devpath(dev_t dev);
int path_attached_to_hba(const char *disk_path, const char *hba_path);
const char *get_sys_dev_type(enum sys_dev_type);
+const struct orom_entry * get_oroms(void);
const struct imsm_orom *get_orom_by_device_id(__u16 device_id);
+struct sys_dev *device_by_id(__u16 device_id);