Matthew Wilcox 4fb88c1a28 PCI: Make pci_scan_slot more robust
Yinghai pointed out that the new pci_scan_slot() crashes when called
on an ARI-capable slot that is empty.  Fix this by exiting early from
pci_scan_slot if there is no device in the slot.

Also make next_ari_func() robust against devices not existing in case
the ARI capability is corrupt.  ARI also requires that the devices be
listed in order, so if we find a function listed that is out of order,
stop scanning to prevent loops.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-02-22 16:17:17 -08:00
..
2009-06-16 14:29:33 -07:00
2009-12-16 10:11:38 -08:00
2009-05-12 12:17:36 +02:00
2009-11-24 15:25:16 -08:00
2009-09-09 13:29:35 -07:00
2010-02-22 16:17:17 -08:00
2009-02-13 12:01:56 -08:00
2009-07-12 12:22:34 -07:00