From owner-freebsd-atm@FreeBSD.ORG Tue May 22 09:38:41 2007 Return-Path: X-Original-To: freebsd-atm@freebsd.org Delivered-To: freebsd-atm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 69A5B16A494 for ; Tue, 22 May 2007 09:38:41 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from smtp-1.dlr.de (smtp-1.dlr.de [195.37.61.185]) by mx1.freebsd.org (Postfix) with ESMTP id 0703D13C4AD for ; Tue, 22 May 2007 09:38:40 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from [192.168.2.102] ([172.21.151.1]) by smtp-1.dlr.de with Microsoft SMTPSVC(6.0.3790.1830); Tue, 22 May 2007 11:25:23 +0200 Message-ID: <4652B7E9.4040004@dlr.de> Date: Tue, 22 May 2007 11:29:13 +0200 From: Hartmut Brandt User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: Clemens Zauner References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 22 May 2007 09:25:24.0055 (UTC) FILETIME=[203EBE70:01C79C53] Cc: freebsd-atm@freebsd.org Subject: Re: patm / NATM system freeze with CPUTYPE?=opteron X-BeenThere: freebsd-atm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ATM for FreeBSD! List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2007 09:38:41 -0000 Clemens Zauner wrote: > (For details, please see the posting in comp.unix.bsd.freebsd.misc > Message-ID: ) > > Im facing complete system freezes when compiling the kernel with > CPUTYPE?=opteron immediately *after* issuing an ifconfig on > the patm0 - interface (trying to set an IP address). > > System is 6.2-p4; i386; kernconf nearly untampered (stuff like scsi, > raid an the like => out, and the atm-stuff (NATM) <= in). > > Card is an ProSUM ProATM 155; idt77252 Rev. F; Suni/Lite (PMC-5346) PHY > > I guess the most of the gory details in my posting ar not of any > interest - but one thing shows up in dmesg: > > patm0: port 0xe800-0xe8ff mem 0xfcfff000- > 0xfcffffff,0xfac00000-0xfaffffff irq 16 at device 8.0 on pci2 > patm0: carrier detected > patm0: ProATM 155 interface; idt77252 Rev. F; Suni/Lite (PMC-5346) PHY > patm0: 512K x 32 SRAM; 16384 connections > bus_dmamem_alloc failed to align memory properly. > patm0: [GIANT-LOCKED] > > The "bus_dmamem_alloc" is somehow irritating me ... It's already a couple of years ago that I wrote that driver, but the problem, if I correctly remember, is that bus_dmamem_alloc does not correctly align memory even if requrested by, I think, the busdma tag. The patm hardware has certain alignment requirements for the memory blocks. I found out, that I can enforce alignment to, for example, 2k by allocating a multiple of 2k. So the code rounds up allocations that have alignment requirements that are larger than the allocation itself. Perhaps changes in the busdma code have made this mechanism to fail. Unfortunately I have no time at the moment to look into this issue ... harti