Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Jun 2007 13:59:45 +0900
From:      Pyun YongHyeon <pyunyh@gmail.com>
To:        Freddie Cash <fjwcash+freebsd@gmail.com>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Can't get if_txp(4) to attach to a 3CR990B-TXM NIC
Message-ID:  <20070609045945.GC32123@cdnetworks.co.kr>
In-Reply-To: <200706080913.37450.fjwcash%2Bfreebsd@gmail.com>
References:  <200706080913.37450.fjwcash%2Bfreebsd@gmail.com>

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

--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: <NVIDIA nForce MCP13 Networking Adapter> 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--



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