OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: diff to simplify rlphy(4) media setting code.

From: Joachim Schipper (j.schippermath.uu.nl)
Date: Wed Jan 03 2007 - 05:57:49 CST


On Mon, Jan 01, 2007 at 03:07:06PM -0500, Brad wrote:
> On Sun, Dec 31, 2006 at 12:06:02AM -0500, Brad wrote:
> > The following diff simplifies the media setting code in rlphy(4),
> > no functional change.
> >
> > If you have a network adapter with an rlphy(4) PHY attached
> > then please try this out, rlphy(4) can be found with adapters
> > such as axe(4), nfe(4), re(4), rl(4) or sis(4).
>
> Please test this second revision of the diff. It seems to resolve
> an issue that existed even with the exiting code where switching
> between autoneg and a set mode would not necessarily happen on the
> remote end, potentially leading to further issues.

I just compiled a new kernel with this patch, and get 'no carrier' on
rl0. dmesg attached (it does not change compared to the last kernel,
which did work, aside from the version number and a couple K of memory);
I'd be happy to help debug, but I don't really know what more
information you'll want.

To the best of my knowledge, the rl card is pretty unremarkable; and it
has served me well for many years under several different OSes (Windows
98, several Linuxes, OpenBSD 3.8 to -current), up to a couple hours ago,
so I'm disinclined to blame it on the hardware.

Note: my last kernel, which *did* work, is
OpenBSD 4.0-current (GENERIC) #3: Mon Jan 1 23:11:06 CET 2007
    rootmelpomene.jschipper.dynalias.net:/usr/src/sys/arch/i386/compile/GENERIC

Since this is very recent, and I do not recall any rl-related commits,
I'm inclined to believe it is indeed this patch that triggers the
problem. I'm building a new kernel now, to verify this.

                Joachim

OpenBSD 4.0-current (GENERIC) #4: Wed Jan 3 11:28:28 CET 2007
    rootmelpomene.jschipper.dynalias.net:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: AMD Athlon(tm) XP 2000+ ("AuthenticAMD" 686-class, 256KB L2 cache) 1.68 GHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE
real mem = 536375296 (523804K)
avail mem = 481198080 (469920K)
using 4256 buffers containing 26943488 bytes (26312K) of memory
mainbus0 (root)
bios0 at mainbus0: AT/286+(4c) BIOS, date 11/22/02, BIOS32 rev. 0 0xfb440, SMBIOS rev. 2.3 0xf0800 (39 entries)
apm0 at bios0: Power Management spec V1.2
apm0: AC on, battery charge unknown
apm0: flags 70102 dobusy 1 doidle 1
pcibios0 at bios0: rev 2.1 0xf0000/0xdf94
pcibios0: PCI IRQ Routing Table rev 1.0 0xfdf00/144 (7 entries)
pcibios0: PCI Exclusive IRQs: 5 10 11
pcibios0: PCI Interrupt Router at 000:17:0 ("VIA VT8233A ISA" rev 0x00)
pcibios0: PCI bus #1 is the last bus
bios0: ROM list: 0xc0000/0xfc00
acpi at mainbus0 not configured
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 "VIA VT8366 PCI" rev 0x00
ppb0 at pci0 dev 1 function 0 "VIA VT8366 AGP" rev 0x00
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 vendor "NVIDIA", unknown product 0x0173 rev 0xa3
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
rl0 at pci0 dev 9 function 0 "Realtek 8139" rev 0x10: irq 10, address 00:50:bf:d9:7f:67
rlphy0 at rl0 phy 0: RTL internal PHY
viapm0 at pci0 dev 17 function 0 "VIA VT8233A ISA" rev 0x00
iic0 at viapm0
pciide0 at pci0 dev 17 function 1 "VIA VT82C571 IDE" rev 0x06: ATA133, channel 0 configured to compatibility, channel 1 configured to compatibility
wd0 at pciide0 channel 0 drive 0: <Maxtor 6E040L0>
wd0: 16-sector PIO, LBA, 39205MB, 80293248 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 6
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <HL-DT-ST, RW/DVD GCC-4480B, 1.02> SCSI0 5/cdrom removable
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
uhci0 at pci0 dev 17 function 2 "VIA VT83C572 USB" rev 0x23: irq 11
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: VIA UHCI root hub, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1 at pci0 dev 17 function 3 "VIA VT83C572 USB" rev 0x23: irq 11
usb1 at uhci1: USB revision 1.0
uhub1 at usb1
uhub1: VIA UHCI root hub, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
auvia0 at pci0 dev 17 function 5 "VIA VT8233 AC97" rev 0x40: irq 5
ac97: codec id 0x414c4730 (Avance Logic ALC101)
ac97: codec features Realtek 3D
audio0 at auvia0
isa0 at mainbus0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pmsi0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pmsi0 mux 0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
lm0 at isa0 port 0x290/8: W83697HF
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pccom1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
biomask eb45 netmask ef45 ttymask ffc7
pctr: user-level cycle counter enabled
mtrr: Pentium Pro MTRR support
wd0c: aborted command, interface CRC error reading fsbn 64 (wd0 bn 64; cn 0 tn 1 sn 1), retrying
wd0: transfer error, downgrading to Ultra-DMA mode 5
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
wd0c: aborted command, interface CRC error reading fsbn 64 (wd0 bn 64; cn 0 tn 1 sn 1), retrying
wd0: soft error (corrected)
dkcsum: wd0 matches BIOS drive 0x80
root on wd0a
rootdev=0x0 rrootdev=0x300 rawdev=0x302
wd0: transfer error, downgrading to Ultra-DMA mode 4
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 4
wd0a: aborted command, interface CRC error reading fsbn 128 of 128-0 (wd0 bn 191; cn 0 tn 3 sn 2), retrying
wd0: transfer error, downgrading to Ultra-DMA mode 3
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 3
wd0a: aborted command, interface CRC error reading fsbn 128 of 128-0 (wd0 bn 191; cn 0 tn 3 sn 2), retrying
wd0: soft error (corrected)