This is required for at least QEMU. However, as of writing, QEMU also
requires fixes in its epro100 emulator before this driver can use it.
Change-Id: Ie5c5ffe4311b1a0e581bc687f1c15de3a85f4a30
static int fxp_probe(fxp_t *fp, int skip)
{
int r, devind;
- u16_t vid, did;
+ u16_t vid, did, cr;
u32_t bar;
u8_t ilr, rev;
char *str;
#endif
pci_reserve(devind);
+ /* Enable bus mastering if necessary. */
+ cr = pci_attr_r16(devind, PCI_CR);
+ if (!(cr & PCI_CR_MAST_EN))
+ pci_attr_w16(devind, PCI_CR, cr | PCI_CR_MAST_EN);
+
bar= pci_attr_r32(devind, PCI_BAR_2) & 0xffffffe0;
if (bar < 0x400) {
panic("fxp_probe: base address is not properly configured");