summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/freescale/gianfar.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/freescale/gianfar.c')
-rw-r--r--drivers/net/ethernet/freescale/gianfar.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index 41dd3d0f3452..d391a45cebb6 100644
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -1829,20 +1829,12 @@ static netdev_tx_t gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)
fcb_len = GMAC_FCB_LEN + GMAC_TXPAL_LEN;
/* make space for additional header when fcb is needed */
- if (fcb_len && unlikely(skb_headroom(skb) < fcb_len)) {
- struct sk_buff *skb_new;
-
- skb_new = skb_realloc_headroom(skb, fcb_len);
- if (!skb_new) {
+ if (fcb_len) {
+ if (unlikely(skb_cow_head(skb, fcb_len))) {
dev->stats.tx_errors++;
dev_kfree_skb_any(skb);
return NETDEV_TX_OK;
}
-
- if (skb->sk)
- skb_set_owner_w(skb_new, skb->sk);
- dev_consume_skb_any(skb);
- skb = skb_new;
}
/* total number of fragments in the SKB */
@@ -3380,7 +3372,7 @@ static int gfar_probe(struct platform_device *ofdev)
if (dev->features & NETIF_F_IP_CSUM ||
priv->device_flags & FSL_GIANFAR_DEV_HAS_TIMER)
- dev->needed_headroom = GMAC_FCB_LEN;
+ dev->needed_headroom = GMAC_FCB_LEN + GMAC_TXPAL_LEN;
/* Initializing some of the rx/tx queue level parameters */
for (i = 0; i < priv->num_tx_queues; i++) {
w { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
" System gvimrc file for Mac OS X
" Author:	Benji Fisher <benji@member.AMS.org>
" Last Change: Thu Mar 09 09:00 AM 2006 EST
"
" Define Mac-standard keyboard shortcuts.

" We don't change 'cpoptions' here, because it would not be set properly when
" a .vimrc file is found later.  Thus don't use line continuation and use
" <special> in mappings.

nnoremap <special> <D-n> :confirm enew<CR>
vmap <special> <D-n> <Esc><D-n>gv
imap <special> <D-n> <C-O><D-n>
cmap <special> <D-n> <C-C><D-n>
omap <special> <D-n> <Esc><D-n>

nnoremap <special> <D-o> :browse confirm e<CR>
vmap <special> <D-o> <Esc><D-o>gv
imap <special> <D-o> <C-O><D-o>
cmap <special> <D-o> <C-C><D-o>
omap <special> <D-o> <Esc><D-o>

nnoremap <silent> <special> <D-w> :if winheight(2) < 0 <Bar> confirm enew <Bar> else <Bar> confirm close <Bar> endif<CR>
vmap <special> <D-w> <Esc><D-w>gv
imap <special> <D-w> <C-O><D-w>
cmap <special> <D-w> <C-C><D-w>
omap <special> <D-w> <Esc><D-w>

nnoremap <silent> <special> <D-s> :if expand("%") == ""<Bar>browse confirm w<Bar> else<Bar>confirm w<Bar>endif<CR>
vmap <special> <D-s> <Esc><D-s>gv
imap <special> <D-s> <C-O><D-s>
cmap <special> <D-s> <C-C><D-s>
omap <special> <D-s> <Esc><D-s>

nnoremap <special> <D-S-s> :browse confirm saveas<CR>
vmap <special> <D-S-s> <Esc><D-s>gv
imap <special> <D-S-s> <C-O><D-s>
cmap <special> <D-S-s> <C-C><D-s>
omap <special> <D-S-s> <Esc><D-s>

" From the Edit menu of SimpleText:
nnoremap <special> <D-z> u
vmap <special> <D-z> <Esc><D-z>gv
imap <special> <D-z> <C-O><D-z>
cmap <special> <D-z> <C-C><D-z>
omap <special> <D-z> <Esc><D-z>

vnoremap <special> <D-x> "+x

vnoremap <special> <D-c> "+y

cnoremap <special> <D-c> <C-Y>

nnoremap <special> <D-v> "+gP
cnoremap <special> <D-v> <C-R>+
execute 'vnoremap <script> <special> <D-v>' paste#paste_cmd['v']
execute 'inoremap <script> <special> <D-v>' paste#paste_cmd['i']

nnoremap <silent> <special> <D-a> :if &slm != ""<Bar>exe ":norm gggH<C-O>G"<Bar> else<Bar>exe ":norm ggVG"<Bar>endif<CR>
vmap <special> <D-a> <Esc><D-a>
imap <special> <D-a> <Esc><D-a>
cmap <special> <D-a> <C-C><D-a>
omap <special> <D-a> <Esc><D-a>

nnoremap <special> <D-f> /
vmap <special> <D-f> <Esc><D-f>
imap <special> <D-f> <Esc><D-f>
cmap <special> <D-f> <C-C><D-f>
omap <special> <D-f> <Esc><D-f>

nnoremap <special> <D-g> n
vmap <special> <D-g> <Esc><D-g>
imap <special> <D-g> <C-O><D-g>
cmap <special> <D-g> <C-C><D-g>
omap <special> <D-g> <Esc><D-g>