]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - platform-intel.h
tests: add test that DDF marks missing devices as failed on assembly.
[thirdparty/mdadm.git] / platform-intel.h
index e24ae37928b3b422664e41faed530e979de05708..bcd84b7b28a29c02f08b9e020f32523e29610e51 100644 (file)
@@ -76,6 +76,7 @@ struct imsm_orom {
        #define IMSM_OROM_ATTR_RAID1E IMSM_OROM_RLC_RAID1E
        #define IMSM_OROM_ATTR_RAID5 IMSM_OROM_RLC_RAID5
        #define IMSM_OROM_ATTR_RAID_CNG IMSM_OROM_RLC_RAID_CNG
+       #define IMSM_OROM_ATTR_2TB_DISK (1 << 26)
        #define IMSM_OROM_ATTR_2TB (1 << 29)
        #define IMSM_OROM_ATTR_PM (1 << 30)
        #define IMSM_OROM_ATTR_ChecksumVerify (1 << 31)
@@ -124,14 +125,14 @@ static inline int imsm_orom_has_raid5(const struct imsm_orom *orom)
 static inline int imsm_orom_has_chunk(const struct imsm_orom *orom, int chunk)
 {
        int fs = ffs(chunk);
-
        if (!fs)
                return 0;
        fs--; /* bit num to bit index */
+       if (chunk & (chunk-1))
+               return 0; /* not a power of 2 */
        return !!(orom->sss & (1 << (fs - 1)));
 }
 
-
 /**
  * fls - find last (most-significant) bit set
  * @x: the word to search
@@ -167,21 +168,6 @@ static inline int fls(int x)
        return r;
 }
 
-/**
- * imsm_orom_default_chunk - return the largest chunk size supported via orom
- * @orom: orom pointer from find_imsm_orom
- */
-static inline int imsm_orom_default_chunk(const struct imsm_orom *orom)
-{
-       int fs = fls(orom->sss);
-
-       if (!fs)
-               return 0;
-
-       return min(512, (1 << fs));
-}
-
-
 enum sys_dev_type {
        SYS_DEV_UNKNOWN = 0,
        SYS_DEV_SAS,
@@ -189,7 +175,6 @@ enum sys_dev_type {
        SYS_DEV_MAX
 };
 
-
 struct sys_dev {
        enum sys_dev_type type;
        char *path;
@@ -216,11 +201,9 @@ static inline char *guid_str(char *buf, struct efi_guid guid)
 char *diskfd_to_devpath(int fd);
 struct sys_dev *find_driver_devices(const char *bus, const char *driver);
 struct sys_dev *find_intel_devices(void);
-void free_sys_dev(struct sys_dev **list);
 const struct imsm_orom *find_imsm_capability(enum sys_dev_type hba_id);
 const struct imsm_orom *find_imsm_orom(void);
 int disk_attached_to_hba(int fd, 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);
-