lkml.org 
[lkml]   [2012]   [Dec]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] forcedeth: Fix WARNINGS that result when DMA mapping is not checked
From
Date
On Thu, 2012-12-27 at 14:38 -0600, Larry Finger wrote:
> On 12/27/2012 02:05 PM, Eric Dumazet wrote:
> > On Thu, 2012-12-27 at 13:42 -0600, Larry Finger wrote:

> >> + if (pci_dma_mapping_error(np->pci_dev,
> >> + np->put_tx_ctx->dma))
> >> + return NETDEV_TX_BUSY;
> >
> > Really this is not going to work very well : caller will call this in a
> > loop.
>
> Any suggestions on what value should be returned, or does the caller need to be
> modified?

NETDEV_TX_BUSY is really obsolete

Documentation/networking/driver.txt

In case of mapping error, I would drop the packet.

(kfree_skb() it, increment a device tx_dropped counter, and return
NETDEV_TX_OK)





\
 
 \ /
  Last update: 2012-12-27 22:41    [W:0.059 / U:0.660 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site