Thread (8 messages) 8 messages, 5 authors, 2016-08-25

Aw: [PATCH] [v8] net: emac: emac gigabit ethernet controller driver

From: "Lino Sanfilippo" <LinoSanfilippo@gmx.de>
Date: 2016-08-12 20:22:58
Also in: linux-arm-msm, netdev

Hi,

I really dont want to be a killjoy, but...
+		int ret;
+
+		skb = __netdev_alloc_skb_ip_align(adpt->netdev,
+						  adpt->rxbuf_size, GFP_KERNEL);
This is also called in softirq context by the napi handler in which GFP_KERNEL is
not allowed.
You can either extend the refill function by one gfp_t parameter and then call it 
with GFP_KERNEL for the initial rx buffer allocation when the hw is brought up and 
then with GFP_ATOMIC for refilling in the NAPI handler. Or simply always use GFP_ATOMIC.
In the latter case the additional parameter is not needed of course and you can
use netdev_alloc_skb_ip_align() instead of __netdev_alloc_skb_ip_align().

Regards,
Lino
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help