From owner-freebsd-sparc64@FreeBSD.ORG Sat Apr 11 12:15:48 2009 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4151106566C for ; Sat, 11 Apr 2009 12:15:48 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id 4E6958FC18 for ; Sat, 11 Apr 2009 12:15:47 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.3/8.14.3/ALCHEMY.FRANKEN.DE) with ESMTP id n3BCFZ8L006568; Sat, 11 Apr 2009 14:15:35 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.3/8.14.3/Submit) id n3BCFZ7W006567; Sat, 11 Apr 2009 14:15:35 +0200 (CEST) (envelope-from marius) Date: Sat, 11 Apr 2009 14:15:35 +0200 From: Marius Strobl To: Andreas Tobler Message-ID: <20090411121535.GA6291@alchemy.franken.de> References: <49DF9BCC.9030205@fgznet.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49DF9BCC.9030205@fgznet.ch> User-Agent: Mutt/1.4.2.3i Cc: freebsd-sparc64@freebsd.org Subject: Re: sparc64 and amr LSILogic MegaRAID 1.53 X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2009 12:15:49 -0000 On Fri, Apr 10, 2009 at 09:19:40PM +0200, Andreas Tobler wrote: > Hello, > > I wonder if the amr(4) driver should work on sparc64. I see in the > GENERIC that amr is commented. Is this due to not working anymore, or is > this entry just an artifact and the driver did never work? > > I have here a HP NetRAID-1Si PCI card and tried the amr driver. The > first try failed due to amr calling bus_dma_tag_create with a NULL as > first argument. Fixing this gets me some steps further with a frozen > machine w/o bt. > > none0@pci0:0:4:1: class=0x010400 card=0x03a2113c chip=0x19608086 > rev=0x05 > hdr=0x00 > vendor = 'Intel Corporation' > device = '80960RP i960RP Microprocessor' > class = mass storage > subclass = RAID > > > > u60# kldload amr > amr_pci_probe: called > amr_pci_probe: called > amr0: mem 0x4400000-0x47fffff at device 4.1 on pci0 > amr_pci_attach: called > amr0: busmaster bit not set, enabling > amr0: [ITHREAD] > amr_setup_mbox: called > amr_sglist_helper: called > amr_sglist_map: called > amr_sglist_helper: called > amr_sglist_helper: called > amr_attach: called > > Hangs, hardreset here. > > My question, is this amr(4) driver in its current implementation thought > to work on sparc64, or is it only for LE systems? > > If it was working once, I'm interested to get it back working, well just > for learning purpose. > If you look at the annotated version of the sparc64 GENERIC you'll see that amr(4) is commented out there since it was intentionally brought over in that form from the alpha counterpart, so amr(4) most likely never has worked on sparc64 so far. On a quick glance it doesn't use any of the byteorder(9) functions so unless these controllers can be switched into big endian mode, which is rather rare for PCI chips and amr(4) doesn't do either, amr(4) currently will only work in little endian machines because at least the DMA addresses require conversion. This might not be the only problem though. Marius