This is a note to let you know that I've just added the patch titled swiotlb: fix wrong panic
to the 2.6.32-longterm tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/longterm/longterm-queue-2.6.32.git;a=summary The filename of the patch is: swiotlb-fix-wrong-panic.patch and it can be found in the queue-2.6.32 subdirectory. If you, or anyone else, feels it should not be added to the 2.6.32 longterm tree, please let <sta...@kernel.org> know about it. >From fba99fa38b023224680308a482e12a0eca87e4e1 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori <fujita.tomon...@lab.ntt.co.jp> Date: Fri, 25 Feb 2011 14:44:16 -0800 Subject: swiotlb: fix wrong panic From: FUJITA Tomonori <fujita.tomon...@lab.ntt.co.jp> commit fba99fa38b023224680308a482e12a0eca87e4e1 upstream. swiotlb's map_page wrongly calls panic() when it can't find a buffer fit for device's dma mask. It should return an error instead. Devices with an odd dma mask (i.e. under 4G) like b44 network card hit this bug (the system crashes): http://marc.info/?l=linux-kernel&m=129648943830106&w=2 If swiotlb returns an error, b44 driver can use the own bouncing mechanism. Reported-by: Chuck Ebbert <cebb...@redhat.com> Signed-off-by: FUJITA Tomonori <fujita.tomon...@lab.ntt.co.jp> Tested-by: Arkadiusz Miskiewicz <ar...@maven.pl> Signed-off-by: Andrew Morton <a...@linux-foundation.org> Signed-off-by: Linus Torvalds <torva...@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gre...@suse.de> --- lib/swiotlb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/lib/swiotlb.c +++ b/lib/swiotlb.c @@ -631,8 +631,10 @@ dma_addr_t swiotlb_map_page(struct devic /* * Ensure that the address returned is DMA'ble */ - if (!dma_capable(dev, dev_addr, size)) - panic("map_single: bounce buffer is not DMA'ble"); + if (!dma_capable(dev, dev_addr, size)) { + swiotlb_tbl_unmap_single(dev, map, size, dir); + dev_addr = swiotlb_virt_to_bus(dev, io_tlb_overflow_buffer); + } return dev_addr; } Patches currently in longterm-queue-2.6.32 which might be from fujita.tomon...@lab.ntt.co.jp are _______________________________________________ stable mailing list stable@linux.kernel.org http://linux.kernel.org/mailman/listinfo/stable