Subject: SLIP or com problems (i386)
To: None <current-users@NetBSD.ORG>
From: Glenn E Durfee <gdurf+@andrew.cmu.edu>
List: current-users
Date: 06/03/1996 22:54:29
On Saturday June 1 I upgraded my NetBSD-1.1/i386 system to 1.2-alpha using sup.
I built the new compiler, and other build utilities.
I built a new kernel, new libraries, then finally all of the sources.
Everything worked perfectly.  In particular, I could log into school to start
SLIP with the following setup:

tty01 "/usr/libexec/getty std.38400" unknown off secure softcar

in my /etc/ttys; after logging in as root on console, I would type

cu -s 38400 -l /dev/tty01 dir

then log in, start SLIP at school; then, quitting cu, I would run

nohup slattach -s 38400 /dev/tty01
ifconfig sl0 inet myaddr annexaddr
route add default annexaddr

After which SLIP would operate perfectly.

BUT:

This morning (June 3) I supped again and recompiled my kernel.
Now, I can still use cu to talk to the modem and log into school; but, after
starting SLIP at school and dropping back to my machine and running the
three subsequent commands listed above, I get the following output
when I try to ping the annex, at the other end of my SLIP connection:

PING 128.2.232.34 (128.2.232.34): 56 data bytes
ping: sendto: No route to host
ping: wrote 128.2.232.34 64 chars, ret=-1
ping: sendto: No route to host
ping: wrote 128.2.232.34 64 chars, ret=-1

--- 128.2.232.34 ping statistics ---
2 packets transmitted, 0 packets received, 100% packet loss

Watching the LEDs on my modem carefully, it appears that even attempts to
ping the annex are not even reaching the modem.  Perhaps sl0 is confused
and can't figure out how to send stuff to the serial port anymore.

Furthermore, after killing slattach to try to fix the problem, I can no longer
access the serial port; if I try to use cu, it prints

cu: open (/dev/tty01): Operation not permitted
cu: /dev/tty01: Line in use

and something similar when I try to run slattach again.  However I 
USED to be able to talk to the serial port after killing slattach with
Saturday's sources.  Since there do not appear to be any lock files in place
or processes remaining that would use /dev/tty01, I cannot figure out how to
free up the port (short of rebooting!)

This problem persists when I omit "dir" in the command line to cu,
when I omit "nohup", when I suspend cu instead of quitting, and when I connect
with cu and slattach at a different speed. 

I see net/if_sl.c and /dev/isa/com.c have changed, and were of the few files
that got trasmitted in my most recent sup.  Could their recent changes
perhaps be the problem?  I forgot to make backups of Saturday's versions of
these files so I cannot compare to see what has changed or build working
kernels :(

I have appended my dmesg output and my kernel configuration file.

Any suggestions on how to go about debugging this problem?
Are there any other outputs of programs that might be helpful?

Any help would be appreciated,
Glenn Durfee

NetBSD 1.2_ALPHA (ISENGARD) #7: Mon Jun  3 20:22:47 EDT 1996
    gdurf@isengard.innova.com:/usr/src/sys/arch/i386/compile/ISENGARD
CPU: i386DX (386-class CPU)
real mem  = 12189696
avail mem = 9625600
using 174 buffers containing 712704 bytes of memory
mainbus0 (root)
isa0 at mainbus0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
lpt0 at isa0 port 0x378-0x37f irq 7
wdc0 at isa0 port 0x1f0-0x1f7 irq 14
wd0 at wdc0 drive 0: 325MB, 1010 cyl, 12 head, 55 sec, 512 bytes/sec
<WDC AC2340>
wd0: using 16-sector 16-bit pio transfers, chs addressing
wd1 at wdc0 drive 1: 202MB, 989 cyl, 12 head, 35 sec, 512 bytes/sec <WDC
AC2200F>
wd1: using 8-sector 16-bit pio transfers, chs addressing
ed0 at isa0 port 0x280-0x29f iomem 0xd0000-0xd3fff irq 9
ed0: address 00:00:c0:21:83:4b, type WD8013WC (16-bit) aui
sb0 at isa0 port 0x220-0x237 irq 5 drq 1: dsp v4.05
npx0 at isa0 port 0xf0-0xff irq 13
vt0 at isa0 port 0x60-0x6f irq 1: et4000, 80/132 col, color, 8 scr,
mf2-kbd, [R3.32]
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
fd1 at fdc0 drive 1: 1.2MB 80 cyl, 2 head, 15 sec
biomask 4060 netmask 4260 ttymask 42fa
changing root device to wd0a

My Kernel configuration file:

#	ISENGARD kernel configuration file
#	Last Modified: June 3, 1996 by Glenn Durfee <gdurf>

machine		i386		# architecture, used by config; REQUIRED

options		I386_CPU	# CPU classes; at least one is REQUIRED
#options	I486_CPU
#options	I586_CPU
#options	MATH_EMULATE	# floating point emulation
options		VM86		# Virtual 8086 emulation

# Some BIOSes don't get the size of extended memory right.  If you
# have a broken BIOS, uncomment the following and set the value
# properly for your system.
#options	EXTMEM_SIZE=... # size of extended memory

options		DUMMY_NOPS	# speed hack; recommended
options		XSERVER,UCONSOLE
options		INSECURE	# insecure; allow /dev/mem writing for X
options		MACHINE_NONCONTIG

maxusers	32		# estimated number of users
options		TIMEZONE=300	# time zone to adjust RTC time by
options		DST=1		# daylight savings time used by RTC

options		SWAPPAGER	# paging; REQUIRED
options		VNODEPAGER	# mmap() of files
options		DEVPAGER	# mmap() of devices

options		DDB		# in-kernel debugger
#makeoptions	DEBUG="-g"	# compile full symbol table
options		DIAGNOSTIC	# internal consistency checks
options		KTRACE		# system call tracing, a la ktrace(1)

options		SYSVMSG		# System V-like message queues
options		SYSVSEM		# System V-like semaphores
options		SYSVSHM		# System V-like memory sharing
#options	SHMMAXPGS=1024	# 1024 pages is the default

options		COMPAT_NOMID	# compatibility with 386BSD, BSDI, NetBSD 0.8,
options		COMPAT_09	# NetBSD 0.9,
options		COMPAT_10	# NetBSD 1.0,
options		COMPAT_11	# NetBSD 1.1,
options		COMPAT_43	# and 4.3BSD
options		TCP_COMPAT_42	# TCP bug compatibility with 4.2BSD

options		COMPAT_SVR4	# binary compatibility with SVR4
options		COMPAT_IBCS2	# binary compatibility with SCO and ISC
options		COMPAT_LINUX	# binary compatibility with Linux
options		COMPAT_FREEBSD	# binary compatibility with FreeBSD

options		USER_LDT	# user-settable LDT; used by WINE
options		LKM		# loadable kernel modules

options		FFS		# UFS
options		QUOTA		# UFS quotas
options		LFS		# log-structured file system
options		MFS		# memory file system

options		NFSCLIENT	# Network File System client
options		NFSSERVER	# Network File System server

options		CD9660		# ISO 9660 + Rock Ridge file system
options		MSDOSFS		# MS-DOS file system
options		FDESC		# /dev/fd
options		FIFO		# FIFOs; RECOMMENDED
options		KERNFS		# /kern
options		NULLFS		# loopback file system
options		PORTAL		# portal filesystem (still experimental)
options		PROCFS		# /proc
options		UMAPFS		# NULLFS + uid and gid remapping
options		UNION		# union file system

options		GATEWAY		# packet forwarding
#options	MULTICAST	# Internet MBone
#options	MROUTING
options		INET		# IP + ICMP + TCP + UDP
options		NS		# XNS
options		ISO,TPIP	# OSI
options		EON		# OSI tunneling over IP
options		CCITT,LLC,HDLC	# X.25

# options         PCVT_META_ESC=1         # alt-character sends
escape-character
options		PCVT_VT220KEYB=1
options         PCVT_SETCOLOR=1         # allow color changing
options		PCVT_INHIBIT_NUMLOCK=1
options		PCVT_SCREENSAVER=1
options		PCVT_NO_LED_UPDATE=1

config		netbsd	swap generic
options		GENERIC

mainbus0 at root

isa0	at mainbus0
#eisa0	at mainbus0
#pci0	at mainbus0 bus ?

#ppb*	at pci? dev ? function ?	# PCI-PCI bridges
#pci*	at ppb? bus ?

npx0	at isa? port 0xf0 irq 13	# math coprocessor

#pc0	at isa? port 0x60 irq 1		# generic PC console device
vt0	at isa? port 0x60 irq 1

com0	at isa? port 0x3f8 irq 4	# standard PC serial ports
com1	at isa? port 0x2f8 irq 3
#com2	at isa? port 0x3e8 irq 5
#com3	at isa? port 0x2e8 irq 9
#ast0	at isa? port 0x1a0 irq 5	# AST 4-port serial cards
#com*	at ast? slave ?
#boca0	at isa? port 0x100 irq 5	# BOCA 8-port serial cards
#com*	at boca? slave ?
#rtfps0	at isa? port 0x1230 irq 10	# RT 4-port serial cards
#com*	at rtfps? slave ?

#cy0	at isa? ...

lpt0	at isa? port 0x378 irq 7	# standard PC parallel ports
#lpt1	at isa? port 0x278
#lpt2	at isa? port 0x3bc

#lms0	at isa? port 0x23c irq 5	# Logitech bus mouse
#lms1	at isa? port 0x238 irq 5
#mms0	at isa? port 0x23c irq 5	# Microsoft InPort mouse
#mms1	at isa? port 0x238 irq 5
#pms0	at pckbd? irq 12		# PS/2 auxiliary port mouse

#aha0	at isa? port 0x330 irq ? drq ?	# Adaptec 154[02] SCSI controllers
#aha1	at isa? port 0x334 irq ? drq ?	# Adaptec 154[02] SCSI controllers
#scsibus* at aha?
#ahb*	at eisa? slot ?			# Adaptec 174[024] SCSI controllers
#scsibus* at ahb?
#ahc*	at eisa? slot ?			# Adaptec 284x SCSI controllers
#ahc*	at pci? dev ? function ?	# Adaptec 2940 SCSI controllers
#scsibus* at ahc?
#aic0	at isa? port 0x340 irq 11	# Adaptec 152[02] SCSI controllers
#scsibus* at aic?

#sd*	at scsibus? target ? lun ?	# SCSI disk drives
#st*	at scsibus? target ? lun ?	# SCSI tape drives
#cd*	at scsibus? target ? lun ?	# SCSI CD-ROM drives
#ch*	at scsibus? target ? lun ?	# SCSI autochangers

fdc0	at isa? port 0x3f0 irq 6 drq 2	# standard PC floppy controllers
#fdc1	at isa? port 0x370 irq ? drq ?
fd*	at fdc? drive ?

#mcd0	at isa? port 0x300 irq 10	# Mitsumi CD-ROM drives

wdc0	at isa? port 0x1f0 irq 14	# ST506, ESDI, and IDE controllers
#wdc1	at isa? port 0x170 irq ?
wd*	at wdc? drive ?

#wt0	at isa? port 0x300 irq 5 drq 1	# Archive and Wangtek QIC tape drives

ed0	at isa? port 0x280 iomem 0xd0000 irq 9	# WD/SMC, 3C503, and NE[12]000
#ed1	at isa? port 0x250 iomem 0xd8000 irq 9	#   ethernet cards
#ed2	at isa? port 0x300 iomem 0xcc000 irq 10
#eg0	at isa? ...				# 3C505 ethernet cards
#el0	at isa? port 0x300 irq 9		# 3C501 ethernet cards
#ep0	at isa? port ? irq ?			# 3C509 ethernet cards
#ie0	at isa? port 0x360 iomem 0xd0000 irq 7	# StarLAN and 3C507
#ie1	at isa? port 0x300 irq 10		# EtherExpress
#le0	at isa? port 0x320 irq 10 drq 7		# IsoLan, NE2100, and DEPCA
#ep*	at eisa? slot ?				# 3C579 ethernet cards
#fea*	at eisa? slot ?				# DEC DEFEA FDDI cards
#le*	at pci? dev ? function ?		# PCnet-PCI based ethernet cards
#de*	at pci? dev ? function ?		# DC21X4X-based ethernet cards
#ep*	at pci? dev ? function ?		# 3C590 ethernet cards
#fpa*	at pci? dev ? function ?		# DEC DEFPA FDDI cards

#pss0	at isa? port 0x220 irq 7 drq 6  # Personal Sound System
#sp0	at pss0 port 0x530 irq 10 drq 0	# 	sound port driver

sb0	at isa? port 0x220 irq 5 drq 1	# SoundBlaster
#wss0	at isa? port 0x530 irq 10 drq 0	# Windows Sound System
#pas0	at isa? port 0x220 irq 7 drq 1	# ProAudio Spectrum
#gus0	at isa? port 0x220 irq 7 drq 1 flags 6 # Gravis Ultra Sound (flags
is record drq for full-duplex)
#spkr0	at pckbd? port 0x61

# Joystick driver. Probe is a little strange; add only if you have one.
#joy0	at isa? port 0x201

pseudo-device	loop	1		# network loopback
pseudo-device	bpfilter 8		# packet filter
pseudo-device	sl	1		# CSLIP
pseudo-device	ppp	1		# PPP
pseudo-device	tun	4		# network tunneling over tty

pseudo-device	pty	64		# pseudo-terminals
#pseudo-device	tb	1		# tablet line discipline
pseudo-device	vnd	4		# paging to files
pseudo-device	ccd	4		# concatenated disk devices