Hi Frank,
I think that this is an issue we have a fix for, it's just not released
yet in an SF driver update.
I attach patch dma_warn.diff that contains that fix, and it will apply
with a little fuzz to the e1000-8-0-16 driver
cp <attachment> ./
cd e1000-8-0-16/src
patch -p3 <../../dma_warn.diff
Please let us know if this resolves the issue for you.
In the meantime I think that the warning does not mean that there is any
real danger, it is only that we are not using the proper APIs.
Thanks
Dave
Frank Dauer wrote:
Hi all,
I have linux 2.6.31.5 with e1000 8.0.16 and debugging enabled. Now everytime the module loads I get the following traces. This happens on my VMware machine but is also reproducable on legacy hardware.
This issue seems not to have any functional impact. So, the driver "seems" to work correctly, meaning I can send packets over the link. Problem is: I am usure if keeping it like this is a good idea or if any further problems may arise later on.
Maybe this is related to the compiler warnings I got while building the kernel:
drivers/net/e1000/e1000_main.c: In function 'e1000_probe':
drivers/net/e1000/e1000_main.c:723: warning: 'DMA_nnBIT_MASK' is deprecated
drivers/net/e1000/e1000_main.c:724: warning: 'DMA_nnBIT_MASK' is deprecated
drivers/net/e1000/e1000_main.c:727: warning: 'DMA_nnBIT_MASK' is deprecated
drivers/net/e1000/e1000_main.c:728: warning: 'DMA_nnBIT_MASK' is deprecated
This is the trace:
Intel(R) PRO/1000 Network Driver - version 8.0.16-NAPI
Copyright (c) 1999-2009 Intel Corporation.
e1000 0000:00:11.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
e1000 0000:00:11.0: setting latency timer to 64
e1000: 0000:00:11.0: e1000_probe: (PCI:66MHz:32-bit) 00:50:56:00:33:01
e1000: eth0: e1000_probe: Intel(R) PRO/1000 Network Connection
e1000: eth0: e1000_watchdog_task: NIC Link is Up 1000 Mbps Full Duplex, Flow
Control: None
------------[ cut here ]------------
WARNING: at lib/dma-debug.c:816 check_unmap+0x4a2/0xeb0() (Not tainted)
Hardware name: VMware Virtual Platform
e1000 0000:00:11.0: DMA-API: device driver frees DMA memory with wrong function
[device address=0x000000001d039a02] [size=42 bytes] [mapped as single]
[unmapped as page]
Modules linked in: e1000 tun bitrev crc32 ppdev floppy serio_raw parport_pc
parport BusLogic [last unloaded: microcode]
Pid: 2374, comm: controld Not tainted 2.6.31.5-96ph5.0.0.1.i686.PAEdebug #1
Call Trace:
[<806d53f2>] ? check_unmap+0x4a2/0xeb0
[<8046a517>] warn_slowpath_common+0xe7/0x190
[<806d53f2>] ? check_unmap+0x4a2/0xeb0
[<8046a660>] warn_slowpath_fmt+0x50/0x70
[<806d53f2>] check_unmap+0x4a2/0xeb0
[<804107f8>] ? sched_clock+0x8/0x10
[<804fa7fc>] ? handle_fasteoi_irq+0x12c/0x1d0
[<804332d0>] ? ack_apic_level+0xb0/0x540
[<80a42107>] ? _spin_unlock+0x47/0x60
[<804fa7fc>] ? handle_fasteoi_irq+0x12c/0x1d0
[<806d61d7>] debug_dma_unmap_page+0x87/0xd0
[<a0bc1aea>] e1000_unmap_and_free_tx_resource+0x11a/0x170 [e1000]
[<a0bc3ba9>] e1000_poll+0x129/0x930 [e1000]
[<804b771b>] ? lock_release_holdtime+0x4b/0x330
[<80a41fca>] ? _spin_unlock_irq+0x5a/0x80
[<804b88f0>] ? trace_hardirqs_on_caller+0xc0/0x420
[<8047e16c>] ? run_timer_softirq+0x2cc/0x460
[<809431e3>] net_rx_action+0x1f3/0x450
[<80474896>] __do_softirq+0x126/0x380
[<80474c03>] do_softirq+0x113/0x120
[<809496c6>] ? dev_queue_xmit+0x206/0x970
[<804751a5>] local_bh_enable+0x205/0x270
[<809496c6>] dev_queue_xmit+0x206/0x970
[<80949518>] ? dev_queue_xmit+0x58/0x970
[<80a21b32>] packet_sendmsg+0xdc2/0xf20
[<80925c70>] sock_sendmsg+0xe0/0x130
[<804bc565>] ? lock_release_non_nested+0xd5/0x4b0
[<80494590>] ? autoremove_wake_function+0x0/0x70
[<8053dce4>] ? might_fault+0x74/0x100
[<8053dce4>] ? might_fault+0x74/0x100
[<8053dd4c>] ? might_fault+0xdc/0x100
[<8053dce4>] ? might_fault+0x74/0x100
[<806c0ba1>] ? copy_from_user+0x51/0x1f0
[<80927036>] sys_sendto+0x126/0x1e0
[<8053dce4>] ? might_fault+0x74/0x100
[<8053dce4>] ? might_fault+0x74/0x100
[<8053dd4c>] ? might_fault+0xdc/0x100
[<8053dce4>] ? might_fault+0x74/0x100
[<80928546>] sys_socketcall+0x346/0x520
[<804063ab>] sysenter_do_call+0x12/0x38
---[ end trace 992994b9bef68778 ]---
Mapped at:
[<806d682e>] debug_dma_map_page+0x8e/0x280
[<a0bc61ae>] e1000_xmit_frame+0x75e/0x16a0 [e1000]
[<80946803>] dev_hard_start_xmit+0x443/0x7a0
[<80964942>] __qdisc_run+0x352/0x4e0
[<80949a95>] dev_queue_xmit+0x5d5/0x970
If you need anything else, please ask, I will be glad to help.
Thanks a lot,
Frank
phion
phion
phion
phion
phion
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
E1000-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/e1000-devel
diff -upr a/src/CORE/e1000.h b/src/CORE/e1000.h
--- a/src/CORE/e1000.h 2009-05-21 13:13:12.000000000 -0700
+++ b/src/CORE/e1000.h 2009-08-19 16:56:58.000000000 -0700
@@ -132,6 +132,7 @@ struct e1000_buffer {
unsigned long time_stamp;
u16 length;
u16 next_to_watch;
+ u16 mapped_as_page;
};
struct e1000_rx_buffer {
diff -upr a/src/CORE/e1000_main.c b/src/CORE/e1000_main.c
--- a/src/CORE/e1000_main.c 2009-08-18 09:44:57.000000000 -0700
+++ b/src/CORE/e1000_main.c 2009-08-19 16:56:58.000000000 -0700
@@ -1929,10 +1929,16 @@ static void e1000_unmap_and_free_tx_reso
struct e1000_buffer *buffer_info)
{
if (buffer_info->dma) {
- pci_unmap_page(adapter->pdev,
- buffer_info->dma,
- buffer_info->length,
- PCI_DMA_TODEVICE);
+ if (buffer_info->mapped_as_page)
+ pci_unmap_page(adapter->pdev,
+ buffer_info->dma,
+ buffer_info->length,
+ PCI_DMA_TODEVICE);
+ else
+ pci_unmap_single(adapter->pdev,
+ buffer_info->dma,
+ buffer_info->length,
+ PCI_DMA_TODEVICE);
buffer_info->dma = 0;
}
if (buffer_info->skb) {
@@ -2901,6 +2907,7 @@ static int e1000_tx_map(struct e1000_ada
skb->data + offset,
size,
PCI_DMA_TODEVICE);
+ buffer_info->mapped_as_page = FALSE;
buffer_info->next_to_watch = i;
len -= size;
@@ -2943,6 +2950,7 @@ static int e1000_tx_map(struct e1000_ada
offset,
size,
PCI_DMA_TODEVICE);
+ buffer_info->mapped_as_page = TRUE;
buffer_info->next_to_watch = i;
len -= size;
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
E1000-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/e1000-devel