Commit 71e9dd0d authored by Dave Jones's avatar Dave Jones

[PATCH] Small fix to pci_alloc_consistent()

Original from Badari Pulavarty <pbadari@us.ibm.com>:

pci_alloc_consistent() is returning zone DMA memory to highmem
enabled drivers when it really should have been returning zone NORMAL.

Found this while testing qlogicfc driver for > 4GB support.
parent f92d2147
......@@ -19,7 +19,7 @@ void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size,
void *ret;
int gfp = GFP_ATOMIC;
if (hwdev == NULL || hwdev->dma_mask != 0xffffffff)
if (hwdev == NULL || ((u32)hwdev->dma_mask != 0xffffffff))
gfp |= GFP_DMA;
ret = (void *)__get_free_pages(gfp, get_order(size));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment