Re: [PATCH] skge: fix broken driver
From: Francois Romieu <romieu@fr.zoreil.com>
Date: 2013-09-20 21:39:07
Mikulas Patocka [off-list ref] :
On Thu, 19 Sep 2013, Francois Romieu wrote:
[...]
quoted
Both patches don't behave exactly the same wrt pci_unmap_single.
[...]
I see, my patch passes a wrong value to pci_unmap_single. So I made this change to make it pass the correct value. Do you agree with this patch ?
Yes. I did not report it. Igor did. You may "struct skge_element ee = *e;" and save a line. Who cares about the extra copy when netdev_alloc_skb_ip_align fails ? Something less ugly for the longer term - use netdev_alloc_skb_ip_align in skge_rx_fill - have skge_rx_setup return previouly stored sk_buff * - NULL if it was so - and ERR_PTR when it fails for whatever reason - move netdev_alloc_skb_ip_align into skge_rx_setup - pci_unmap in skge_rx_setup - profit Or isolate the struct sk_buff * + DEFINE_DMA_ part in skge_element then save it as a whole in skge_rx_setup before initializing a new one as a (netdev_alloc_skb_ip_align + pci_map). Does someone volunteer to write it for net-next once the fix has been merged and later pulled into net-next ? -- Ueimor