summaryrefslogtreecommitdiff
path: root/drivers/net/b44.h
diff options
context:
space:
mode:
authorEric Dumazet <dada1@cosmosbay.com>2009-01-15 15:29:35 -0800
committerDavid S. Miller <davem@davemloft.net>2009-01-15 15:29:35 -0800
commita58c891a53aca81c78f9cbe0572a301042470e96 (patch)
treeb81ac812625a701e30157877a6f563c89002cb92 /drivers/net/b44.h
parent1c5625cf0f121486abad4da0e0251ec67765aa95 (diff)
downloadlinux-3.10-a58c891a53aca81c78f9cbe0572a301042470e96.tar.gz
linux-3.10-a58c891a53aca81c78f9cbe0572a301042470e96.tar.bz2
linux-3.10-a58c891a53aca81c78f9cbe0572a301042470e96.zip
b44: GFP_DMA skb should not escape from driver
b44 chip has some hardware limitations, that need GFP_DMA bounce buffers in some situations. In order to not deplete DMA zone, we should keep allocated GFP_DMA skb only for driver use. At rx time, we copy such skb to newly allocated skb, reusing existing copybreak infrastructure. On machines with low amount of memory, all skb meet the hardware limitation, so no copy is needed. We detect this situation using a new device flag, set to one if one GFP_DMA skb was ever allocated by b44_alloc_rx_skb(). Previously allocated skb, even outside from DMA zone will then be recycled, to have minimal impact on DMA zone use. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Tested-by: Ionut Leonte <ionut.leonte@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/b44.h')
-rw-r--r--drivers/net/b44.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/b44.h b/drivers/net/b44.h
index 7db0c84a795..e678498de6d 100644
--- a/drivers/net/b44.h
+++ b/drivers/net/b44.h
@@ -395,7 +395,7 @@ struct b44 {
u32 rx_pending;
u32 tx_pending;
u8 phy_addr;
-
+ u8 force_copybreak;
struct mii_if_info mii_if;
};