Bug in sn_pci_map_sg causes MCA
PATCH 1/1 Bug in sn_pci_map_sg causes MCA
If sg->dma_address is set, we try to do a __pa() on a dma_address, then, later, create a dma_addresss from a munged dma_address. When this bogus dma_address is used by the card, it results in MCAs.
--ajm
arch/ia64/sn/io/machvec/pci_dma.c Mon Nov 3 13:16:20 2003 renamed from usr/tmp/TmpDir.5614-0/linux/arch/ia64/sn/io/machvec/pci_dma.c_1.5 Mon Nov 3 14:32:30 2003 +1 -2
@@ -279,8 +279,7 @@ * scatterlist. */ for (i = 0; i < nents; i++, sg++) { - phys_addr = __pa(sg->dma_address ? sg->dma_address : - (unsigned long)page_address(sg->page) + sg->offset); + phys_addr = __pa((unsigned long)page_address(sg->page) + sg->offset); /* * Handle the most common case: 64 bit cards. This
David, this fixes a critical bug for us. Can you push it to Linus or should we send it straight to Andrew?
Thanks,
Jesse
Quoted 26 lines · Alan Mayer
If
sg->dma_addressis set, we try to do a__pa()on adma_address, then, later, create adma_addresssfrom a mungeddma_address. When this bogusdma_addressis used by the card, it results in MCAs.--ajmarch/ia64/sn/io/machvec/pci_dma.c Mon Nov 3 13:16:20 2003 renamed from usr/tmp/TmpDir.5614-0/linux/arch/ia64/sn/io/machvec/pci_dma.c_1.5 Mon Nov 3 14:32:30 2003 +1
-3@@ -279,8 +279,7 @@ * scatterlist. */ for (i = 0; i < nents; i++, sg++) { - phys_addr = __pa(sg->dma_address ? sg->dma_address : - (unsigned long)page_address(sg->page) + sg->offset); + phys_addr = __pa((unsigned long)page_address(sg->page) + sg->offset); /* * Handle the most common case: 64 bit cards. This -To unsubscribe from this list: send the line "unsubscribe linux-ia64" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · On Mon, 3 Nov 2003 12:47:55 -0800, [email protected] (Jesse Barnes) said:
Jesse> David, this fixes a critical bug for us. Can you push it to Jesse> Linus or should we send it straight to Andrew?
The patch doesn't apply for me, otherwise, I'd have been happy to take it (since it's a critical bug fix). I think it fails to apply because TABs got replaced by blanks.
--david
Quoted 8 lines · David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · On Mon, 3 Nov 2003 12:47:55 -0800, [email protected] (Jesse Barnes) said:
Jesse> David, this fixes a critical bug for us. Can you push it to Jesse> Linus or should we send it straight to Andrew?
The patch doesn't apply for me, otherwise, I'd have been happy to take it (since it's a critical bug fix). I think it fails to apply because TABs got replaced by blanks.
Sorry about that, please try this one.
Jesse
arch/ia64/sn/io/machvec/pci_dma.c renamed from usr/tmp/TmpDir.16109-0/linux/arch/ia64/sn/io/machvec/pci_dma.c_1.5 +1 -2
@@ -279,8 +279,7 @@* scatterlist. */ for (i =0 ; i < nents; i++, sg++) { - phys_addr =__pa (sg->dma_address ? sg->dma_address : - (unsigned long )page_address (sg->page) + sg->offset); + phys_addr =__pa ((unsigned long )page_address (sg->page) + sg->offset);/* * Handle the most common case: 64 bit cards. This
Sorry, here's one that should actually work:
ia64/sn/io/machvec/pci_dma.c renamed from home/poppy15/ajm/work/davidm.bk/arch/ia64/sn/io/machvec/pci_dma.c +1 -2
@@ -279,8 +279,7 @@* scatterlist. */ for (i =0 ; i < nents; i++, sg++) { - phys_addr =__pa (sg->dma_address ? sg->dma_address : - (unsigned long )page_address (sg->page) + sg->offset); + phys_addr =__pa ((unsigned long )page_address (sg->page) + sg->offset);/* * Handle the most common case: 64 bit cards. This
--ajm
Quoted 9 lines · David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · On Mon, 3 Nov 2003 12:47:55 -0800, [email protected] (Jesse Barnes) said:
Jesse> David, this fixes a critical bug for us. Can you push it to Jesse> Linus or should we send it straight to Andrew?
The patch doesn't apply for me, otherwise, I'd have been happy to take it (since it's a critical bug fix). I think it fails to apply because TABs got replaced by blanks.
Quoted 6 lines
--david-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
But he can't be a man,
'cause he doesn't smoke
the same cigarettes as me.
--
Alan J. Mayer
SGI
[email protected]
WORK: 651-683-3131
HOME: 651-407-0134
--
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Alan Mayer
Alan> Sorry, here's one that should actually work:
Well, no it doesn't apply with patch -p1. But it's OK this time, I fixed it myself.
--david