bus/pci: resolve multiple NICs address conflicts
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 bus/pci: resolve multiple NICs address conflicts
NIC address conflicts on 64K pagesize when using multiple NICs, as system will mmap 64K pagesize for NIC, but dev->mem_resource[i].len is 16K.
Signed-off-by Beard-627 <[email protected]>
Acked-by Eric wang <[email protected]>
Acked-by Wei Hu <[email protected]>
Acked-by Min Hu <[email protected]>
--- drivers/bus/pci/linux/pci.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/bus/pci/linux/pci.c +5 -0
@@ -201,6 +201,11 @@if (flags &IORESOURCE_MEM ) { dev->mem_resource[i].phys_addr = phys_addr; dev->mem_resource[i].len = end_addr - phys_addr +1 ; +if (dev->mem_resource[i].len < + (unsigned int )getpagesize ()) + + dev->mem_resource[i].len = + (unsigned int )getpagesize ();/* not mapped for now */ dev->mem_resource[i].addr =NULL ; }
--
1.8.3.1