From owner-freebsd-stable@FreeBSD.ORG Sat Jun 9 05:25:45 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C33AF16A469 for ; Sat, 9 Jun 2007 05:25:45 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.181]) by mx1.freebsd.org (Postfix) with ESMTP id 8EDF213C45A for ; Sat, 9 Jun 2007 05:25:45 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: by wa-out-1112.google.com with SMTP id j37so1468961waf for ; Fri, 08 Jun 2007 22:25:45 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:received:received:date:from:to:cc:subject:message-id:reply-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=GXjMr47msYdRN4SvTlNV/gOls6mXoKcvxv5OEKG9RugRNwJ6LogUUDbckV7fpyVDZjwqZgLczbNtdQdaP2cLMg/kVikZNBrVHAQlCRr5Vwr8EOsNQuZcupKbFcPUh2lqabf4lE1rj6aqFCAwCdE2ms8/ocpbK//NxnF5ahjrJC4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:from:to:cc:subject:message-id:reply-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=pjpeHOXkiIlxT12BmsOBcj0YAmpdbCberzY0Qe8TMhMKCRsA+Ql4ufDeI0UuGqCdNsBoODBruT/BIbl6XxgqNrMwGBbFEcPM9iWCGHhC75vEH4oY6nUYx4kz+qXPBy+Ux47S7K9i6sN9w5RvLwNOzHfWI8mN5OsZZKq26g6MwZ8= Received: by 10.114.176.1 with SMTP id y1mr3262140wae.1181365193109; Fri, 08 Jun 2007 21:59:53 -0700 (PDT) Received: from michelle.cdnetworks.co.kr ( [211.53.35.84]) by mx.google.com with ESMTP id j6sm1918938wah.2007.06.08.21.59.49 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 08 Jun 2007 21:59:51 -0700 (PDT) Received: from michelle.cdnetworks.co.kr (localhost.cdnetworks.co.kr [127.0.0.1]) by michelle.cdnetworks.co.kr (8.13.5/8.13.5) with ESMTP id l594xkt0032931 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 9 Jun 2007 13:59:46 +0900 (KST) (envelope-from pyunyh@gmail.com) Received: (from yongari@localhost) by michelle.cdnetworks.co.kr (8.13.5/8.13.5/Submit) id l594xjh5032930; Sat, 9 Jun 2007 13:59:45 +0900 (KST) (envelope-from pyunyh@gmail.com) Date: Sat, 9 Jun 2007 13:59:45 +0900 From: Pyun YongHyeon To: Freddie Cash Message-ID: <20070609045945.GC32123@cdnetworks.co.kr> References: <200706080913.37450.fjwcash+freebsd@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="ReaqsoxgOBHFXBhH" Content-Disposition: inline In-Reply-To: <200706080913.37450.fjwcash+freebsd@gmail.com> User-Agent: Mutt/1.4.2.1i Cc: freebsd-stable@freebsd.org Subject: Re: Can't get if_txp(4) to attach to a 3CR990B-TXM NIC X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2007 05:25:45 -0000 --ReaqsoxgOBHFXBhH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jun 08, 2007 at 09:13:37AM -0700, Freddie Cash wrote: > Good morning, > > I'm having a bit of an issue getting a 3CR990B-TXM NIC detected and > usable. Just wondering if anyone knows of any issues with this NIC > chipset and/or with the motherboard chipset. > > The motherboard is a Biostar GeForce 6100 AM2 using an nVidia nForce 410 > chipset and nVidia GeForce 6100 vide chipset. > > I've tried FreeBSD 6.1, 6.2, 6-STABLE (from Wed), and 7-CURRENT (from Thu) > on this system. Everything installs nicely, everything on the board is > detected correctly and usable. It's just the PCI NIC that doesn't work. > > If I compile a custom kernel without any network drivers in it, and then > kldload if_txp, the following appears (same message on all 4 versions): > > txp0: <3Com 3cR990B-TXM Etherlink with 3XP Processor> port 0xbc00-0xbc7f > mem 0xfdcff000-0xfdcff07f irq 16 at device 8.0 on pci3 > txp0: not waiting for boot > device_attach: txp0 attach returned -1 > Would you try attached path? It wouldn't fix your issue but it will handle failure of contigmalloc as expected. > If I reboot and load if_nve (on 6.2 and 6-stable), then I get: > nve0: port 0xdc00-0xdc07 mem > 0xfe02d000-0xfe02dfff irq 22 at device 20.0 on pci0 > nve0: Ethernet address 00:19:21:37:d5:60 > > Followed by the above messages for txp0 (it seems to detect and load > if_txp automativally when loading if_nve). > > I've updated the BIOS on the motherboard. I've tried different PCI slots > on the motherboard. Nothing changes. The "not waiting for boot" message > keeps appearing. > > Attached are dmesg output from: > 6.1-RELEASE GENERIC kernel dmesg_6.1.txt > 6.2-RELEASE GENERIC kernel dmesg_6.2.txt > 6.2-RELEASE GENERIC kernel verbose boot dmesg_6.2_verbose.txt > 6-STABLE GENERIC kernel dmesg_6_generic.txt > 6-STABLE TEST kernel (no NIC drivers) dmesg_6_custom.txt > 7-CURRENT GENERIC kernel dmesg_7_generic.txt > 7-CURRENT TEST kernel (no NIC drivers) dmesg_7_custom.txt > > I've looked through the cvsweb entries for txp and didn't see anything > related to this issue. Reading the man page for if_txp(4) doesn't show > anything about this error. I tried reading the source, but C is pretty > much Greek to me. > > Everything I've read online says this NIC should work, and other are using > it successfully. My gut feeling is that it's something to do with the > motherboard chipset and the way it detects the NIC. But I could be way > off. > > (As a test, I popped in a Kanotix LiveCD and the 3Com NIC is detected and > usable, so it's [hopefully] not a defective NIC.) > > Anyone have any suggestions? Comments? Methods to destroy the NIC as an > act of defiance? :) > -- Regards, Pyun YongHyeon --ReaqsoxgOBHFXBhH Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="if_txp.patch" Index: if_txp.c =================================================================== RCS file: /home/ncvs/src/sys/dev/txp/if_txp.c,v retrieving revision 1.44 diff -u -r1.44 if_txp.c --- if_txp.c 4 Mar 2007 03:38:08 -0000 1.44 +++ if_txp.c 9 Jun 2007 04:56:59 -0000 @@ -264,6 +264,11 @@ sc->sc_fwbuf = contigmalloc(32768, M_DEVBUF, M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0); + if (sc->sc_fwbuf == NULL) { + device_printf(dev, "no memory for firmware\n"); + error = ENXIO; + goto fail; + } error = txp_download_fw(sc); contigfree(sc->sc_fwbuf, 32768, M_DEVBUF); sc->sc_fwbuf = NULL; @@ -273,6 +278,11 @@ sc->sc_ldata = contigmalloc(sizeof(struct txp_ldata), M_DEVBUF, M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0); + if (sc->sc_ldata == NULL) { + device_printf(dev, "no memory for descriptor ring\n"); + error = ENXIO; + goto fail; + } bzero(sc->sc_ldata, sizeof(struct txp_ldata)); if (txp_alloc_rings(sc)) { --ReaqsoxgOBHFXBhH--