]> git.itanic.dy.fi Git - linux-stable/commit
swiotlb: fix wrong panic
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Fri, 25 Feb 2011 22:44:16 +0000 (14:44 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 2 Mar 2011 14:47:04 +0000 (09:47 -0500)
commit484d82b6e2e4239ba7a722e0c532e9aff64be51a
tree45975f2ec4f971eab9f22b1de747df275c713716
parent8216e1a0d47cae06a75c42346f19dffe14e42d57
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