swiotlb: fix wrong panic
commit960ac8917d6f4ef3a63e64bae1159256ff7cd72c
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Fri, 25 Feb 2011 22:44:16 +0000 (25 14:44 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 7 Mar 2011 23:05:10 +0000 (7 15:05 -0800)
treebf2d3320692548b1f19c155821a9e414a56ec956
parenta72affdbb09f3f24f64ffcbbdf62c2e57c58f379
swiotlb: fix wrong panic

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 <cebbert@redhat.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Tested-by: Arkadiusz Miskiewicz <arekm@maven.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
lib/swiotlb.c