Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Jun 2007 12:58:07 +0900
From:      Pyun YongHyeon <pyunyh@gmail.com>
To:        Freddie Cash <fjwcash+freebsd@gmail.com>
Cc:        stable@freebsd.org
Subject:   Re: Can't get if_txp(4) to attach to a 3CR990B-TXM NIC
Message-ID:  <20070614035807.GB54650@cdnetworks.co.kr>
In-Reply-To: <200706130901.39724.fjwcash%2Bfreebsd@gmail.com>
References:  <200706080913.37450.fjwcash%2Bfreebsd@gmail.com> <200706121020.11926.fjwcash%2Bfreebsd@gmail.com> <20070613041533.GB50150@cdnetworks.co.kr> <200706130901.39724.fjwcash%2Bfreebsd@gmail.com>

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

--17pEHd4RhPHOinZp
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Wed, Jun 13, 2007 at 09:01:39AM -0700, Freddie Cash wrote:
 > On Tuesday 12 June 2007 09:15 pm, Pyun YongHyeon wrote:
 > > On Tue, Jun 12, 2007 at 10:20:11AM -0700, Freddie Cash wrote:
 > >  > On Friday 08 June 2007 09:59 pm, Pyun YongHyeon wrote:
 > >  > > 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.
 > >  >
 > >  > Patch applies cleanly, module compiles cleanly, and module is
 > >  > kldloaded cleanly.  But same error message as before, and no txp0
 > >  > device is created.
 > >  >
 > >  > Tested on 7-CURRENT from last week.
 > >
 > > Thanks for testing!
 > >
 > > It seems that the message will show up in case of firmware loading/ring
 > > initialization failure. Try attached patch which will show failing
 > > function name.
 > 
 > Patch uplied cleanly, module compiled clealy, and module was kldloaded 
 > cleanly.
 > 
 > Error message is now:
 > txp0: <3Com 3cR990B-TXM Etherlink with 3XP Processor> port 0xbc00-0xbc7f 
 > mem 0xfdcff000-0xfdcff07f irq 18 at device 6.0 on pci3
 > txp0: txp_download_fw: not waiting for boot
 > device_attach: txp0 attach returned -1
 > 
 > The IRQ and device numbers changed as it's in a different PCI slot than 
 > before.
 > 
 > Looks like your guess was right, there's something not working right in 
 > the firmware download.
 > 

Revert previous patch and apply attached patch again.
Please give it spin and let me know result.

 > > Because I don't have 3CR990 hardware it's very hard to fix it. I'm
 > > unsure remote debugging would help here.
 > > Btw, it seems the hardware looks very good(except for extra copying on
 > > strict alignment architecture) and it even supports TSO!
 > 
 > We normally use 3C905-series and 3C980-series NICs.  Our local PC vendor 
 > sent us these instead when we ordered low-profile NICs to put into our 
 > new firewall boxes (while we wait for the back-order on Intel gigabit 
 > dual-port, low-profile, PCIe NICs to be filled).
 > 

I don't have experience from 3C980 but it seems the 3C990 with 3XP
processor looks better hardware than 3C905/3C980 series.

 > I was going to try upgrading the firmware on the NICs, as there's an 
 > update available on the 3Com website, but the installer requires a 
 > Windows box (tried via a DOS boot disk and get the "Can't be run in DOS 
 > mode" error), which we don't have available at the moment.
 > 
-- 
Regards,
Pyun YongHyeon

--17pEHd4RhPHOinZp
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="if_txp.patch3"

Index: if_txp.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/txp/if_txp.c,v
retrieving revision 1.46
diff -u -r1.46 if_txp.c
--- if_txp.c	12 Jun 2007 04:33:21 -0000	1.46
+++ if_txp.c	14 Jun 2007 03:50:51 -0000
@@ -541,14 +541,15 @@
 
 	WRITE_REG(sc, TXP_H2A_0, TXP_BOOTCMD_DOWNLOAD_COMPLETE);
 
-	for (i = 0; i < 10000; i++) {
+	for (i = 0; i < 20000; i++) {
 		r = READ_REG(sc, TXP_A2H_0);
 		if (r == STAT_WAITING_FOR_BOOT)
 			break;
 		DELAY(50);
 	}
 	if (r != STAT_WAITING_FOR_BOOT) {
-		device_printf(sc->sc_dev, "not waiting for boot\n");
+		device_printf(sc->sc_dev, "%s: not waiting for boot, "
+		    "status = 0x%08x\n", __func__, r);
 		return (-1);
 	}
 
@@ -1014,7 +1015,7 @@
 	boot->br_zero_hi = 0;
 
 	/* See if it's waiting for boot, and try to boot it */
-	for (i = 0; i < 10000; i++) {
+	for (i = 0; i < 20000; i++) {
 		r = READ_REG(sc, TXP_A2H_0);
 		if (r == STAT_WAITING_FOR_BOOT)
 			break;
@@ -1022,7 +1023,8 @@
 	}
 
 	if (r != STAT_WAITING_FOR_BOOT) {
-		device_printf(sc->sc_dev, "not waiting for boot\n");
+		device_printf(sc->sc_dev, "%s: not waiting for boot, "
+		    "status = 0x%08x\n", __func__, r);
 		return(ENXIO);
 	}
 

--17pEHd4RhPHOinZp--



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