NetBSD Problem Report #49328

From www@NetBSD.org  Mon Oct 27 20:10:31 2014
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 13EA4A660A
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 27 Oct 2014 20:10:31 +0000 (UTC)
Message-Id: <20141027201029.407C1A6661@mollari.NetBSD.org>
Date: Mon, 27 Oct 2014 20:10:29 +0000 (UTC)
From: 6bone@6bone.informatik.uni-leipzig.de
Reply-To: 6bone@6bone.informatik.uni-leipzig.de
To: gnats-bugs@NetBSD.org
Subject: ixg interface fails with enabled LOCKDEBUG
X-Send-Pr-Version: www-1.0

>Number:         49328
>Category:       kern
>Synopsis:       ixg interface fails with enabled LOCKDEBUG
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 27 20:15:00 +0000 2014
>Closed-Date:    Tue Feb 17 14:54:18 +0000 2015
>Last-Modified:  Tue Feb 24 10:45:00 +0000 2015
>Originator:     Uwe Toenjes
>Release:        NetBSD 7.0_BETA
>Organization:
University of Leipzig
>Environment:
NetBSD gate.ipv6.uni-leipzig.de 7.0_BETA NetBSD 7.0_BETA (MYCONF7) #1: Tue Oct 21 22:07:17 CEST 2014  root@gate.ipv6.uni-leipzig.de:/usr/obj/sys/arch/amd64/compile/MYCONF7 amd64
>Description:
If the kernel is compiled with debug code, the kernel crashes if an ixg interface comes up. The kernel reports:

panic: LOCKDEBUG: Mutex error: lockdebug_barrier: spin lock held

I screenshot can be found at:  https://ftp.ipv6.uni-leipzig.de/netbsd/panic.png
>How-To-Repeat:
Compile the kernel with debug code and bring up an ixg interface
>Fix:

>Release-Note:

>Audit-Trail:
From: 6bone@6bone.informatik.uni-leipzig.de
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/49328: ixg interface fails with enabled LOCKDEBUG
Date: Tue, 23 Dec 2014 13:52:35 +0100 (CET)

 for completeness I send the trace file:

 panic: LOCKDEBUG: Mutex error: lockdebug_barrier: spin lock held
 cpu0: Begin traceback...
 vpanic() at netbsd:vpanic+0x13c
 snprintf() at netbsd:snprintf
 lockdebug_more() at netbsd:lockdebug_more
 assert_sleepable() at netbsd:assert_sleepable+0x25
 pool_cache_get_paddr() at netbsd:pool_cache_get_paddr+0x168
 kmem_intr_alloc() at netbsd:kmem_intr_alloc+0x6f
 kmem_intr_zalloc() at netbsd:kmem_intr_zalloc+0xf
 ixgbe_jcl_reinit() at netbsd:ixgbe_jcl_reinit+0x124
 ixgbe_init_locked() at netbsd:ixgbe_init_locked+0x510
 ixgbe_init() at netbsd:ixgbe_init+0x22
 ether_ioctl() at netbsd:ether_ioctl+0xca
 ixgbe_ioctl() at netbsd:ixgbe_ioctl+0x41
 in6_update_ifa1() at netbsd:in6_update_ifa1+0x709
 in6_update_ifa() at netbsd:in6_update_ifa+0x36
 in6_ifattach_linklocal() at netbsd:in6_ifattach_linklocal+0x2eb
 in6_ifattach() at netbsd:in6_ifattach+0x15d
 in6_if_up() at netbsd:in6_if_up+0xf
 ifioctl_common() at netbsd:ifioctl_common+0x343
 ether_ioctl() at netbsd:ether_ioctl+0x164
 ixgbe_ioctl() at netbsd:ixgbe_ioctl+0x41
 doifioctl() at netbsd:doifioctl+0x2f1
 soo_ioctl() at netbsd:soo_ioctl+0x2af
 sys_ioctl() at netbsd:sys_ioctl+0x17e
 syscall() at netbsd:syscall+0x9a
 --- syscall (number 54) ---
 7f7ff6cd0a3a:
 cpu0: End traceback...

 dumping to dev 4,1 (offset=4589228, size=8388066):
 dump

From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/49328 CVS commit: src/sys/dev/pci/ixgbe
Date: Tue, 27 Jan 2015 19:30:25 -0500

 Module Name:	src
 Committed By:	christos
 Date:		Wed Jan 28 00:30:25 UTC 2015

 Modified Files:
 	src/sys/dev/pci/ixgbe: ixgbe_netbsd.c

 Log Message:
 PR/49328: Uwe Toenjes: This driver allocates memory always with NOWAIT, except
 in the NetBSD-specific code. This happens from ioctl, and usually there is
 enough memory there since we just freed our resources and we are getting them
 back. We could even check and not do it again if sizes did not change, but
 this is how the rest of the code is structured so we follow suit.
 XXX: pullup-7


 To generate a diff of this commit:
 cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/ixgbe/ixgbe_netbsd.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: 6bone@6bone.informatik.uni-leipzig.de
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: PR/49328 CVS commit: src/sys/dev/pci/ixgbe
Date: Fri, 30 Jan 2015 09:01:50 +0100 (CET)

 On Wed, 28 Jan 2015, Christos Zoulas wrote:
 >
 > To generate a diff of this commit:
 > cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/ixgbe/ixgbe_netbsd.c
 >

 I have the patch generated and applied to the netbsd-7 kernel. The problem 
 is not solved.

 If it helps, I can offer the complete dump for download.


 ### new dump with applied patch - kernel netbsd-7 ###

 panic: LOCKDEBUG: Mutex error: lockdebug_barrier: spin lock held
 cpu7: Begin traceback...
 vpanic() at netbsd:vpanic+0x13c
 snprintf() at netbsd:snprintf
 lockdebug_more() at netbsd:lockdebug_more
 mutex_enter() at netbsd:mutex_enter+0x45e
 uvm_km_check_empty() at netbsd:uvm_km_check_empty+0x74
 uvm_map() at netbsd:uvm_map+0x182
 uvm_km_alloc() at netbsd:uvm_km_alloc+0xec
 _bus_dmamem_map.isra.7() at netbsd:_bus_dmamem_map.isra.7+0x69
 ixgbe_jcl_reinit() at netbsd:ixgbe_jcl_reinit+0x180
 ixgbe_init_locked() at netbsd:ixgbe_init_locked+0x510
 ixgbe_init() at netbsd:ixgbe_init+0x22
 ether_ioctl() at netbsd:ether_ioctl+0xca
 ixgbe_ioctl() at netbsd:ixgbe_ioctl+0x41
 in6_update_ifa1() at netbsd:in6_update_ifa1+0x709
 in6_update_ifa() at netbsd:in6_update_ifa+0x36
 in6_ifattach_linklocal() at netbsd:in6_ifattach_linklocal+0x2eb
 in6_ifattach() at netbsd:in6_ifattach+0x15d
 in6_if_up() at netbsd:in6_if_up+0xf
 ifioctl_common() at netbsd:ifioctl_common+0x343
 ether_ioctl() at netbsd:ether_ioctl+0x164
 ixgbe_ioctl() at netbsd:ixgbe_ioctl+0x41
 doifioctl() at netbsd:doifioctl+0x2f1
 soo_ioctl() at netbsd:soo_ioctl+0x2af
 sys_ioctl() at netbsd:sys_ioctl+0x17e
 syscall() at netbsd:syscall+0x9a
 --- syscall (number 54) ---
 7f7ff6cd0a3a:
 cpu7: End traceback...

 dumping to dev 4,1 (offset=4589228, size=8388066):
 dump

From: christos@zoulas.com (Christos Zoulas)
To: 6bone@6bone.informatik.uni-leipzig.de, gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org, 
	netbsd-bugs@netbsd.org
Subject: Re: PR/49328 CVS commit: src/sys/dev/pci/ixgbe
Date: Fri, 30 Jan 2015 07:44:50 -0500

 On Jan 30,  9:01am, 6bone@6bone.informatik.uni-leipzig.de (6bone@6bone.informatik.uni-leipzig.de) wrote:
 -- Subject: Re: PR/49328 CVS commit: src/sys/dev/pci/ixgbe

 | On Wed, 28 Jan 2015, Christos Zoulas wrote:
 | >
 | > To generate a diff of this commit:
 | > cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/ixgbe/ixgbe_netbsd.c
 | >
 | 
 | I have the patch generated and applied to the netbsd-7 kernel. The problem 
 | is not solved.

 Add this to it:

 christos

 Index: uvm_map.c
 ===================================================================
 RCS file: /cvsroot/src/sys/uvm/uvm_map.c,v
 retrieving revision 1.331
 diff -u -u -r1.331 uvm_map.c
 --- uvm_map.c	26 Oct 2014 01:42:07 -0000	1.331
 +++ uvm_map.c	30 Jan 2015 12:43:58 -0000
 @@ -1078,7 +1078,7 @@
  	}

  #if defined(DEBUG)
 -	if (!error && VM_MAP_IS_KERNEL(map)) {
 +	if (!error && VM_MAP_IS_KERNEL(map) && (flags & UVM_FLAG_NOWAIT) == 0) {
  		uvm_km_check_empty(map, *startp, *startp + size);
  	}
  #endif /* defined(DEBUG) */
 @@ -2253,7 +2253,7 @@
  			}
  		}

 -		if (VM_MAP_IS_KERNEL(map)) {
 +		if (VM_MAP_IS_KERNEL(map) && (flags & UVM_FLAG_NOWAIT) == 0) {
  			uvm_km_check_empty(map, entry->start,
  			    entry->end);
  		}

From: 6bone@6bone.informatik.uni-leipzig.de
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: PR/49328 CVS commit: src/sys/dev/pci/ixgbe
Date: Sun, 1 Feb 2015 17:18:33 +0100 (CET)

 On Fri, 30 Jan 2015, Christos Zoulas wrote:

 > Add this to it:
 >
 > christos
 >
 > Index: uvm_map.c

 The problem is not solved. The crash dump is slightly different from the 
 last one.

 Uwe

 panic: LOCKDEBUG: Mutex error: lockdebug_barrier: spin lock held
 cpu7: Begin traceback...
 vpanic() at netbsd:vpanic+0x13c
 snprintf() at netbsd:snprintf
 lockdebug_more() at netbsd:lockdebug_more
 mutex_enter() at netbsd:mutex_enter+0x45e
 pmap_growkernel() at netbsd:pmap_growkernel+0x2d
 uvm_map_prepare() at netbsd:uvm_map_prepare+0x260
 uvm_map() at netbsd:uvm_map+0x97
 uvm_km_alloc() at netbsd:uvm_km_alloc+0xec
 _bus_dmamem_map.isra.7() at netbsd:_bus_dmamem_map.isra.7+0x69
 ixgbe_jcl_reinit() at netbsd:ixgbe_jcl_reinit+0x180
 ixgbe_init_locked() at netbsd:ixgbe_init_locked+0x510
 ixgbe_init() at netbsd:ixgbe_init+0x22
 ether_ioctl() at netbsd:ether_ioctl+0xca
 ixgbe_ioctl() at netbsd:ixgbe_ioctl+0x41
 in6_update_ifa1() at netbsd:in6_update_ifa1+0x709
 in6_update_ifa() at netbsd:in6_update_ifa+0x36
 in6_ifattach_linklocal() at netbsd:in6_ifattach_linklocal+0x2eb
 in6_ifattach() at netbsd:in6_ifattach+0x15d
 in6_if_up() at netbsd:in6_if_up+0xf
 ifioctl_common() at netbsd:ifioctl_common+0x343
 ether_ioctl() at netbsd:ether_ioctl+0x164
 ixgbe_ioctl() at netbsd:ixgbe_ioctl+0x41
 doifioctl() at netbsd:doifioctl+0x2f1
 soo_ioctl() at netbsd:soo_ioctl+0x2af
 sys_ioctl() at netbsd:sys_ioctl+0x17e
 syscall() at netbsd:syscall+0x9a
 --- syscall (number 54) ---
 7f7ff6cd0a3a:
 cpu7: End traceback...

 dumping to dev 4,1 (offset=4589228, size=8388066):
 dump

From: christos@zoulas.com (Christos Zoulas)
To: 6bone@6bone.informatik.uni-leipzig.de, gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org, 
	netbsd-bugs@netbsd.org
Subject: Re: PR/49328 CVS commit: src/sys/dev/pci/ixgbe
Date: Sun, 1 Feb 2015 11:30:57 -0500

 On Feb 1,  5:18pm, 6bone@6bone.informatik.uni-leipzig.de (6bone@6bone.informatik.uni-leipzig.de) wrote:
 -- Subject: Re: PR/49328 CVS commit: src/sys/dev/pci/ixgbe

 | On Fri, 30 Jan 2015, Christos Zoulas wrote:
 | 
 | > Add this to it:
 | >
 | > christos
 | >
 | > Index: uvm_map.c
 | 
 | The problem is not solved. The crash dump is slightly different from the 
 | last one.

 Yes, and my plan is to first fix the NOSLEEP allocation issues and then
 fix the driver so it does not do the deallocation/allocation needlessly.
 Here's the next patch for the first target...

 Index: uvm_map.c
 ===================================================================
 RCS file: /cvsroot/src/sys/uvm/uvm_map.c,v
 retrieving revision 1.332
 diff -u -u -r1.332 uvm_map.c
 --- uvm_map.c	23 Jan 2015 16:13:53 -0000	1.332
 +++ uvm_map.c	1 Feb 2015 16:29:46 -0000
 @@ -1182,8 +1182,10 @@
  	 * If the kernel pmap can't map the requested space,
  	 * then allocate more resources for it.
  	 */
 -	if (map == kernel_map && uvm_maxkaddr < (start + size))
 -		uvm_maxkaddr = pmap_growkernel(start + size);
 +	if (map == kernel_map && uvm_maxkaddr < (start + size)) {
 +		if (flags & UVM_FLAG_NOWAIT == 0)
 +			uvm_maxkaddr = pmap_growkernel(start + size);
 +	}
  #endif

  	UVMMAP_EVCNT_INCR(map_call);

From: 6bone@6bone.informatik.uni-leipzig.de
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: PR/49328 CVS commit: src/sys/dev/pci/ixgbe
Date: Sun, 1 Feb 2015 18:12:39 +0100 (CET)

 On Sun, 1 Feb 2015, Christos Zoulas wrote:

 > Yes, and my plan is to first fix the NOSLEEP allocation issues and then
 > fix the driver so it does not do the deallocation/allocation needlessly.
 > Here's the next patch for the first target...

 I see.

 > Index: uvm_map.c
 > ===================================================================

 --- uvm_map.o ---
 /usr/src/sys/uvm/uvm_map.c: In function 'uvm_map_prepare':
 /usr/src/sys/uvm/uvm_map.c:1186:3: error: suggest parentheses around 
 comparison
 in operand of '&' [-Werror=parentheses]
     if (flags & UVM_FLAG_NOWAIT == 0)
     ^
 cc1: all warnings being treated as errors
 *** [uvm_map.o] Error code 1

From: Chuck Silvers <chuq@chuq.com>
To: Christos Zoulas <christos@zoulas.com>
Cc: 6bone@6bone.informatik.uni-leipzig.de, gnats-bugs@NetBSD.org,
	kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
	netbsd-bugs@netbsd.org
Subject: Re: PR/49328 CVS commit: src/sys/dev/pci/ixgbe
Date: Sun, 1 Feb 2015 09:33:46 -0800

 On Sun, Feb 01, 2015 at 11:30:57AM -0500, Christos Zoulas wrote:
 > Yes, and my plan is to first fix the NOSLEEP allocation issues and then
 > fix the driver so it does not do the deallocation/allocation needlessly.
 > Here's the next patch for the first target...
 > 
 > Index: uvm_map.c
 > ===================================================================
 > RCS file: /cvsroot/src/sys/uvm/uvm_map.c,v
 > retrieving revision 1.332
 > diff -u -u -r1.332 uvm_map.c
 > --- uvm_map.c	23 Jan 2015 16:13:53 -0000	1.332
 > +++ uvm_map.c	1 Feb 2015 16:29:46 -0000
 > @@ -1182,8 +1182,10 @@
 >  	 * If the kernel pmap can't map the requested space,
 >  	 * then allocate more resources for it.
 >  	 */
 > -	if (map == kernel_map && uvm_maxkaddr < (start + size))
 > -		uvm_maxkaddr = pmap_growkernel(start + size);
 > +	if (map == kernel_map && uvm_maxkaddr < (start + size)) {
 > +		if (flags & UVM_FLAG_NOWAIT == 0)
 > +			uvm_maxkaddr = pmap_growkernel(start + size);
 > +	}
 >  #endif
 >  
 >  	UVMMAP_EVCNT_INCR(map_call);


 that is not legal.  pmap_growkernel() is not optional for kmem allocations
 which increase the maximum kmem address in use.

 and before you try to dive in and make a nowait version of pmap_growkernel(),
 let's discuss if that's the way we want to resolve this.  it's currently
 illegal to allocate kernel memory (even with nowait/nosleep) while holding a
 spin mutex.  if we want to keep that restriction, then we just need to change
 this one driver to not do that.  if we want to relax that restriction,
 there a bunch of UVM and pmap changes needed.

 -Chuck

From: christos@zoulas.com (Christos Zoulas)
To: Chuck Silvers <chuq@chuq.com>
Cc: 6bone@6bone.informatik.uni-leipzig.de, gnats-bugs@NetBSD.org, 
	kern-bug-people@netbsd.org, gnats-admin@netbsd.org, 
	netbsd-bugs@netbsd.org
Subject: Re: PR/49328 CVS commit: src/sys/dev/pci/ixgbe
Date: Sun, 1 Feb 2015 12:56:51 -0500

 On Feb 1,  9:33am, chuq@chuq.com (Chuck Silvers) wrote:
 -- Subject: Re: PR/49328 CVS commit: src/sys/dev/pci/ixgbe

 | that is not legal.  pmap_growkernel() is not optional for kmem allocations
 | which increase the maximum kmem address in use.
 | 
 | and before you try to dive in and make a nowait version of pmap_growkernel(),
 | let's discuss if that's the way we want to resolve this.  it's currently
 | illegal to allocate kernel memory (even with nowait/nosleep) while holding a
 | spin mutex.  if we want to keep that restriction, then we just need to change
 | this one driver to not do that.  if we want to relax that restriction,
 | there a bunch of UVM and pmap changes needed.

 I was not planning to do that (make a nowait version of pmap_growkernel)...
 I was questioning exactly that: if a NOWAIT allocation should fail instead
 of grabbing a mutex and only failing when LOCKDEBUG is active. Ideally code
 that always fails in LOCKDEBUG mode, should not "work by accident" in regular
 mode.

 This pmap_growkernel code seems strange to me because it seems that it
 is not allowed to fail (the result is not being checked in 2 of 3 places),
 and perhaps the whole thing should be abstracted...

 christos

From: Chuck Silvers <chuq@chuq.com>
To: Christos Zoulas <christos@zoulas.com>
Cc: 6bone@6bone.informatik.uni-leipzig.de, kern-bug-people@netbsd.org,
	netbsd-bugs@netbsd.org, tech-kern@netbsd.org
Subject: Re: PR/49328 CVS commit: src/sys/dev/pci/ixgbe
Date: Sun, 1 Feb 2015 10:53:58 -0800

 (moving this discussion from gnats mail to tech-kern...)

 On Sun, Feb 01, 2015 at 12:56:51PM -0500, Christos Zoulas wrote:
 > On Feb 1,  9:33am, chuq@chuq.com (Chuck Silvers) wrote:
 > -- Subject: Re: PR/49328 CVS commit: src/sys/dev/pci/ixgbe
 > 
 > | that is not legal.  pmap_growkernel() is not optional for kmem allocations
 > | which increase the maximum kmem address in use.
 > | 
 > | and before you try to dive in and make a nowait version of pmap_growkernel(),
 > | let's discuss if that's the way we want to resolve this.  it's currently
 > | illegal to allocate kernel memory (even with nowait/nosleep) while holding a
 > | spin mutex.  if we want to keep that restriction, then we just need to change
 > | this one driver to not do that.  if we want to relax that restriction,
 > | there a bunch of UVM and pmap changes needed.
 > 
 > I was not planning to do that (make a nowait version of pmap_growkernel)...
 > I was questioning exactly that: if a NOWAIT allocation should fail instead
 > of grabbing a mutex and only failing when LOCKDEBUG is active. Ideally code
 > that always fails in LOCKDEBUG mode, should not "work by accident" in regular
 > mode.

 sure, adding an DIAGNOSTIC assertion somewhere to catch this would be
 an improvement.  I'm not sure how you'd actually make the check though.
 outside LOCKDEBUG we don't track what mutexes are held.
 it might work to say that pmap_growkernel() should only be called with
 no interrupts blocked, but I don't think there's an MI way to check that.


 > This pmap_growkernel code seems strange to me because it seems that it
 > is not allowed to fail (the result is not being checked in 2 of 3 places),
 > and perhaps the whole thing should be abstracted...

 well, pmap_growkernel() *is* the abstraction.  :-)
 if you'd like to add a UVM wrapper around it so that we can add MI assertions
 in just one place, that would be fine.  (it would be nice to have that for
 all of the pmap API really.)

 the check in uvm_page.c is actually bogus:

                 uvm_maxkaddr = pmap_growkernel(addr + size);
                 if (uvm_maxkaddr < (addr + size))
                         panic("uvm_pageboot_alloc: pmap_growkernel() failed");


 but the manpage says:

                    The pmap_growkernel() function returns the new maximum
                    kernel virtual address that can be mapped with the
                    resources it has available.  If new resources cannot be
                    allocated, pmap_growkernel() must panic.

 a couple of the pmap implementations are a bit lax about the panic part.

 but separate from that, most pmap_growkernel() implmentations use sleep locks,
 which is apparently intended to be legitimate.  I'd think it would be good if
 we continue to allow that, and it would be even better if we removed the
 requirement to panic and instead allowed pmap_growkernel() to sleep to wait
 for memory.  to avoid turning those panic cases into hangs, we might want to
 do something like add a check that the pagedaemon thread only sleeps when
 it's idle.  we could even allow the pagedaemon to sleep when there are pageouts
 already pending if we tighten up the drivers to not need to allocate any more
 memory to complete an I/O after the strategy call returns, but I suspect that
 lots of drivers don't guarantee that currently.

 -Chuck

From: "SAITOH Masanobu" <msaitoh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/49328 CVS commit: src/sys/dev/pci/ixgbe
Date: Wed, 4 Feb 2015 09:05:53 +0000

 Module Name:	src
 Committed By:	msaitoh
 Date:		Wed Feb  4 09:05:53 UTC 2015

 Modified Files:
 	src/sys/dev/pci/ixgbe: ixgbe.c ixgbe.h ixgbe_netbsd.c

 Log Message:
 Fix mutex related problem reported by Uwe Toenjes in PR#49328:
  - Revert ixgbe_netbsd.c rev. 1.2
  - make CORE_LOCK adaptive
  - Release spin lock while reinitializing the jumb buffer structure.


 To generate a diff of this commit:
 cvs rdiff -u -r1.17 -r1.18 src/sys/dev/pci/ixgbe/ixgbe.c
 cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/ixgbe/ixgbe.h
 cvs rdiff -u -r1.2 -r1.3 src/sys/dev/pci/ixgbe/ixgbe_netbsd.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: christos@NetBSD.org
State-Changed-When: Tue, 17 Feb 2015 09:54:18 -0500
State-Changed-Why:
submitter verified it has been fixed.


From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/49328 CVS commit: [netbsd-7] src/sys/dev/pci/ixgbe
Date: Tue, 24 Feb 2015 10:41:09 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Tue Feb 24 10:41:09 UTC 2015

 Modified Files:
 	src/sys/dev/pci/ixgbe [netbsd-7]: ixgbe.c ixgbe.h

 Log Message:
 Pull up following revision(s) (requested by msaitoh in ticket #545):
 	sys/dev/pci/ixgbe/ixgbe.h: revision 1.2
 	sys/dev/pci/ixgbe/ixgbe_netbsd.c: revision 1.3
 	sys/dev/pci/ixgbe/ixgbe.c: revision 1.16
 	sys/dev/pci/ixgbe/ixgbe.c: revision 1.17
 	sys/dev/pci/ixgbe/ixgbe.c: revision 1.18
 	sys/dev/pci/ixgbe/ixgbe.c: revision 1.19
  Add missing IXGBE_RX_LOCK_DESTROY() for the detach path.
  Remove extra IXGBE_TX_LOCK()/IXGBE_TX_UNLOCK() from
 ixgbe_free_transmit_structures(). This function is called in the end of
 the detach function. if_stop was called and almost all resources were
 freed, so it's not required to block the TX stuff.
 Fix mutex related problem reported by Uwe Toenjes in PR#49328:
  - Revert ixgbe_netbsd.c rev. 1.2
  - make CORE_LOCK adaptive
  - Release spin lock while reinitializing the jumb buffer structure.
 disable preemption while scheduling the softint to configure the link.


 To generate a diff of this commit:
 cvs rdiff -u -r1.14.2.1 -r1.14.2.2 src/sys/dev/pci/ixgbe/ixgbe.c
 cvs rdiff -u -r1.1 -r1.1.28.1 src/sys/dev/pci/ixgbe/ixgbe.h

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.