Subject: port-i386/2246: sea driver problems in 1.1 (and -current, I think)
To: None <gnats-bugs@NetBSD.ORG>
From: None <tsarna@endicor.com>
List: netbsd-bugs
Date: 03/20/1996 23:46:34
>Number:         2246
>Category:       port-i386
>Synopsis:       reversed test, timeouts, and biodone panic
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 21 14:50:02 1996
>Last-Modified:
>Originator:     Ty Sarna
>Organization:
Endicor Technologies, Inc., San Antonio, Texas
>Release:        NetBSD-1.1
>Environment:

No-name (actually "YANG AN YI YA-1") 486DX25 mb, 8M, WD8013EBT as ed2,
sea0.  kocth11's kernel except sea0 at irq15, and later with thje patch
for the first bug (see below).  sd0 is a Quantum Fireball 1080 at id1,
cd0 is a SONY 2x drive at id3 (don't know the model offhand, but it's
the one for $60 from Insight posted about recently), st0 is a Wangtek
5150ES at id4.  There are also wd0 and wd1, which are not involved as
far as I can tell. sea0 is a Future Domain TMC950 based card with
IDE and floppy on it.

>Description:
	1. Reversed test causes Identify messages to not be handled
		(then, when 1 is fixed:)
	2. I'm getting timeouts on sd0 for some reason
	3. Resulting from 2, the timeout handling is broken somehow and I
	   get "biodone already" panics.
	
>How-To-Repeat:

	1. Murder, rape, pillage, and tortune, then eventually die.
	2. Due to 1, acquire major bad kharma and thus in next life,
           have to get NetBSD running on a system with a Future Domain
	   TMC950 SCSI controller as sea0.
	3. Attempt to boot kcoth11 kernel and get this error message:

	   	sea0: expecting IDENTIFY message, got 0x80

	4. Browse curent code, discover reversed test of MSG_ISIDENTFY
	   in sea_reselect(), apparently introduced when the macro was.
	5. Fix this (add ! in front of MSG_...)
	6. Try again, have things mostly work, but with occaisonal
	   "sea(0:0:0) timeout" and "timeout AGAIN" messages.
	7. Watch, and eventually (just a couple minutes, less with more
	   activity) have the kernel panic eventually with "biodone
	   already" right after a "timeout AGAIN" message.

>Fix:

	Problem #1 is easy, add a ! to the MSG_ISIDENTIFY() test in
	sea_reselect(). #2 and #3 I'm not sure about.

	Alternate fix: import the FreeBSD driver, since a quick look
	indicates it's seen some major work, including some speed
        improvements (up to a whopping 350kb/s or so...)

	Unfortunately I can't do much, since the machine won't stay up
	long enough to compile kernels. A samaritan built a couple for
	me, allowing me to try the first fix, but debugging at a
	kernel per day is tough, and I'm not sure how long he's going to
	want to keep up building kernels :-)
>Audit-Trail:
>Unformatted: