All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Bugme-new] [Bug 12969] New: WARNING: at lib/dma-debug.c:539 check_sync+0xe9/0x341() (Not tainted)
       [not found] <bug-12969-10286@http.bugzilla.kernel.org/>
@ 2009-04-01 23:50 ` Andrew Morton
  2009-04-03  2:23   ` Sergio Monteiro Basto
                     ` (2 more replies)
       [not found] ` <20090402114402.a89b956d.akpm@linux-foundation.org>
  1 sibling, 3 replies; 8+ messages in thread
From: Andrew Morton @ 2009-04-01 23:50 UTC (permalink / raw)
  To: zambrano; +Cc: bugme-daemon, netdev, sergio, Joerg Roedel


(switched to email.  Please respond via emailed reply-to-all, not via the
bugzilla web interface).

On Sun, 29 Mar 2009 11:43:19 GMT
bugzilla-daemon@bugzilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=12969
> 
>            Summary: WARNING: at lib/dma-debug.c:539
>                     check_sync+0xe9/0x341() (Not tainted)
>            Product: Drivers
>            Version: 2.5
>           Platform: All
>         OS/Version: Linux
>               Tree: Fedora
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: Network
>         AssignedTo: drivers_network@kernel-bugs.osdl.org
>         ReportedBy: sergio@sergiomb.no-ip.org
>         Regression: Yes
> 
> 
> ------------[ cut here ]------------                                            
> WARNING: at lib/dma-debug.c:539 check_sync+0xe9/0x341() (Not tainted)           
> Hardware name: HP Compaq nx6110 (PY501EA#AB9)                                   
> b44 0000:02:0e.0: DMA-API: device driver tries to sync DMA memory it has not
> allocated [device address=0x0000000075941040] [size=1566 bytes]  
> Modules linked in: llc bnep l2cap bluetooth autofs4 lm90 hwmon i2c_i801 sunrpc
> ipv6 cpufreq_ondemand acpi_cpufreq uinput snd_intel8x0m snd_intel8x0
> snd_ac97_codec snd_seq_dummy ac97_bus snd_seq_oss snd_seq_midi_event snd_seq
> snd_seq_device snd_pcm_oss snd_mixer_oss snd_pcm b44 ssb firewire_ohci
> snd_timer ipw2200 iTCO_wdt mii firewire_core snd iTCO_vendor_support libipw
> yenta_socket crc_itu_t lib80211 rsrc_nonstatic soundcore snd_page_alloc joydev
> pcspkr wmi serio_raw ata_generic pata_acpi i915 drm i2c_algo_bit i2c_core video
> output [last unloaded: scsi_wait_scan]                                          
> Pid: 2418, comm: S58ntpd Not tainted 2.6.29-16.fc10.i686.PAE #1                 
> Call Trace:                                                                     
>  [<c04396d1>] warn_slowpath+0x7c/0xbd                                           
>  [<c0457fe1>] ? register_lock_class+0x17/0x290                                  
>  [<c0458d61>] ? mark_lock+0x1e/0x349                                            
>  [<c0556448>] ? _raw_spin_unlock+0x74/0x78                                      
>  [<c0458d61>] ? mark_lock+0x1e/0x349                                            
>  [<c055a060>] ? check_sync+0x37/0x341                                           
>  [<c055a112>] check_sync+0xe9/0x341                                             
>  [<c0711245>] ? _spin_unlock_irqrestore+0x45/0x55                               
>  [<c04592db>] ? trace_hardirqs_on+0xb/0xd                                       
>  [<c055a4d1>] debug_dma_sync_single_for_device+0x2f/0x39                        
>  [<f828f722>] dma_sync_single_for_device+0x4a/0x59 [b44]                        
>  [<f828f76f>] ssb_dma_sync_single_for_device+0x3e/0x48 [b44]                    
>  [<f8291d1e>] b44_recycle_rx+0x18c/0x196 [b44]                                  
>  [<f8291f9f>] b44_poll+0x277/0x3c0 [b44]                                        
>  [<c0687bb9>] net_rx_action+0xa1/0x1ca                                          
>  [<c043e30a>] __do_softirq+0x9d/0x154                                           
>  [<c043e413>] do_softirq+0x52/0x7e                                              
>  [<c043e56f>] irq_exit+0x49/0x77                                                
>  [<c040b22e>] do_IRQ+0x97/0xad                                                  
>  [<c0409dac>] common_interrupt+0x2c/0x34                                        

This would appear to be reporting a bug in b44's DMA API usage.  See
the newly-added documentation in Documentation/DMA-API.txt, starting
with

	Part III - Debug drivers use of the DMA-API

The line numbers have changed, but it is:

		err_printk(ref->dev, NULL, "DMA-API: device driver tries "
			   "to free DMA memory it has not allocated "
			   "[device address=0x%016llx] [size=%llu bytes]\n",
			   ref->dev_addr, ref->size);



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Bugme-new] [Bug 12969] New: WARNING: at lib/dma-debug.c:539 check_sync+0xe9/0x341() (Not tainted)
  2009-04-01 23:50 ` [Bugme-new] [Bug 12969] New: WARNING: at lib/dma-debug.c:539 check_sync+0xe9/0x341() (Not tainted) Andrew Morton
@ 2009-04-03  2:23   ` Sergio Monteiro Basto
  2009-04-03  9:57     ` Joerg Roedel
       [not found]   ` <66E4AD309580E34AA457975F33D2A7473FBC6A35EE@IRVEXCHCCR01.corp.ad.broadcom.com>
  2009-04-07 14:31   ` Sergio Monteiro Basto
  2 siblings, 1 reply; 8+ messages in thread
From: Sergio Monteiro Basto @ 2009-04-03  2:23 UTC (permalink / raw)
  To: Andrew Morton; +Cc: zambrano, bugme-daemon, netdev, Joerg Roedel

[-- Attachment #1: Type: text/plain, Size: 4873 bytes --]

On Wed, 2009-04-01 at 16:50 -0700, Andrew Morton wrote:
> (switched to email.  Please respond via emailed reply-to-all, not via the
> bugzilla web interface).
> 
> On Sun, 29 Mar 2009 11:43:19 GMT
> bugzilla-daemon@bugzilla.kernel.org wrote:
> 
> > http://bugzilla.kernel.org/show_bug.cgi?id=12969
> > 
> >            Summary: WARNING: at lib/dma-debug.c:539
> >                     check_sync+0xe9/0x341() (Not tainted)
> >            Product: Drivers
> >            Version: 2.5
> >           Platform: All
> >         OS/Version: Linux
> >               Tree: Fedora
> >             Status: NEW
> >           Severity: normal
> >           Priority: P1
> >          Component: Network
> >         AssignedTo: drivers_network@kernel-bugs.osdl.org
> >         ReportedBy: sergio@sergiomb.no-ip.org
> >         Regression: Yes
> > 
> > 
> > ------------[ cut here ]------------                                            
> > WARNING: at lib/dma-debug.c:539 check_sync+0xe9/0x341() (Not tainted)           
> > Hardware name: HP Compaq nx6110 (PY501EA#AB9)                                   
> > b44 0000:02:0e.0: DMA-API: device driver tries to sync DMA memory it has not
> > allocated [device address=0x0000000075941040] [size=1566 bytes]  
> > Modules linked in: llc bnep l2cap bluetooth autofs4 lm90 hwmon i2c_i801 sunrpc
> > ipv6 cpufreq_ondemand acpi_cpufreq uinput snd_intel8x0m snd_intel8x0
> > snd_ac97_codec snd_seq_dummy ac97_bus snd_seq_oss snd_seq_midi_event snd_seq
> > snd_seq_device snd_pcm_oss snd_mixer_oss snd_pcm b44 ssb firewire_ohci
> > snd_timer ipw2200 iTCO_wdt mii firewire_core snd iTCO_vendor_support libipw
> > yenta_socket crc_itu_t lib80211 rsrc_nonstatic soundcore snd_page_alloc joydev
> > pcspkr wmi serio_raw ata_generic pata_acpi i915 drm i2c_algo_bit i2c_core video
> > output [last unloaded: scsi_wait_scan]                                          
> > Pid: 2418, comm: S58ntpd Not tainted 2.6.29-16.fc10.i686.PAE #1                 
> > Call Trace:                                                                     
> >  [<c04396d1>] warn_slowpath+0x7c/0xbd                                           
> >  [<c0457fe1>] ? register_lock_class+0x17/0x290                                  
> >  [<c0458d61>] ? mark_lock+0x1e/0x349                                            
> >  [<c0556448>] ? _raw_spin_unlock+0x74/0x78                                      
> >  [<c0458d61>] ? mark_lock+0x1e/0x349                                            
> >  [<c055a060>] ? check_sync+0x37/0x341                                           
> >  [<c055a112>] check_sync+0xe9/0x341                                             
> >  [<c0711245>] ? _spin_unlock_irqrestore+0x45/0x55                               
> >  [<c04592db>] ? trace_hardirqs_on+0xb/0xd                                       
> >  [<c055a4d1>] debug_dma_sync_single_for_device+0x2f/0x39                        
> >  [<f828f722>] dma_sync_single_for_device+0x4a/0x59 [b44]                        
> >  [<f828f76f>] ssb_dma_sync_single_for_device+0x3e/0x48 [b44]                    
> >  [<f8291d1e>] b44_recycle_rx+0x18c/0x196 [b44]                                  
> >  [<f8291f9f>] b44_poll+0x277/0x3c0 [b44]                                        
> >  [<c0687bb9>] net_rx_action+0xa1/0x1ca                                          
> >  [<c043e30a>] __do_softirq+0x9d/0x154                                           
> >  [<c043e413>] do_softirq+0x52/0x7e                                              
> >  [<c043e56f>] irq_exit+0x49/0x77                                                
> >  [<c040b22e>] do_IRQ+0x97/0xad                                                  
> >  [<c0409dac>] common_interrupt+0x2c/0x34                                        
> 
> This would appear to be reporting a bug in b44's DMA API usage.  

Hi!, are you saying that could be a bug in new DMA-API ? (if we have
one) 

I don't had problems before with this b44 and laptop is not new.
With kernel 2.6.29, I am testing KMS on new drm/dri Intel video, I also
have one big warning with i915 reported on
Bug 12419 - possible circular locking dependency on i915 dma.

What I would like to know is :  
Could bug 12419 make this warning on b44 ? or could DMA-API make the 2
warnings ? or the 2 warnings are completed different ? and the
combinations of this questions :)    


Thanks, 
> See
> the newly-added documentation in Documentation/DMA-API.txt, starting
> with
> 
> 	Part III - Debug drivers use of the DMA-API
> 
> The line numbers have changed, but it is:
> 
> 		err_printk(ref->dev, NULL, "DMA-API: device driver tries "
> 			   "to free DMA memory it has not allocated "
> 			   "[device address=0x%016llx] [size=%llu bytes]\n",
> 			   ref->dev_addr, ref->size);
> 
> 
-- 
Sérgio M. B.

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 2192 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Bugme-new] [Bug 12969] New: WARNING: at lib/dma-debug.c:539 check_sync+0xe9/0x341() (Not tainted)
  2009-04-03  2:23   ` Sergio Monteiro Basto
@ 2009-04-03  9:57     ` Joerg Roedel
  0 siblings, 0 replies; 8+ messages in thread
From: Joerg Roedel @ 2009-04-03  9:57 UTC (permalink / raw)
  To: Sergio Monteiro Basto; +Cc: Andrew Morton, zambrano, bugme-daemon, netdev

On Fri, Apr 03, 2009 at 03:23:39AM +0100, Sergio Monteiro Basto wrote:
> > > ------------[ cut here ]------------                                            
> > > WARNING: at lib/dma-debug.c:539 check_sync+0xe9/0x341() (Not tainted)           
> > > Hardware name: HP Compaq nx6110 (PY501EA#AB9)                                   
> > > b44 0000:02:0e.0: DMA-API: device driver tries to sync DMA memory it has not
> > > allocated [device address=0x0000000075941040] [size=1566 bytes]  
> > > Modules linked in: llc bnep l2cap bluetooth autofs4 lm90 hwmon i2c_i801 sunrpc
> > > ipv6 cpufreq_ondemand acpi_cpufreq uinput snd_intel8x0m snd_intel8x0
> > > snd_ac97_codec snd_seq_dummy ac97_bus snd_seq_oss snd_seq_midi_event snd_seq
> > > snd_seq_device snd_pcm_oss snd_mixer_oss snd_pcm b44 ssb firewire_ohci
> > > snd_timer ipw2200 iTCO_wdt mii firewire_core snd iTCO_vendor_support libipw
> > > yenta_socket crc_itu_t lib80211 rsrc_nonstatic soundcore snd_page_alloc joydev
> > > pcspkr wmi serio_raw ata_generic pata_acpi i915 drm i2c_algo_bit i2c_core video
> > > output [last unloaded: scsi_wait_scan]                                          
> > > Pid: 2418, comm: S58ntpd Not tainted 2.6.29-16.fc10.i686.PAE #1                 
> > > Call Trace:                                                                     
> > >  [<c04396d1>] warn_slowpath+0x7c/0xbd                                           
> > >  [<c0457fe1>] ? register_lock_class+0x17/0x290                                  
> > >  [<c0458d61>] ? mark_lock+0x1e/0x349                                            
> > >  [<c0556448>] ? _raw_spin_unlock+0x74/0x78                                      
> > >  [<c0458d61>] ? mark_lock+0x1e/0x349                                            
> > >  [<c055a060>] ? check_sync+0x37/0x341                                           
> > >  [<c055a112>] check_sync+0xe9/0x341                                             
> > >  [<c0711245>] ? _spin_unlock_irqrestore+0x45/0x55                               
> > >  [<c04592db>] ? trace_hardirqs_on+0xb/0xd                                       
> > >  [<c055a4d1>] debug_dma_sync_single_for_device+0x2f/0x39                        
> > >  [<f828f722>] dma_sync_single_for_device+0x4a/0x59 [b44]                        
> > >  [<f828f76f>] ssb_dma_sync_single_for_device+0x3e/0x48 [b44]                    
> > >  [<f8291d1e>] b44_recycle_rx+0x18c/0x196 [b44]                                  
> > >  [<f8291f9f>] b44_poll+0x277/0x3c0 [b44]                                        
> > >  [<c0687bb9>] net_rx_action+0xa1/0x1ca                                          
> > >  [<c043e30a>] __do_softirq+0x9d/0x154                                           
> > >  [<c043e413>] do_softirq+0x52/0x7e                                              
> > >  [<c043e56f>] irq_exit+0x49/0x77                                                
> > >  [<c040b22e>] do_IRQ+0x97/0xad                                                  
> > >  [<c0409dac>] common_interrupt+0x2c/0x34                                        
> > 
> > This would appear to be reporting a bug in b44's DMA API usage.  
> 
> Hi!, are you saying that could be a bug in new DMA-API ? (if we have
> one)

We don't have a new DMA-API. I wrote a piece of code which checks if drivers
use the DMA-API as expected.

> I don't had problems before with this b44 and laptop is not new.

Most things we check for typically have no impact when there is no hardware
IOMMU. The purpose of this debugging code is to find those bugs even without an
hardware IOMMU in the system.

> With kernel 2.6.29, I am testing KMS on new drm/dri Intel video, I also
> have one big warning with i915 reported on
> Bug 12419 - possible circular locking dependency on i915 dma.
> 
> What I would like to know is :  
> Could bug 12419 make this warning on b44 ? or could DMA-API make the 2
> warnings ? or the 2 warnings are completed different ? and the
> combinations of this questions :)

It is hard to imagine that these two bugs have something to do with each other.
The bugzilla entry is a warning about a locking problem and the DMA-API
debugging code warns about wrong usage of the DMA-API.

	Joerg

-- 
           | Advanced Micro Devices GmbH
 Operating | Karl-Hammerschmidt-Str. 34, 85609 Dornach bei München
 System    | 
 Research  | Geschäftsführer: Jochen Polster, Thomas M. McCoy, Giuliano Meroni
 Center    | Sitz: Dornach, Gemeinde Aschheim, Landkreis München
           | Registergericht München, HRB Nr. 43632


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Bugme-new] [Bug 12969] New: WARNING: at lib/dma-debug.c:539 check_sync+0xe9/0x341() (Not tainted)
       [not found]   ` <66E4AD309580E34AA457975F33D2A7473FBC6A35EE@IRVEXCHCCR01.corp.ad.broadcom.com>
@ 2009-04-03 10:01     ` Michael Buesch
  0 siblings, 0 replies; 8+ messages in thread
From: Michael Buesch @ 2009-04-03 10:01 UTC (permalink / raw)
  To: Gary Zambrano; +Cc: Andrew Morton, netdev, bugzilla-daemon

> > ------------[ cut here ]------------                                            
> > WARNING: at lib/dma-debug.c:539 check_sync+0xe9/0x341() (Not tainted)           
> > Hardware name: HP Compaq nx6110 (PY501EA#AB9)                                   
> > b44 0000:02:0e.0: DMA-API: device driver tries to sync DMA memory it has not
> > allocated [device address=0x0000000075941040] [size=1566 bytes]  
> > Modules linked in: llc bnep l2cap bluetooth autofs4 lm90 hwmon i2c_i801 sunrpc
> > ipv6 cpufreq_ondemand acpi_cpufreq uinput snd_intel8x0m snd_intel8x0
> > snd_ac97_codec snd_seq_dummy ac97_bus snd_seq_oss snd_seq_midi_event snd_seq
> > snd_seq_device snd_pcm_oss snd_mixer_oss snd_pcm b44 ssb firewire_ohci
> > snd_timer ipw2200 iTCO_wdt mii firewire_core snd iTCO_vendor_support libipw
> > yenta_socket crc_itu_t lib80211 rsrc_nonstatic soundcore snd_page_alloc joydev
> > pcspkr wmi serio_raw ata_generic pata_acpi i915 drm i2c_algo_bit i2c_core video
> > output [last unloaded: scsi_wait_scan]                                          
> > Pid: 2418, comm: S58ntpd Not tainted 2.6.29-16.fc10.i686.PAE #1                 
> > Call Trace:                                                                     
> >  [<c04396d1>] warn_slowpath+0x7c/0xbd                                           
> >  [<c0457fe1>] ? register_lock_class+0x17/0x290                                  
> >  [<c0458d61>] ? mark_lock+0x1e/0x349                                            
> >  [<c0556448>] ? _raw_spin_unlock+0x74/0x78                                      
> >  [<c0458d61>] ? mark_lock+0x1e/0x349                                            
> >  [<c055a060>] ? check_sync+0x37/0x341                                           
> >  [<c055a112>] check_sync+0xe9/0x341                                             
> >  [<c0711245>] ? _spin_unlock_irqrestore+0x45/0x55                               
> >  [<c04592db>] ? trace_hardirqs_on+0xb/0xd                                       
> >  [<c055a4d1>] debug_dma_sync_single_for_device+0x2f/0x39                        
> >  [<f828f722>] dma_sync_single_for_device+0x4a/0x59 [b44]                        
> >  [<f828f76f>] ssb_dma_sync_single_for_device+0x3e/0x48 [b44]                    
> >  [<f8291d1e>] b44_recycle_rx+0x18c/0x196 [b44]                                  
> >  [<f8291f9f>] b44_poll+0x277/0x3c0 [b44]                                        
> >  [<c0687bb9>] net_rx_action+0xa1/0x1ca                                          
> >  [<c043e30a>] __do_softirq+0x9d/0x154                                           
> >  [<c043e413>] do_softirq+0x52/0x7e                                              
> >  [<c043e56f>] irq_exit+0x49/0x77                                                
> >  [<c040b22e>] do_IRQ+0x97/0xad                                                  
> >  [<c0409dac>] common_interrupt+0x2c/0x34                                        

I don't know if this is related, but the following patch seems to fix some DMA
mapping bug. Can somebody comment who does understand the code better than me?

(completely untested)

Index: wireless-testing/drivers/net/b44.c
===================================================================
--- wireless-testing.orig/drivers/net/b44.c	2009-04-02 23:13:10.000000000 +0200
+++ wireless-testing/drivers/net/b44.c	2009-04-02 23:17:44.000000000 +0200
@@ -703,7 +703,7 @@ static int b44_alloc_rx_skb(struct b44 *
 
 	if (bp->flags & B44_FLAG_RX_RING_HACK)
 		b44_sync_dma_desc_for_device(bp->sdev, bp->rx_ring_dma,
-			                    dest_idx * sizeof(dp),
+			                    dest_idx * sizeof(*dp),
 			                    DMA_BIDIRECTIONAL);
 
 	return RX_PKT_BUF_SZ;
@@ -731,7 +731,7 @@ static void b44_recycle_rx(struct b44 *b
 
 	if (bp->flags & B44_FLAG_RX_RING_HACK)
 		b44_sync_dma_desc_for_cpu(bp->sdev, bp->rx_ring_dma,
-			                 src_idx * sizeof(src_desc),
+			                 src_idx * sizeof(*src_desc),
 			                 DMA_BIDIRECTIONAL);
 
 	ctrl = src_desc->ctrl;
@@ -747,7 +747,7 @@ static void b44_recycle_rx(struct b44 *b
 
 	if (bp->flags & B44_FLAG_RX_RING_HACK)
 		b44_sync_dma_desc_for_device(bp->sdev, bp->rx_ring_dma,
-					     dest_idx * sizeof(dest_desc),
+					     dest_idx * sizeof(*dest_desc),
 					     DMA_BIDIRECTIONAL);
 
 	ssb_dma_sync_single_for_device(bp->sdev, le32_to_cpu(src_desc->addr),


-- 
Greetings, Michael.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Bugme-new] [Bug 12969] New: WARNING: at lib/dma-debug.c:539 check_sync+0xe9/0x341() (Not tainted)
       [not found]   ` <66E4AD309580E34AA457975F33D2A7473FBC6A3626@IRVEXCHCCR01.corp.ad.broadcom.com>
@ 2009-04-06 19:52     ` Michael Buesch
  0 siblings, 0 replies; 8+ messages in thread
From: Michael Buesch @ 2009-04-06 19:52 UTC (permalink / raw)
  To: Gary Zambrano; +Cc: Andrew Morton, David Miller, netdev

Subject: [PATCH] b44: Use kernel DMA addresses for the kernel DMA API

We must not use the device DMA addresses for the kernel DMA API, because
device DMA addresses have an additional offset added for the SSB translation.

Use the original dma_addr_t for the sync operation.

Cc: stable@kernel.org
Signed-off-by: Michael Buesch <mb@bu3sch.de>

---

I could reproduce the bug on my b44 card and this patch fixes it.
Please apply the patch and close the bug. Thanks.


Index: linux-2.6/drivers/net/b44.c
===================================================================
--- linux-2.6.orig/drivers/net/b44.c	2009-04-06 21:47:55.000000000 +0200
+++ linux-2.6/drivers/net/b44.c	2009-04-06 21:50:18.000000000 +0200
@@ -750,7 +750,7 @@
 					     dest_idx * sizeof(*dest_desc),
 					     DMA_BIDIRECTIONAL);
 
-	ssb_dma_sync_single_for_device(bp->sdev, le32_to_cpu(src_desc->addr),
+	ssb_dma_sync_single_for_device(bp->sdev, dest_map->mapping,
 				       RX_PKT_BUF_SZ,
 				       DMA_FROM_DEVICE);
 }


-- 
Greetings, Michael.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Bugme-new] [Bug 12969] New: WARNING: at lib/dma-debug.c:539 check_sync+0xe9/0x341() (Not tainted)
  2009-04-01 23:50 ` [Bugme-new] [Bug 12969] New: WARNING: at lib/dma-debug.c:539 check_sync+0xe9/0x341() (Not tainted) Andrew Morton
  2009-04-03  2:23   ` Sergio Monteiro Basto
       [not found]   ` <66E4AD309580E34AA457975F33D2A7473FBC6A35EE@IRVEXCHCCR01.corp.ad.broadcom.com>
@ 2009-04-07 14:31   ` Sergio Monteiro Basto
  2 siblings, 0 replies; 8+ messages in thread
From: Sergio Monteiro Basto @ 2009-04-07 14:31 UTC (permalink / raw)
  To: Andrew Morton; +Cc: zambrano, bugme-daemon, netdev, Joerg Roedel

[-- Attachment #1: Type: text/plain, Size: 4534 bytes --]


+ b44-use-kernel-dma-addresses-for-the-kernel-dma-api.patch added to -mm
tree

fixes the bug for me 

Thanks, 


On Wed, 2009-04-01 at 16:50 -0700, Andrew Morton wrote:

> On Sun, 29 Mar 2009 11:43:19 GMT
> bugzilla-daemon@bugzilla.kernel.org wrote:
> 
> > http://bugzilla.kernel.org/show_bug.cgi?id=12969
> > 
> >            Summary: WARNING: at lib/dma-debug.c:539
> >                     check_sync+0xe9/0x341() (Not tainted)
> >            Product: Drivers
> >            Version: 2.5
> >           Platform: All
> >         OS/Version: Linux
> >               Tree: Fedora
> >             Status: NEW
> >           Severity: normal
> >           Priority: P1
> >          Component: Network
> >         AssignedTo: drivers_network@kernel-bugs.osdl.org
> >         ReportedBy: sergio@sergiomb.no-ip.org
> >         Regression: Yes
> > 
> > 
> > ------------[ cut
> here ]------------                                            
> > WARNING: at lib/dma-debug.c:539 check_sync+0xe9/0x341() (Not
> tainted)           
> > Hardware name: HP Compaq nx6110
> (PY501EA#AB9)                                   
> > b44 0000:02:0e.0: DMA-API: device driver tries to sync DMA memory it
> has not
> > allocated [device address=0x0000000075941040] [size=1566 bytes]  
> > Modules linked in: llc bnep l2cap bluetooth autofs4 lm90 hwmon
> i2c_i801 sunrpc
> > ipv6 cpufreq_ondemand acpi_cpufreq uinput snd_intel8x0m snd_intel8x0
> > snd_ac97_codec snd_seq_dummy ac97_bus snd_seq_oss snd_seq_midi_event
> snd_seq
> > snd_seq_device snd_pcm_oss snd_mixer_oss snd_pcm b44 ssb
> firewire_ohci
> > snd_timer ipw2200 iTCO_wdt mii firewire_core snd iTCO_vendor_support
> libipw
> > yenta_socket crc_itu_t lib80211 rsrc_nonstatic soundcore
> snd_page_alloc joydev
> > pcspkr wmi serio_raw ata_generic pata_acpi i915 drm i2c_algo_bit
> i2c_core video
> > output [last unloaded:
> scsi_wait_scan]                                          
> > Pid: 2418, comm: S58ntpd Not tainted 2.6.29-16.fc10.i686.PAE
> #1                 
> > Call
> Trace:                                                                     
> >  [<c04396d1>] warn_slowpath
> +0x7c/0xbd                                           
> >  [<c0457fe1>] ? register_lock_class
> +0x17/0x290                                  
> >  [<c0458d61>] ? mark_lock
> +0x1e/0x349                                            
> >  [<c0556448>] ? _raw_spin_unlock
> +0x74/0x78                                      
> >  [<c0458d61>] ? mark_lock
> +0x1e/0x349                                            
> >  [<c055a060>] ? check_sync
> +0x37/0x341                                           
> >  [<c055a112>] check_sync
> +0xe9/0x341                                             
> >  [<c0711245>] ? _spin_unlock_irqrestore
> +0x45/0x55                               
> >  [<c04592db>] ? trace_hardirqs_on
> +0xb/0xd                                       
> >  [<c055a4d1>] debug_dma_sync_single_for_device
> +0x2f/0x39                        
> >  [<f828f722>] dma_sync_single_for_device+0x4a/0x59
> [b44]                        
> >  [<f828f76f>] ssb_dma_sync_single_for_device+0x3e/0x48
> [b44]                    
> >  [<f8291d1e>] b44_recycle_rx+0x18c/0x196
> [b44]                                  
> >  [<f8291f9f>] b44_poll+0x277/0x3c0
> [b44]                                        
> >  [<c0687bb9>] net_rx_action
> +0xa1/0x1ca                                          
> >  [<c043e30a>] __do_softirq
> +0x9d/0x154                                           
> >  [<c043e413>] do_softirq
> +0x52/0x7e                                              
> >  [<c043e56f>] irq_exit
> +0x49/0x77                                                
> >  [<c040b22e>] do_IRQ
> +0x97/0xad                                                  
> >  [<c0409dac>] common_interrupt
> +0x2c/0x34                                        
> 
> This would appear to be reporting a bug in b44's DMA API usage.  See
> the newly-added documentation in Documentation/DMA-API.txt, starting
> with
> 
>         Part III - Debug drivers use of the DMA-API
> 
> The line numbers have changed, but it is:
> 
>                 err_printk(ref->dev, NULL, "DMA-API: device driver
> tries "
>                            "to free DMA memory it has not allocated "
>                            "[device address=0x%016llx] [size=%llu
> bytes]\n",
>                            ref->dev_addr, ref->size);
> 
-- 
Sérgio M. B.

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 2192 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Bugme-new, Bug, 12969] New: WARNING: at lib/dma-debug.c:539 check_sync+0xe9/0x341() (Not tainted)
  2009-04-04 23:49 [Bugme-new, Bug, " David Miller
@ 2009-04-05 10:03 ` Michael Buesch
  0 siblings, 0 replies; 8+ messages in thread
From: Michael Buesch @ 2009-04-05 10:03 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

On Sunday 05 April 2009 01:49:09 David Miller wrote:
> 
> Michael, your b44 patch definitely looks correct.
> 
> Aplied, thanks!

Thanks Dave.

I'll try later if I can reproduce the check_sync warning on my card.

-- 
Greetings, Michael.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bugme-new, Bug, 12969] New: WARNING: at lib/dma-debug.c:539 check_sync+0xe9/0x341() (Not tainted)
@ 2009-04-04 23:49 David Miller
  2009-04-05 10:03 ` Michael Buesch
  0 siblings, 1 reply; 8+ messages in thread
From: David Miller @ 2009-04-04 23:49 UTC (permalink / raw)
  To: mb; +Cc: netdev


Michael, your b44 patch definitely looks correct.

Aplied, thanks!

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-04-07 14:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-12969-10286@http.bugzilla.kernel.org/>
2009-04-01 23:50 ` [Bugme-new] [Bug 12969] New: WARNING: at lib/dma-debug.c:539 check_sync+0xe9/0x341() (Not tainted) Andrew Morton
2009-04-03  2:23   ` Sergio Monteiro Basto
2009-04-03  9:57     ` Joerg Roedel
     [not found]   ` <66E4AD309580E34AA457975F33D2A7473FBC6A35EE@IRVEXCHCCR01.corp.ad.broadcom.com>
2009-04-03 10:01     ` Michael Buesch
2009-04-07 14:31   ` Sergio Monteiro Basto
     [not found] ` <20090402114402.a89b956d.akpm@linux-foundation.org>
     [not found]   ` <66E4AD309580E34AA457975F33D2A7473FBC6A3626@IRVEXCHCCR01.corp.ad.broadcom.com>
2009-04-06 19:52     ` Michael Buesch
2009-04-04 23:49 [Bugme-new, Bug, " David Miller
2009-04-05 10:03 ` Michael Buesch

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.