]> git.baikalelectronics.ru Git - kernel.git/commit
sfc: Allocate DMA and event rings using GFP_KERNEL
authorBen Hutchings <bhutchings@solarflare.com>
Fri, 10 Sep 2010 06:41:26 +0000 (06:41 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Sep 2010 19:27:31 +0000 (12:27 -0700)
commitbd74c151a898c0c1c8218bf174d6f248318de012
tree6935e011c85f37661b2e3928fbfdcbcdb6b8af91
parent9a44fec9e01639997ddb8a28ff4927cecaae2ba9
sfc: Allocate DMA and event rings using GFP_KERNEL

Currently we allocate DMA descriptor rings and event rings using
pci_alloc_consistent() which selects non-blocking behaviour from the
page allocator (GFP_ATOMIC). This is unnecessary, and since we
currently allocate a single contiguous block for each ring (up to 32
pages!) these allocations are likely to fail if there is any
significant memory pressure.  Use dma_alloc_coherent() and GFP_KERNEL
instead.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/sfc/nic.c