Joan Lledó, le mer. 05 janv. 2022 13:08:02 +0100, a ecrit: > - if (region->memory == 0) > + if (*addr == 0) > { > - err = pci_device_map_range (device, region->base_addr, region->size, > - PCI_DEV_MAP_FLAG_WRITABLE, ®ion->memory); > + if (region->base_addr > 0x100000)
Rather >= ? Also, why this address? Putting a comment there would be welcome to explain the magic number. > + err = pci_device_map_range (device, region->base_addr, region->size, > + PCI_DEV_MAP_FLAG_WRITABLE, addr); > + else > + err = pci_device_map_legacy (device, region->base_addr, region->size, > + PCI_DEV_MAP_FLAG_WRITABLE, addr); > } > > return err; Samuel