[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

kernel/1820: lmc1200 doesn't transmit




>Number:         1820
>Category:       kernel
>Synopsis:       current snap appears to initialize T1 card but no packets are sent
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 11 18:40:01 MDT 2001
>Last-Modified:
>Originator:     Hal Snyder
>Organization:
Vail Systems
net
>Release:        OpenBSD-2.9-current 2001-05-11 or earlier
>Environment:
	System      : OpenBSD 2.9
	Architecture: OpenBSD.i386
	Machine     : i386
>Description:
	lmc driver does not transmit enable T1 device

        The lmc driver was written to support T1 and T3 devices from
        SBE (formerly Lan Media). The wanADAPT-1T1E1 (formerly LMC1200P)
	is the newest of four cards in the family. It appears to
        initialize - see dmesg output at end of this report and you
        can assign p2p IP addresses

        # ifconfig lmc0
	lmc0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
	        inet 172.20.0.9 --> 172.20.0.10 netmask 0xfffffffc 
	        inet6 fe80::290:27ff:fe13:7136%lmc0 -> :: prefixlen 64 scopeid 0x1

        but the card fails to transmit without the patch below. I have
        confirmed with SBE engineering staff that this new card differs
        from other lmc devices in that it needs transmit enable set
        on startup rather than coming up in that state like the older
        cards.

>How-To-Repeat:
	Install an SBE wanADAPT-1T1E1 (formerly Lan Media LMC1200P) card.
        Configure IP4 point-to-point.
        Connect it to a live T1 device sending Cisco-HDLC.
>Fix:

The following patch has been tested at two sites. It does not impair the
working of the DS3 card in the same family - in fact a kernel linked with
this patch has been tested in a pair of systems, each using one DS1 and
one DS3 card, with both links operational.


Index: if_lmc_media.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_lmc_media.c,v
retrieving revision 1.4
diff -c -r1.4 if_lmc_media.c
*** if_lmc_media.c	2000/02/06 17:57:56	1.4
--- if_lmc_media.c	2001/05/11 22:18:12
***************
*** 894,899 ****
--- 894,903 ----
          sc->ictl.cardtype = LMC_CTL_CARDTYPE_LMC1200;
          mii16 = lmc_mii_readreg(sc, 0, 16);
  
+ 	mii16 &= ~LMC_MII16_T1_XOE;
+ 	lmc_mii_writereg (sc, 0, 16, mii16);
+ 	sc->lmc_miireg16 = mii16;
+ 
          /* reset 8370 */
          mii16 &= ~LMC_MII16_T1_RST;
          lmc_mii_writereg(sc, 0, 16, mii16 | LMC_MII16_T1_RST);
***************
*** 943,951 ****
  	{                lmc_t1_write(sc, 0x0E0+i, 0x0D);
  					/* SBCn - sys bus per-channel ctl    */
  	}
!         /*  XXX
!         mii16 |= LMC_MII16_T1_XOE;        lmc_mii_writereg(sc, 0, 16, mii16);
!         sc->lmc_miireg16 = mii16;        */
  }
  
  static void   lmc_t1_default(lmc_softc_t * const sc)
--- 947,956 ----
  	{                lmc_t1_write(sc, 0x0E0+i, 0x0D);
  					/* SBCn - sys bus per-channel ctl    */
  	}
! 
! 	mii16 |= LMC_MII16_T1_XOE;
! 	lmc_mii_writereg (sc, 0, 16, mii16);
! 	sc->lmc_miireg16 = mii16; 
  }
  
  static void   lmc_t1_default(lmc_softc_t * const sc)

---- end of patch ------

------------ dmesg from test system, before applying patch to fix lmc T1 -------

OpenBSD 2.9-current (QUALITY) #0: Fri May 11 12:26:28 CDT 2001
    hal@quality:/home/hal/obsd/src/sys/arch/i386/compile/QUALITY
cpu0: Intel Pentium II ("GenuineIntel" 686-class, 512KB L2 cache) 351 MHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SYS,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR
real mem  = 66695168 (65132K)
avail mem = 56811520 (55480K)
using 839 buffers containing 3436544 bytes (3356K) of memory
mainbus0 (root)
bios0 at mainbus0: AT/286+(00) BIOS, date 07/15/95, BIOS32 rev. 0 @ 0xfdb60
apm0 at bios0apm0: APM power management enable: power management disabled (1)
: Power Management spec V1.2 (BIOS mgmt disabled)
apm0: AC on, battery charge unknown
pcibios0 at bios0: rev. 2.1 @ 0xf0000/0x10000
pcibios0: PCI BIOS has 9 Interrupt Routing table entries
pcibios0: PCI bus #1 is the last bus
bios0: ROM list: 0xc0000/0x8000 0xc8000/0x4800
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 "Intel 82443BX PCI-AGP" rev 0x03
ppb0 at pci0 dev 1 function 0 "Intel 82443BX AGP" rev 0x03
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "ATI Mach64 GZ" rev 0x7a
wsdisplay0 at vga1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
pcib0 at pci0 dev 7 function 0 "Intel 82371AB PIIX4 ISA" rev 0x02
pciide0 at pci0 dev 7 function 1 "Intel 82371AB IDE" rev 0x01: DMA, channel 0 wired to compatibility, channel 1 wired to compatibility
uhci0 at pci0 dev 7 function 2 "Intel 82371AB USB" rev 0x01pci_intr_map: no mapping for pin D
: couldn't map interrupt
"Intel 82371AB Power Management" rev 0x02 at pci0 dev 7 function 3 not configured
lmc0 at pci0 dev 16 function 0 "DEC DECchip 21140" rev 0x22: T1
lmc0: pass 2.2, serial 00:60:99:00:24:4f, irq 10
ahc1 at pci0 dev 17 function 0 "Adaptec AHA-2940U" rev 0x00: irq 10
ahc1: Wide Channel A, SCSI Id=7, 16/255 SCBs
scsibus0 at ahc1: 16 targets
ahc1: target 0 using 16bit transfers
ahc1: target 0 synchronous at 10.0MHz, offset = 0x8
sd0 at scsibus0 targ 0 lun 0: <IBM, DNES-309170W, SA30> SCSI3 0/direct fixed
sd0: 8748MB, 11474 cyl, 5 head, 312 sec, 512 bytes/sec, 17916240 sec total
ahc1: target 3 using 8bit transfers
ahc1: target 3 synchronous at 10.0MHz, offset = 0xf
cd0 at scsibus0 targ 3 lun 0: <TOSHIBA, CD-ROM XM-6201TA, 1037> SCSI2 5/cdrom removable
fxp0 at pci0 dev 18 function 0 "Intel 82557" rev 0x05: irq 10, address 00:90:27:13:71:36
inphy0 at fxp0 phy 1: i82555 10/100 media interface, rev. 0
lmc1 at pci0 dev 19 function 0 "DEC DECchip 21140" rev 0x22: DS3
lmc1: pass 2.2, serial 00:60:99:00:14:6e, irq 5
isa0 at pcib0
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
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
sysbeep0 at pcppi0
npx0 at isa0 port 0xf0/16: 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
isapnp0 at isa0 port 0x279: read port 0x203
sb1 at isapnp0 "Creative SB16 PnP, CTL0031, , Audio" port 0x220/16,0x300/2,0x388/4 irq 7 drq 0,5: dsp v4.13
midi1 at sb1: <SB MPU-401 UART>
audio0 at sb1
opl0 at sb1: model OPL3
midi2 at opl0: <SB Yamaha OPL3>
wdc2 at isapnp0 "Creative SB16 PnP, CTL2011, PNP0600, IDE" port 0x1e8/8,0x3ee/2 irq 11
"Creative SB16 PnP, CTL0051, , StereoEnhance" at isapnp0 port 0x100/1 not configured
"Creative SB16 PnP, CTL7001, , Game" at isapnp0 port 0x200/8 not configured
biomask c40 netmask c60 ttymask c62
pctr: 686-class user-level performance counters enabled
mtrr: Pentium Pro MTRR support
lmc0: physical link up
lmc1: physical link up
dkcsum: sd0 matched BIOS disk 80
root on sd0a
rootdev=0x400 rrootdev=0xd00 rawdev=0xd02
lmc0: physical link up
lmc1: physical link up
WARNING: converted MAP_PRIVATE device mapping to MAP_SHARED (pid 32671 comm dmesg)

>Audit-Trail:
>Unformatted: