]> git.baikalelectronics.ru Git - kernel.git/commit
tg3: use dma_alloc_coherent() instead of pci_alloc_consistent()
authorMatt Carlson <mcarlson@broadcom.com>
Wed, 24 Nov 2010 08:31:52 +0000 (08:31 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Nov 2010 19:06:20 +0000 (11:06 -0800)
commit8be6ad09335a22fc92a764842fbf4ae24c9f20c8
treede41062abc162898508da7cb242c090e0858d0b2
parenta5ca7bf34ce6bd410a4e2f2e41bada73605b403d
tg3: use dma_alloc_coherent() instead of pci_alloc_consistent()

Using dma_alloc_coherent() permits to use GFP_KERNEL allocations instead
of GFP_ATOMIC ones. Its better when a machine is out of memory, because
this allows driver to sleep to get its memory and succeed its init,
especially when allocating high order pages.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tg3.c