I'm writing a device driver which requires recieve skbuffs to be DMA
capable. So I allocate buffers using the mode "GFP_ATOMIC | GFP_DMA".
Now it seems that this is "rejected" for no apparent reason other than
an oversight. Correct? Or is there a reason why I can't allocate
DMA-capable memory from an interrupt?
I'm working on 2.0.31-3 .
Below is a patch that I believe to do "the right thing"...
Roger.
--- linux/net/core/skbuff.c~ Tue May 27 11:37:54 1997
+++ linux/net/core/skbuff.c Tue Aug 12 20:55:57 1997
@@ -647,7 +647,7 @@
int len=size;
unsigned char *bptr;
- if (intr_count && priority!=GFP_ATOMIC)
+ if (intr_count && (priority & GFP_LEVEL_MASK) != GFP_ATOMIC)
{
static int count = 0;
if (++count < 5) {