Merge branch 'sfc-2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-2.6

+18 -2
+16 -2
drivers/net/sfc/efx.c
··· 1054 1054 { 1055 1055 struct pci_dev *pci_dev = efx->pci_dev; 1056 1056 dma_addr_t dma_mask = efx->type->max_dma_mask; 1057 + bool use_wc; 1057 1058 int rc; 1058 1059 1059 1060 netif_dbg(efx, probe, efx->net_dev, "initialising I/O\n"); ··· 1105 1104 rc = -EIO; 1106 1105 goto fail3; 1107 1106 } 1108 - efx->membase = ioremap_wc(efx->membase_phys, 1109 - efx->type->mem_map_size); 1107 + 1108 + /* bug22643: If SR-IOV is enabled then tx push over a write combined 1109 + * mapping is unsafe. We need to disable write combining in this case. 1110 + * MSI is unsupported when SR-IOV is enabled, and the firmware will 1111 + * have removed the MSI capability. So write combining is safe if 1112 + * there is an MSI capability. 1113 + */ 1114 + use_wc = (!EFX_WORKAROUND_22643(efx) || 1115 + pci_find_capability(pci_dev, PCI_CAP_ID_MSI)); 1116 + if (use_wc) 1117 + efx->membase = ioremap_wc(efx->membase_phys, 1118 + efx->type->mem_map_size); 1119 + else 1120 + efx->membase = ioremap_nocache(efx->membase_phys, 1121 + efx->type->mem_map_size); 1110 1122 if (!efx->membase) { 1111 1123 netif_err(efx, probe, efx->net_dev, 1112 1124 "could not map memory BAR at %llx+%x\n",
+2
drivers/net/sfc/workarounds.h
··· 38 38 #define EFX_WORKAROUND_15783 EFX_WORKAROUND_ALWAYS 39 39 /* Legacy interrupt storm when interrupt fifo fills */ 40 40 #define EFX_WORKAROUND_17213 EFX_WORKAROUND_SIENA 41 + /* Write combining and sriov=enabled are incompatible */ 42 + #define EFX_WORKAROUND_22643 EFX_WORKAROUND_SIENA 41 43 42 44 /* Spurious parity errors in TSORT buffers */ 43 45 #define EFX_WORKAROUND_5129 EFX_WORKAROUND_FALCON_A