diff options
Diffstat (limited to 'drivers/net/netxen/netxen_nic_main.c')
-rw-r--r-- | drivers/net/netxen/netxen_nic_main.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 83348dc4b184..e8a4b6655999 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c | |||
@@ -1844,6 +1844,8 @@ netxen_nic_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
1844 | struct cmd_desc_type0 *hwdesc, *first_desc; | 1844 | struct cmd_desc_type0 *hwdesc, *first_desc; |
1845 | struct pci_dev *pdev; | 1845 | struct pci_dev *pdev; |
1846 | int i, k; | 1846 | int i, k; |
1847 | int delta = 0; | ||
1848 | struct skb_frag_struct *frag; | ||
1847 | 1849 | ||
1848 | u32 producer; | 1850 | u32 producer; |
1849 | int frag_count, no_of_desc; | 1851 | int frag_count, no_of_desc; |
@@ -1851,6 +1853,21 @@ netxen_nic_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
1851 | 1853 | ||
1852 | frag_count = skb_shinfo(skb)->nr_frags + 1; | 1854 | frag_count = skb_shinfo(skb)->nr_frags + 1; |
1853 | 1855 | ||
1856 | /* 14 frags supported for normal packet and | ||
1857 | * 32 frags supported for TSO packet | ||
1858 | */ | ||
1859 | if (!skb_is_gso(skb) && frag_count > NETXEN_MAX_FRAGS_PER_TX) { | ||
1860 | |||
1861 | for (i = 0; i < (frag_count - NETXEN_MAX_FRAGS_PER_TX); i++) { | ||
1862 | frag = &skb_shinfo(skb)->frags[i]; | ||
1863 | delta += frag->size; | ||
1864 | } | ||
1865 | |||
1866 | if (!__pskb_pull_tail(skb, delta)) | ||
1867 | goto drop_packet; | ||
1868 | |||
1869 | frag_count = 1 + skb_shinfo(skb)->nr_frags; | ||
1870 | } | ||
1854 | /* 4 fragments per cmd des */ | 1871 | /* 4 fragments per cmd des */ |
1855 | no_of_desc = (frag_count + 3) >> 2; | 1872 | no_of_desc = (frag_count + 3) >> 2; |
1856 | 1873 | ||