[SLOF] [PATCH v1 27/27] virtio: support virtio 1.0 only device ids
Nikunj A Dadhania
nikunj at linux.vnet.ibm.com
Wed Jan 13 22:17:14 AEDT 2016
After the transition, virtio device id will be numbered starting from
0x1041 instead of 0x1000. Adjust the pci device naming routine to pick
up the right driver.
Signed-off-by: Nikunj A Dadhania <nikunj at linux.vnet.ibm.com>
---
slof/fs/pci-device.fs | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/slof/fs/pci-device.fs b/slof/fs/pci-device.fs
index 7b17758..708a0d4 100644
--- a/slof/fs/pci-device.fs
+++ b/slof/fs/pci-device.fs
@@ -60,7 +60,14 @@ s" dma-function.fs" included
s" pci-device_"
my-space pci-vendor@ 4 int2str $cat
s" _" $cat
- my-space pci-device@ 4 int2str $cat
+ \ Special case virtio 1.0 only devices
+ \ The device ids are numbered starting from 1041
+ my-space pci-vendor@ 1AF4 = IF
+ my-space pci-device@ dup 1040 > IF 41 - THEN
+ 4 int2str $cat
+ ELSE
+ my-space pci-device@ 4 int2str $cat
+ THEN
s" .fs" $cat
;
--
2.5.0
More information about the SLOF
mailing list