# If not specified, default to yes if the device is found.
if /bin/sysenv virtio_blk >/dev/null
then virtio_blk="`/bin/sysenv virtio_blk`"
- elif grep '^[^ ]* [^ ]* 1AF4:1001 ' /proc/pci >/dev/null
+ elif grep '^[^ ]* [^ ]* 1AF4:1001[^ ]* ' /proc/pci >/dev/null
then echo "virtio_blk not set, defaulting to using found virtio device."
virtio_blk=yes
fi
{
/* Print information about PCI devices present in the system.
*/
- u16_t vid, did;
- u8_t bcr, scr, pifr;
+ u16_t vid, did, subvid, subdid;
+ u8_t bcr, scr, pifr, rev;
char *slot_name, *dev_name;
int r, devind;
static int first = TRUE;
bcr = pci_attr_r8(devind, PCI_BCR);
scr = pci_attr_r8(devind, PCI_SCR);
pifr = pci_attr_r8(devind, PCI_PIFR);
-
- buf_printf("%s %x/%x/%x %04X:%04X %s\n",
- slot_name ? slot_name : "-",
- bcr, scr, pifr, vid, did,
+ rev = pci_attr_r8(devind, PCI_REV);
+ subvid = pci_attr_r16(devind, PCI_SUBVID);
+ subdid = pci_attr_r16(devind, PCI_SUBDID);
+
+ buf_printf("%s %x/%x/%x/%x %04X:%04X:%04X:%04X %s\n",
+ slot_name ? slot_name : "-1.-1.-1.-1",
+ bcr, scr, pifr, rev,
+ vid, did, subvid, subdid,
dev_name ? dev_name : "");
r = pci_next_dev(&devind, &vid, &did);