lkml.org 
[lkml]   [2011]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: dma-debug report/error on natsemi eth0
On Sat, Jul 2, 2011 at 11:06 PM, FUJITA Tomonori
<fujita.tomonori@lab.ntt.co.jp> wrote:
> On Thu, 30 Jun 2011 12:34:52 -0600
> Jim Cromie <jim.cromie@gmail.com> wrote:
>
>> since adding DMA-debug to my config, Ive been seeing these.
>> I suspect it goes back a ways..
>>
>> its on my list to do some investigating,
>> but I figured Id report in the meantime.
>>
>> ------------[ cut here ]------------
>> WARNING: at /home/jimc/projects/lx/linux-2.6/lib/dma-debug.c:820
>> check_unmap+0x1fe/0x56a()
>> natsemi 0000:00:06.0: DMA-API: device driver frees DMA memory with
>> different size [device address=0x0000000006ef0040] [map size=1538
>> bytes] [unmap size=1522 bytes]
>> Modules linked in: pc8736x_gpio pc87360 hwmon_vid scx200_gpio nsc_gpio
>> scx200_hrt scx200_acb i2c_core arc4 rtl8180 mac80211 eeprom_93cx6
>> cfg80211 pcspkr rfkill scx200 ide_gd_mod ide_pci_generic ohci_hcd
>> usbcore sc1200 ide_core
>> Pid: 870, comm: collector Not tainted 3.0.0-rc5-sk-00080-gca56a95 #1
>> Call Trace:
>>  [<c011a556>] warn_slowpath_common+0x4a/0x5f
>>  [<c02565cb>] ? check_unmap+0x1fe/0x56a
>>  [<c011a5cf>] warn_slowpath_fmt+0x26/0x2a
>
> The following patch silences the warning?


yes it does, thanks.

Reported-by: Jim Cromie <jim.cromie@gmail.com>
Tested-by: Jim Cromie <jim.cromie@gmail.com>

>
> diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
> index b78be08..1019379 100644
> --- a/drivers/net/natsemi.c
> +++ b/drivers/net/natsemi.c
> @@ -2360,7 +2360,8 @@ static void netdev_rx(struct net_device *dev, int *work_done, int work_to_do)
>                                        PCI_DMA_FROMDEVICE);
>                        } else {
>                                pci_unmap_single(np->pci_dev, np->rx_dma[entry],
> -                                       buflen, PCI_DMA_FROMDEVICE);
> +                                                buflen+NATSEMI_PADDING,
> +                                                PCI_DMA_FROMDEVICE);
>                                skb_put(skb = np->rx_skbuff[entry], pkt_len);
>                                np->rx_skbuff[entry] = NULL;
>                        }
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-07-04 03:11    [W:0.088 / U:1.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site