Re: Can't get if_txp(4) to attach to a 3CR990B-TXM NIC

2009-02-04 Thread Pyun YongHyeon
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
> 
> 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 kerneldmesg_6.1.txt
>   6.2-RELEASE  GENERIC kerneldmesg_6.2.txt
>   6.2-RELEASE  GENERIC kernel  verbose boot  dmesg_6.2_verbose.txt
>   6-STABLE GENERIC kerneldmesg_6_generic.txt
>   6-STABLE TEST kernel (no NIC drivers)  dmesg_6_custom.txt
>   7-CURRENTGENERIC kerneldmesg_7_generic.txt
>   7-CURRENTTEST 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?  :)
> 

Now I've encountered similar issue. See
http://lists.freebsd.org/pipermail/freebsd-current/2009-February/003033.html
for possible fix.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: Can't get if_txp(4) to attach to a 3CR990B-TXM NIC

2007-06-14 Thread Pyun YongHyeon
On Thu, Jun 14, 2007 at 10:42:20AM -0700, Freddie Cash wrote:
 > On Thursday 14 June 2007 10:36 am, Freddie Cash wrote:
 > > On Wednesday 13 June 2007 08:58 pm, Pyun YongHyeon wrote:
 > > > Revert previous patch and apply attached patch again.
 > > > Please give it spin and let me know result.
 > 
 > Same error message as below, with the updated firmware downloaded from 
 > your site.  :(
 > 

Hmm ATM the only reaminging one I can think of is additional delay
after reseting the hardware. Revert previous patch and try attached one.

-- 
Regards,
Pyun YongHyeon
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.c12 Jun 2007 04:33:21 -  1.46
+++ if_txp.c15 Jun 2007 03:51:46 -
@@ -480,6 +480,9 @@
return (-1);
}
 
+   /* Give a 5ms to complete the reset. */
+   pause("txprst", hz / 200);
+ 
return (0);
 }
 
@@ -548,7 +551,8 @@
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);
}
 
@@ -1022,7 +1026,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);
}
 
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: Can't get if_txp(4) to attach to a 3CR990B-TXM NIC

2007-06-14 Thread Freddie Cash
On Thursday 14 June 2007 10:36 am, Freddie Cash wrote:
> On Wednesday 13 June 2007 08:58 pm, Pyun YongHyeon wrote:
> > Revert previous patch and apply attached patch again.
> > Please give it spin and let me know result.

Same error message as below, with the updated firmware downloaded from 
your site.  :(

> 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, status = 0x8008
> device_attach: txp0 attach returned -1
>
> I'm going to try the updated firmware you mentioned in the followup
> message.  I'll let you know how it goes.

-- 
Freddie Cash, LPIC-2 CCNT CCLP  Network Support Technician
School District 73  (250) 377-HELP [377-4357]
[EMAIL PROTECTED]
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Can't get if_txp(4) to attach to a 3CR990B-TXM NIC

2007-06-14 Thread Freddie Cash
On Wednesday 13 June 2007 08:58 pm, Pyun YongHyeon wrote:
> 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.

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, status = 0x8008
device_attach: txp0 attach returned -1

I'm going to try the updated firmware you mentioned in the followup 
message.  I'll let you know how it goes.

-- 
Freddie Cash, LPIC-2 CCNT CCLP  Network Support Technician
School District 73  (250) 377-HELP [377-4357]
[EMAIL PROTECTED]
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Can't get if_txp(4) to attach to a 3CR990B-TXM NIC

2007-06-13 Thread Pyun YongHyeon
On Thu, Jun 14, 2007 at 12:58:07PM +0900, To Freddie Cash wrote:
 > 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.
 >  > 

Forgot to say an important thing.
It seems that OpenBSD has a newer firmware image than that of FreeBSD.
If you are still in trouble with firmware, try updating the firmware
image at the following URL.
http://people.freebsd.org/~yongari/txp/3c990img.h

Just replace sys/dev/txp/3c990img.h with the file at the URL.
-- 
Regards,
Pyun YongHyeon
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Can't get if_txp(4) to attach to a 3CR990B-TXM NIC

2007-06-13 Thread Pyun YongHyeon
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
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.c12 Jun 2007 04:33:21 -  1.46
+++ if_txp.c14 Jun 2007 03:50:51 -
@@ -541,14 +541,15 @@
 
WRITE_REG(sc, TXP_H2A_0, TXP_BOOTCMD_DOWNLOAD_COMPLETE);
 
-   for (i = 0; i < 1; i++) {
+   for (i = 0; i < 2; 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 < 1; i++) {
+   for (i = 0; i < 2; 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_prin

Re: Can't get if_txp(4) to attach to a 3CR990B-TXM NIC

2007-06-13 Thread Freddie Cash
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.

> 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 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.

-- 
Freddie Cash, LPIC-2 CCNT CCLP  Network Support Technician
School District 73  (250) 377-HELP [377-4357]
[EMAIL PROTECTED]
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Can't get if_txp(4) to attach to a 3CR990B-TXM NIC

2007-06-12 Thread Pyun YongHyeon
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.

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!

-- 
Regards,
Pyun YongHyeon
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.c12 Jun 2007 04:33:21 -  1.46
+++ if_txp.c13 Jun 2007 04:10:18 -
@@ -548,7 +548,8 @@
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\n",
+   __func__);
return (-1);
}
 
@@ -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\n",
+   __func__);
return(ENXIO);
}
 
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: Can't get if_txp(4) to attach to a 3CR990B-TXM NIC

2007-06-12 Thread Freddie Cash
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.

-- 
Freddie Cash, LPIC-2 CCNT CCLP  Network Support Technician
School District 73  (250) 377-HELP [377-4357]
[EMAIL PROTECTED]
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Can't get if_txp(4) to attach to a 3CR990B-TXM NIC

2007-06-08 Thread Pyun YongHyeon
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 kerneldmesg_6.1.txt
 >   6.2-RELEASE  GENERIC kerneldmesg_6.2.txt
 >   6.2-RELEASE  GENERIC kernel  verbose boot  dmesg_6.2_verbose.txt
 >   6-STABLE GENERIC kerneldmesg_6_generic.txt
 >   6-STABLE TEST kernel (no NIC drivers)  dmesg_6_custom.txt
 >   7-CURRENTGENERIC kerneldmesg_7_generic.txt
 >   7-CURRENTTEST 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
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.c4 Mar 2007 03:38:08 -   1.44
+++ if_txp.c9 Jun 2007 04:56:59 -
@@ -264,6 +264,11 @@
 
sc->sc_fwbuf = contigmalloc(32768, M_DEVBUF,
M_NOWAIT, 0, 0x, 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, 0x, 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)) {
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"