diff options
author | Pawel Baldysiak <pawel.baldysiak@intel.com> | 2015-02-27 15:45:50 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2015-03-04 05:59:53 +0100 |
commit | f666bcc6528326c3431b013f47803db904ff65c0 (patch) | |
tree | d7117fef5f9768ebe15e6abb839a7c5a71e01647 /platform-intel.c | |
parent | imsm: simplified multiple OROMs support (diff) | |
download | mdadm-f666bcc6528326c3431b013f47803db904ff65c0.tar.xz mdadm-f666bcc6528326c3431b013f47803db904ff65c0.zip |
IMSM-orom: make sure, that device list is supported
Devices list in PCI Data Structure is supported only in
3 and above revision. Make sure that this is checked.
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 | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/platform-intel.c b/platform-intel.c index 9c89c20b..1e9ddcd2 100644 --- a/platform-intel.c +++ b/platform-intel.c @@ -227,6 +227,8 @@ struct pciExpDataStructFormat { __u16 vendorID; __u16 deviceID; __u16 devListOffset; + __u16 pciDataStructLen; + __u8 pciDataStructRev; } __attribute__ ((packed)); struct orom_entry *orom_entries; @@ -319,7 +321,8 @@ static int scan(const void *start, const void *end, const void *data) struct orom_entry *orom = add_orom(imsm_mem); - if (ptr->devListOffset) { + /* only PciDataStructure with revision 3 and above supports devices list. */ + if (ptr->pciDataStructRev >= 3 && ptr->devListOffset) { const __u16 *dev_list = (void *)ptr + ptr->devListOffset; int i; |