]> git.baikalelectronics.ru Git - kernel.git/commit
[netdrvr] Fix IOMMU overflow checking in s2io.c
authorAndi Kleen <andi@firstfloor.org>
Wed, 18 Jun 2008 11:58:36 +0000 (13:58 +0200)
committerJeff Garzik <jgarzik@redhat.com>
Fri, 27 Jun 2008 05:31:22 +0000 (01:31 -0400)
commit722ac796100668ef1754a70d70835b9dfdf3dcde
tree57d86c9f63a2afba3bc6b5d9b9db11763740282b
parent30c8b3e8351f17a9c5e98e54087779e149bcf135
[netdrvr] Fix IOMMU overflow checking in s2io.c

s2io has IOMMU overflow checking, but unfortunately it is wrong.

It didn't use the standard macros, which meant that it only worked
on POWER and SPARC because only those define DMA_ERROR_CODE. Convert it to
use the standard macros instead.

I also commented two more bugs in the IOMMU handling. It assumes
that 0 DMA addresses cannot happen, but that's not true in all IOMMU setups.
The information if a buffer has been already mapped needs to be stored
elsewhere.

Didn't fix those because it needs careful checking of the buffer handling
by the maintainers.

Cc: ram.vepa@neterion.com
Cc: santosh.rastapur@neterion.com
Cc: sivakumar.subramani@neterion.com
Cc: sreenivasa.honnur@neterion.com
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/net/s2io.c
drivers/net/s2io.h