Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Sep 2008 08:54:10 +0200
From:      Marius Strobl <marius@alchemy.franken.de>
To:        Sean Thomas Caron <scaron@umich.edu>
Cc:        freebsd-sparc64@freebsd.org
Subject:   Re: Kernel panic in 7.0-RELEASE with fatm driver
Message-ID:  <20080930065410.GA87677@alchemy.franken.de>
In-Reply-To: <20080929201947.86701vp3bs8vcatc@web.mail.umich.edu>
References:  <20080929201947.86701vp3bs8vcatc@web.mail.umich.edu>

next in thread | previous in thread | raw e-mail | index | archive | help

--+QahgC5+KEYLbs62
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Mon, Sep 29, 2008 at 08:19:47PM -0400, Sean Thomas Caron wrote:
> Hi folks,
> 
> I've been running FreeBSD 6.x on a number of Ultrasparc based systems  
> using the Cranor NATM driver with a bunch of Fore PCA-200E cards. It  
> generally worked but as the machines got hit with higher and higher  
> network load I would get kernel panics at fairly random intervals on  
> "sbdrop" and "sbflush". Sometimes I would get two per day, sometimes I  
> wouldn't get any for two weeks.
> 
> So after a while at this I decided to try 7.0-RELEASE out hoping  
> whatever bug was causing these random kernel panics might have gotten  
> fixed.
> 
> Test system is Sun Fire v120, 550 MHz, 1 GB RAM, PCA-200e installed in  
> PCI slot.
> 
> I pruned a bunch of stuff from GENERIC and added the usual Cranor NATM  
> stuff that I was using in 6.x. In particular -
> 
> # ATM
> 
> options         NATM
> device          atm
> device          fatm
> device          utopia
> 
> Kernel does have multiprocessing enabled (as GENERIC did) even though  
> it's a uniprocessor machine.

If you're compiling a custom kernel anyway you should leave out
options SMP on a UP machine for performance reasons.

> 
> I built the new kernel then reboot and it panics immediately after  
> touching the ATM card -
> 
> fatm0: <FORE PCA200E> mem 0x200000-0x3fffff at device 5.0 on pci2
> panic: bus_dma_tag_create: parent DMA tag NULL
> cpuid = 0
> Uptime: 1s
> Automatic reboot in 15 seconds - press a key on the console to abort
> --> Press a key on the console to reboot,
> --> or switch off the system now.
> 
> I'm hoping maybe someone has seen this before and has a patch laying  
> around somewhere, or if nothing else, it might get passed along to the  
> fatm maintainer eventually?

Please give the attached patch a try.

> 
> If anyone wants to see any further information e.g. full kernel  
> configuration file, I will be happy to pass along. I can also procure  
> a backtrace if someone can tell me how to hardcode a dump path into  
> the kernel; I can't find a procedure documented anywhere.
> 

FYI, you can specifiy the path (defaulting to /var/crash) for
the dump via "dumpdir" in /etc/rc.conf.

Marius


--+QahgC5+KEYLbs62
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="fatm_bus_get_dma_tag.diff"

Index: if_fatm.c
===================================================================
--- if_fatm.c	(revision 183423)
+++ if_fatm.c	(working copy)
@@ -2880,7 +2880,7 @@ fatm_attach(device_t dev)
 	 * restrictions for the controller (and PCI bus) and is never used
 	 * to do anything.
 	 */
-	if (bus_dma_tag_create(NULL, 1, 0,
+	if (bus_dma_tag_create(bus_get_dma_tag(dev), 1, 0,
 	    BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR,
 	    NULL, NULL, BUS_SPACE_MAXSIZE_32BIT, MAXDMASEGS,
 	    BUS_SPACE_MAXSIZE_32BIT, 0, NULL, NULL,

--+QahgC5+KEYLbs62--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080930065410.GA87677>