diff options
author | Artur Paszkiewicz <artur.paszkiewicz@intel.com> | 2014-11-19 13:53:29 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2014-11-25 01:37:38 +0100 |
commit | 0858eccf86e9b3611d711717ec65a042f5c7ff9f (patch) | |
tree | cc72d3c1d9e05aab07bc8eef28991713e4eb32fa /platform-intel.c | |
parent | imsm: add support for NVMe devices (diff) | |
download | mdadm-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.c')
-rw-r--r-- | platform-intel.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/platform-intel.c b/platform-intel.c index ae728274..54ef37f2 100644 --- a/platform-intel.c +++ b/platform-intel.c @@ -134,6 +134,16 @@ struct sys_dev *find_driver_devices(const char *bus, const char *driver) static struct sys_dev *intel_devices=NULL; static time_t valid_time = 0; +struct sys_dev *device_by_id(__u16 device_id) +{ + struct sys_dev *iter; + + for (iter = intel_devices; iter != NULL; iter = iter->next) + if (iter->dev_id == device_id) + return iter; + return NULL; +} + static int devpath_to_ll(const char *dev_path, const char *entry, unsigned long long *val) { char path[strlen(dev_path) + strlen(entry) + 2]; @@ -219,18 +229,13 @@ struct pciExpDataStructFormat { __u16 devListOffset; } __attribute__ ((packed)); -struct devid_list { - __u16 devid; - struct devid_list *next; -}; - -struct orom_entry { - struct imsm_orom orom; - struct devid_list *devid_list; -}; - static struct orom_entry oroms[SYS_DEV_MAX]; +const struct orom_entry *get_oroms(void) +{ + return (const struct orom_entry *)&oroms; +} + const struct imsm_orom *get_orom_by_device_id(__u16 dev_id) { int i; @@ -529,6 +534,7 @@ const struct imsm_orom *find_imsm_nvme(struct sys_dev *hba) .vpa = IMSM_OROM_VOLUMES_PER_ARRAY, .vphba = IMSM_OROM_TOTAL_DISKS_NVME / 2 * IMSM_OROM_VOLUMES_PER_ARRAY, .attr = IMSM_OROM_ATTR_2TB | IMSM_OROM_ATTR_2TB_DISK, + .driver_features = IMSM_OROM_CAPABILITIES_EnterpriseSystem }; nvme_orom = add_orom(&nvme_orom_compat); } |