]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/suse-2.6.27.31/patches.arch/ia64-sn-fix-pci-attribute-propagation-bug.patch
Merge branch 'master' of git://git.ipfire.org/ipfire-2.x
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.arch / ia64-sn-fix-pci-attribute-propagation-bug.patch
1 From: Jeremy Higdon <jeremy@sgi.com>
2 Subject: ia64: sn: fix pci attribute propagation bug
3 Patch-mainline: 2.6.29
4 References: bnc#480591
5
6 Customer backups were no longer able to complete within 24 hours after
7 upgrading from SLES10 SP1 to SLES10 SP2. Further investigation demonstrated
8 tape streaming bandwidth reduced when the scsi controller is operating at PCI
9 66 mhz. Operating both ports simultaneously caused the reduced bandwidth to
10 reduce in half to each tape drive. If the controller is operating at PCI-X
11 100mhz, there is no reduction in the tape performance.
12
13 Performance degradation is noticeable with a single tape drive writing highly
14 compressible data and the controller operating in PCI-66. This only affects
15 PCI mode, not PCIx.
16
17 kotd SP2 baseline: 4194304000 bytes (4.2 GB) copied, 70.7747 seconds, 59.3 MB/s
18 kotd SP1 baseline: 4194304000 bytes (4.2 GB) copied, 26.7403 seconds, 157 MB/s
19
20 The culprit patch is:
21 patches.fixes/fix-ia64-sn-msi-support
22
23 The patch is a backport of the following upstream patch:
24
25 http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=83821d3f558dc651e555d62182ed0c95651f41a6
26
27 The fact that the patch is sn2 specific, and that the problem shows up only in
28 PCI mode, would easily explain how the performance regression managed to go
29 unnoticed for this long.
30
31 The problem is that DMA attributes are not getting set on 64bit DMA addresses
32 on our PIC ASIC based PCI busses (i.e. O350 and O3000 systems). This only
33 affects devices running in PCI mode, not PCIx mode. The result is anything
34 from poor performance to data corruption -- so this is a mustfix type problem.
35
36 This is a _regression_ in SLES10SP2 introduced _accidentally_ by the patch
37 patches.fixes/fix-ia64-sn-msi-support
38 That implemented MSI support on IA64 SN2 systems.
39
40 The broken code is located in the changes to the pcibr_dmatrans_direct64()
41 routine in arch/ia64/sn/pci/pcibr/pcibr_dma.c.
42
43 The bug is also present in upstream code which means that SLES11 too suffers
44 from the same problem: git commit that introduced the bug is
45 83821d3f558dc651e555d62182ed0c95651f41a6
46
47 This patch resolves the problem.
48
49 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
50
51
52 ---
53 arch/ia64/sn/pci/pcibr/pcibr_dma.c | 7 +++----
54 1 file changed, 3 insertions(+), 4 deletions(-)
55
56 --- a/arch/ia64/sn/pci/pcibr/pcibr_dma.c
57 +++ b/arch/ia64/sn/pci/pcibr/pcibr_dma.c
58 @@ -135,11 +135,10 @@ pcibr_dmatrans_direct64(struct pcidev_in
59 if (SN_DMA_ADDRTYPE(dma_flags) == SN_DMA_ADDR_PHYS)
60 pci_addr = IS_PIC_SOFT(pcibus_info) ?
61 PHYS_TO_DMA(paddr) :
62 - PHYS_TO_TIODMA(paddr) | dma_attributes;
63 + PHYS_TO_TIODMA(paddr);
64 else
65 - pci_addr = IS_PIC_SOFT(pcibus_info) ?
66 - paddr :
67 - paddr | dma_attributes;
68 + pci_addr = paddr;
69 + pci_addr |= dma_attributes;
70
71 /* Handle Bus mode */
72 if (IS_PCIX(pcibus_info))