proposed changes to init_*dev() for GFP_DMA
From: Crutcher Dunnavant <hidden>
Date: 2002-07-02 19:36:54
From: Crutcher Dunnavant <hidden>
Date: 2002-07-02 19:36:54
Hello all. For the 2.5 tree, I'm wondering if there would be support for extending the underlying init_*dev() -> init_netdev() interfaces, so that there is a way to pass in the GFP_DMA alloc flag, or any other flag, if needed for the private memory to be kmalloced for dev->priv? This would allow more drivers to use the same interface. Basicaly, I'm thinking something like: struct net_device *init_etherdev(struct net_device *dev, int sizeof_priv, int flags); /* for regualr devices */ dev = init_etherdev(NULL, sizeof(struct foo_priv), GFP_KERNEL); or /* for DMA devices */ dev = init_etherdev(NULL, sizeof(struct foo_priv), GFP_KERNEL | GFP_DMA); -- Crutcher Dunnavant [off-list ref] ECSS System Hacker / UA COE CS Senior