2.4.20 sba_iommu bug fix
PATCH 1/1 2.4.20 sba_iommu bug fix
This patch ensures that iopdir updates are visible on the bus
before we return a DMA mapping. Without this there is a small window where the chipset could fetch an invalid iodpir entry from memory. As Grant mentioned before, we've only seen this problem exposed with multiple tulip NICs under load. Bjorn, please apply. Working on something for 2.5... (more extensive updates) Thanks,
Alex
--
Alex Williamson HP Linux & Open Source Lab
arch/ia64/hp/common/sba_iommu.c +7 -0
@@ -35,6 +35,7 @@#include <asm/delay.h> /* ia64_get_itc() */ #include <asm/io.h> #include <asm/page.h> /* PAGE_OFFSET */ +#include <asm/system.h> /* wmb() */ #define PFX "IOC: "
@@ -816,6 +817,9 @@ sba_map_single(struct pci_dev *dev, void size -=IOVP_SIZE ; pdir_start++; } +/* force pdir update */ +wmb (); +/* form complete address */ #ifdef ASSERT_PDIR_SANITY sba_check_pdir (ioc,"Check after sba_map_single()" );
@@ -1078,6 +1082,9 @@ sba_fill_pdir( } startsg++; } +/* force pdir update */ +wmb (); +#ifdef DEBUG_LARGE_SG_ENTRIES dump_run_sg =0 ;#endif