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>
__u16 vendorID;
__u16 deviceID;
__u16 devListOffset;
+ __u16 pciDataStructLen;
+ __u8 pciDataStructRev;
} __attribute__ ((packed));
struct orom_entry *orom_entries;
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;