Re: if_dc broken in -current

2002-03-26 Thread Stephen McKay

On Monday, 25th March 2002, Ilmar S. Habibulin wrote:

On Mon, 25 Mar 2002, Stephen McKay wrote:

 What sort of card do you have?  The output of dmesg would help.  Have you
 tried 4.5 on this machine?
I have some noname nic with Intel 21143 chip. dmesg attached. I'm using
only trustedbsd_mac branch on my ws.

Yours seems to be the same as mine (from a chip and phy point of view)
although mine has a DEC assigned ethernet address and yours is from
Telebit.  I don't think that difference matters.

 Of course the dc driver should autonegotiate (and does so when I revert
 rev 1.56).  Your info could help trace this problem.
Well, i don't think this is the problem. Hardware became too much
inteligent now a days, so one have to use his own hands to make this
hardware work like user wants it to work. Maybe just put some FAQ about
dc(4) and autoconfigurable hubs/switches?

Some things can be blamed on attempted intelligence gone wrong.  But not
this one.  This is a simple bug.  My card works perfectly under 4.5.0
on the same machine.  It fails with -current.  But with one change
reverted, it works again.  Now all I have to do is work out what is
the real underlying cause, since the current code looks right at first
glance.  At least I have the old DEC datasheets, and some info on some
of the clones.

Stephen.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: if_dc broken in -current

2002-03-26 Thread Stephen McKay

On Monday, 25th March 2002, Robert Watson wrote:

I think I have an identical problem involving a Linksys ethernet card
using if_dc.  I have to force it to negotiate 10mbps, since it fails to
negotiate anything higher with my 10/100 switch.  No idea why at all.

dc0: LC82C115 PNIC II 10/100BaseTX port 0xe800-0xe8ff mem
0xfebfff00-0xfebf irq 10 at device 19.0 on pci0
dc0: Ethernet address: 00:a0:cc:35:3e:56
miibus0: MII bus on dc0
dcphy0: Intel 21143 NWAY media interface on miibus0
dcphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto

dc0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500
inet6 fe80::2a0:ccff:fe35:3e56%dc0 prefixlen 64 scopeid 0x1 
inet 192.168.11.150 netmask 0xff00 broadcast 192.168.11.255
ether 00:a0:cc:35:3e:56 
media: Ethernet 10baseT/UTP
status: active

If I set it to auto-negotiate or hard-set to 100mbps, no packets go back
or forth.  I've had this problem for at least a year, if not longer.  I
have the same problem with 4.4-STABLE using an identical card on different
hardware: if it tries to negotiate 100mbps, then it simply doesn't work.
If I force it to 10, it's fine.

After careful consideration, I think this has to be a different problem.

My problem is that auto-negotiation doesn't start at boot (when an address
is assigned to dc0).  If I explicitly set a speed, that speed works.  Most
bizarrely, if I misspell the media option, that causes a successful
autonegotation!  I mean, I type ifconfig dc0 media 10baset immediately
after boot, and autonegotiation takes over.  (If I spell it 10baset/utp
it goes into 10Mbit half-duplex mode, like you expect.)  So it's just a
hair's breadth away from working properly, and reverting rev 1.56 is enough
for full operation to be restored.

Since you explicitly set 100Mbit half-duplex and it doesn't work, then that
must be something else.  We could have a go at finding that bug too, but
it will be harder, since I don't have a PNIC II here.  I do have some info
on the Macronix 98715A, which Bill Paul says is almost the same.  Maybe
we can get lucky.

Stephen.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: if_dc broken in -current

2002-03-25 Thread Stephen McKay

On Friday, 22nd March 2002, Ilmar S. Habibulin wrote:

On Sat, 23 Mar 2002, Stephen McKay wrote:

 It's been quite a while since I updated my -current box, but when I did,
 I was surprised to find that my DE500 network card (21143 chip) had stopped
 working.  The switch showed no link.  Ifconfig showed no carrier.

I've had the simular problem. Now i have media option set to needed value
in ifconfig_dc0 variable. This helped.

What sort of card do you have?  The output of dmesg would help.  Have you
tried 4.5 on this machine?

Of course the dc driver should autonegotiate (and does so when I revert
rev 1.56).  Your info could help trace this problem.

Stephen.

PS I'm now assuming the number of -current users that use PNIC and Davicom
cards with the dc driver is exactly zero.  Oh well.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: if_dc broken in -current

2002-03-25 Thread Ilmar S. Habibulin



On Mon, 25 Mar 2002, Stephen McKay wrote:

 What sort of card do you have?  The output of dmesg would help.  Have you
 tried 4.5 on this machine?
I have some noname nic with Intel 21143 chip. dmesg attached. I'm using
only trustedbsd_mac branch on my ws.

 Of course the dc driver should autonegotiate (and does so when I revert
 rev 1.56).  Your info could help trace this problem.
Well, i don't think this is the problem. Hardware became too much
inteligent now a days, so one have to use his own hands to make this
hardware work like user wants it to work. Maybe just put some FAQ about
dc(4) and autoconfigurable hubs/switches?



Copyright (c) 1992-2002 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD 5.0-TrustedBSD #5: Mon Mar 25 15:45:32 MSK 2002
root@ws-ilmar:/usr/tmp/tt/mac/sys/i386/compile/WS_ILMAR
Preloaded elf kernel /boot/kernel/kernel at 0xc03e3000.
Preloaded elf module /boot/kernel/acpi.ko at 0xc03e30a8.
Timecounter i8254  frequency 1193182 Hz
Timecounter TSC  frequency 706293487 Hz
CPU: AMD Duron(tm) Processor (706.29-MHz 686-class CPU)
  Origin = AuthenticAMD  Id = 0x631  Stepping = 1
  
Features=0x183f9ffFPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR

  AMD Features=0xc044RSVD,AMIE,DSP,3DNow!
real memory  = 134135808 (130992K bytes)
avail memory = 126418944 (123456K bytes)
Security policy: TrustedBSD MAC/BSD Extended (trustedbsd_mac_bsdextended)
Security policy: TrustedBSD MAC/Biba (trustedbsd_mac_biba)
Security policy: TrustedBSD MAC/MLS (trustedbsd_mac_mls)
Security policy: TrustedBSD MAC/TE (trustedbsd_mac_te)
Security policy: TrustedBSD MAC/None (trustedbsd_mac_none)
Pentium Pro MTRR support enabled
Using $PIR table, 9 entries at 0xc00f1720
npx0: math processor on motherboard
npx0: INT 16 interface
acpi0: ASUS   A7V-133  on motherboard
acpi0: power button is handled as a fixed feature programming model.
ACPI timer looks GOOD min = 1, max = 2, width = 2
ACPI timer looks GOOD min = 1, max = 2, width = 2
ACPI timer looks GOOD min = 1, max = 2, width = 2
ACPI timer looks GOOD min = 1, max = 2, width = 2
ACPI timer looks GOOD min = 1, max = 2, width = 2
ACPI timer looks GOOD min = 1, max = 2, width = 2
ACPI timer looks GOOD min = 1, max = 2, width = 2
ACPI timer looks GOOD min = 1, max = 2, width = 2
ACPI timer looks GOOD min = 1, max = 2, width = 2
ACPI timer looks GOOD min = 1, max = 2, width = 2
Timecounter ACPI-fast  frequency 3579545 Hz
acpi_timer0: 24-bit timer at 3.579545MHz port 0xe408-0xe40b on acpi0
acpi_cpu0: CPU on acpi0
acpi_button0: Power Button on acpi0
acpi_pcib0: Host-PCI bridge port 0xcf8-0xcff on acpi0
pci0: PCI bus on acpi_pcib0
pcib1: PCI-PCI bridge at device 1.0 on pci0
pci1: PCI bus on pcib1
pci1: display, VGA at device 0.0 (no driver attached)
isab0: PCI-ISA bridge at device 4.0 on pci0
isa0: ISA bus on isab0
atapci0: VIA 82C686 ATA100 controller port 0xb800-0xb80f at device 4.1 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
uhci0: VIA 83C572 USB controller port 0xb400-0xb41f irq 5 at device 4.2 on pci0
usb0: VIA 83C572 USB controller on uhci0
usb0: USB revision 1.0
uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1: VIA 83C572 USB controller port 0xb000-0xb01f irq 5 at device 4.3 on pci0
usb1: VIA 83C572 USB controller on uhci1
usb1: USB revision 1.0
uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
dc0: Intel 21143 10/100BaseTX port 0x9400-0x947f mem 0xde80-0xde8003ff irq 10 at 
device 11.0 on pci0
dc0: Ethernet address: 00:80:ad:90:b4:38
miibus0: MII bus on dc0
dcphy0: Intel 21143 NWAY media interface on miibus0
dcphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
dc0: initialized as trusted interface
fdc0: enhanced floppy controller (i82077, NE72065 or clone) port 0x3f7,0x3f2-0x3f5 
irq 6 on acpi0
fdc0: FIFO enabled, 8 bytes threshold
fd0: 1440-KB 3.5 drive on fdc0 drive 0
ppc0 port 0x778-0x77b,0x378-0x37f irq 7 on acpi0
ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/8 bytes threshold
lpt0: Printer on ppbus0
lpt0: Interrupt-driven port
ppi0: Parallel I/O on ppbus0
plip0: PLIP network interface on ppbus0
lp0: initialized as untrusted interface
sio0 port 0x3f8-0x3ff irq 4 on acpi0
sio0: type 16550A
sio1 port 0x2f8-0x2ff irq 3 on acpi0
sio1: type 16550A
atkbdc0: Keyboard controller (i8042) port 0x64,0x60 irq 1 on acpi0
atkbd0: AT Keyboard flags 0x1 irq 1 on atkbdc0
kbd0 at atkbd0
psm0: PS/2 Mouse irq 12 on atkbdc0
psm0: model NetMouse/NetScroll Optical, device ID 0
orm0: Option ROM at iomem 0xc-0xc7fff on isa0
sc0: System console at flags 0x100 on isa0
sc0: VGA 16 virtual consoles, flags=0x300
vga0: Generic ISA VGA at port 

Re: if_dc broken in -current

2002-03-25 Thread Robert Watson

On Mon, 25 Mar 2002, Ilmar S. Habibulin wrote:

 On Mon, 25 Mar 2002, Stephen McKay wrote:
 
  What sort of card do you have?  The output of dmesg would help.  Have you
  tried 4.5 on this machine?
 I have some noname nic with Intel 21143 chip. dmesg attached. I'm using
 only trustedbsd_mac branch on my ws.
 
  Of course the dc driver should autonegotiate (and does so when I revert
  rev 1.56).  Your info could help trace this problem.
 Well, i don't think this is the problem. Hardware became too much
 inteligent now a days, so one have to use his own hands to make this
 hardware work like user wants it to work. Maybe just put some FAQ about
 dc(4) and autoconfigurable hubs/switches?

I think I have an identical problem involving a Linksys ethernet card
using if_dc.  I have to force it to negotiate 10mbps, since it fails to
negotiate anything higher with my 10/100 switch.  No idea why at all.

dc0: LC82C115 PNIC II 10/100BaseTX port 0xe800-0xe8ff mem
0xfebfff00-0xfebf irq 10 at device 19.0 on pci0
dc0: Ethernet address: 00:a0:cc:35:3e:56
miibus0: MII bus on dc0
dcphy0: Intel 21143 NWAY media interface on miibus0
dcphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto

dc0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500
inet6 fe80::2a0:ccff:fe35:3e56%dc0 prefixlen 64 scopeid 0x1 
inet 192.168.11.150 netmask 0xff00 broadcast 192.168.11.255
ether 00:a0:cc:35:3e:56 
media: Ethernet 10baseT/UTP
status: active

If I set it to auto-negotiate or hard-set to 100mbps, no packets go back
or forth.  I've had this problem for at least a year, if not longer.  I
have the same problem with 4.4-STABLE using an identical card on different
hardware: if it tries to negotiate 100mbps, then it simply doesn't work.
If I force it to 10, it's fine.

Robert N M Watson FreeBSD Core Team, TrustedBSD Project
[EMAIL PROTECTED]  NAI Labs, Safeport Network Services



To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



if_dc broken in -current

2002-03-22 Thread Stephen McKay

It's been quite a while since I updated my -current box, but when I did,
I was surprised to find that my DE500 network card (21143 chip) had stopped
working.  The switch showed no link.  Ifconfig showed no carrier.

After some fiddling, I reverted revision 1.56 (removal of mii_pollstat call)
of sys/pci/if_dc.c and the DE500 went back to normal.  It auto-negotiated
100Mbit full duplex, and now works fine.

I expect the problem is actually in mii/dcphy.c but since I have very little
understand of how this mii stuff is supposed to work, I have to leave that
to others.  If no one is available to give me a hand here, I'll have to
go with plan B which is to simply back out rev 1.56 of if_dc.c.  (That's
not such a bad plan really, just slightly inefficient.)

On a different dc driver note, I'm interested in knowing if anyone is using
either a PNIC or Davicom with -current.  There is a slight difference between
-current and -stable, and the code in -current caused problems with PNIC and
Davicom cards when it was briefly in -stable.  I'm assuming that nobody is
using such cards, and the little bit of code is going to annoy a few people
when they try the 5.0 prerelease.  I'd like to fix this before it causes
too much trouble.

For those who are curious, the troublesome piece of code is lines 1339 and
1340 (in rev 1.69):

if (isr  DC_ISR_TX_IDLE 
(isr  DC_ISR_RX_STATE) == DC_RXSTATE_STOPPED)

which waits for confirmation that the transmitter and receiver are both
idle before some configuration registers are fiddled with.  With PNIC
and Davicom cards, one or the other of these conditions never occurs.
Or at least that was the trouble when this was in -stable, back in August.
Could this problem have magically gone away?

Stephen.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: if_dc broken in -current

2002-03-22 Thread Ilmar S. Habibulin



On Sat, 23 Mar 2002, Stephen McKay wrote:

 It's been quite a while since I updated my -current box, but when I did,
 I was surprised to find that my DE500 network card (21143 chip) had stopped
 working.  The switch showed no link.  Ifconfig showed no carrier.

I've had the simular problem. Now i have media option set to needed value
in ifconfig_dc0 variable. This helped.



To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message