Subject: ATAPI support in 1.3
To: None <port-i386@NetBSD.ORG>
From: Michael C. Richardson <mcr@sandelman.ottawa.on.ca>
List: port-i386
Date: 02/23/1998 18:42:47
-----BEGIN PGP SIGNED MESSAGE-----


  I have a:

wdc0 at isa0 port 0x1f0-0x1f7 irq 14
atapibus0 at wdc0
cd0 at atapibus0 drive 1: <CD820E.1v1078300, , 3.00> type 5 cdrom removable
wd0 at wdc0 drive 0: <FUJITSU MPA3017AT>
wd0: 1668MB, 3390 cyl, 16 head, 63 sec, 512 bytes/sec
wd0: using 16-sector 16-bit pio transfers, lba addressing

  I have xmcd, built by another fellow (can't recall who right now), because
the one that I built with lesstif didn't work at all.

  I have a number of problems with it.
    1. when I start xmcd I get:

wdc0(1): lost interrupt
wdc0(1): lost interrupt
wdc0(1): lost interrupt
wdc0(1): lost interrupt

on my console.

  In the window that it was started (its stdout/stderr) it says:

varrus-[~] mcr 3 >CD audio: SCSI command fault on /dev/rcd0d:
Opcode=0x1a Status=0x3

  the system then freezes for around 40 seconds (mouse pointer doesn't
work, X doesn't update, can't switch consoles) with the CD led orange (which 
means "data" access), and the IDE adaptor led (The "HD" led) on.
  After the fourty seconds, xmcd opens up a window, saying 
	"Device /dev/rcd0d is not SCSI-2 compliant"

  The CD then starts playing, with the CD led going green.

  The only way that I figured out to make xmcd happy was to tell it that
I had a SCSI-2 CD. (If someone has a better suggestion on what manufacturer
type I should pick, I'm welcome to ideas)
  Having done that it, it manages to read the CD tracks, and queries the net
for the right track titles. Things work... "okay" 
  Now, if one changes CD's, the orange led comes again, the system freezes
for a shorter time (maybe 10 seconds), the console says:

wdc0(1): lost interrupt
wdc0(1): lost interrupt
wdc0(1): lost interrupt
wdc0(1): lost interrupt
wdc0(1): lost interrupt
cd0(wdc0:1): host adapter code inconsistency

  At which point, having failed to read the new track info, and having
apparently a bug where it forgets to flush the track buffers, it looks up the
previous CD again. This means that it can't do things like skip to the next
song, since the offsets aren't correct.

  Version of xmcd:

Only thing that I can find with a version number:
        xmcd.h  6.5 96/12/22

  (At this point, I eject the CD with xmcd. It tries to read the
CD, pulling the empty tray in before I put my new CD in. At this point, I
can't get xmcd to open the tray, so I push the eject button a bunch of times)

  I insert the InfoMagic NetBSD 1.2.1 disk.
  xmcd tries to read the track list again. My window where I typed 'su'
to mount the disk freezes, waiting for the IDE HD.

Console:
wdc0(1): lost interrupt
wdc0(1): lost interrupt
wdc0(1): lost interrupt
wdc0(1): lost interrupt
wdc0(1): lost interrupt
cd0(wdc0:1): host adapter code inconsistency

Window:
CD audio: SCSI command fault on /dev/rcd0d:
Opcode=0x47 Status=0x3

  Things return to normal.

varrus# mount /cdrom
cd9660: : Invalid argument

Console says:
cd0(wdc0:1): illegal request

  I quit xmcd.

mount /cdrom
cd9660: : Invalid argument

Console:
cd0(wdc0:1): illegal request

  Push eject button on CDrom. It opens.

# mount /cdrom
cd9660: : Invalid argument
  
  [it closes, says illegal request on console again]

varrus# !!
mount /cdrom
{console:
wdc0(1): lost interrupt
wdc0(1): lost interrupt
wdc0(1): lost interrupt
wdc0(1): lost interrupt
wdc0(1): lost interrupt
}
cd9660: : Input/output error

  If I fuss around a lot with it, open/close, etc. then I may finally
be able to mount the CD. (My /etc/fstab has all the right incantations)

  This box is my X-terminal. I'd like to mount random stuff, and listen
to music. The fact that it is an IDE box shouldn't upset anyone: I have a
real (SCSI) system that doesn't run X to compile things on and do computing. 

  I can reboot this box to Win95. The CDROM appears to mostly work okay,
but the system does tend to freeze completely more often when I mess with the
CDROM, but being win95, I don't know --- it could be just acting normally.
  I suspected that the master/slave stuff wasn't set right. I have double
checked. Originally the CD rom was a "slave" on the secondary IDE interface.
I moved it to being a master/only device --- no help, and then to being
on the primary IDE bus, same results.

  I will be bringing my system in to have it serviced for this, but I need
to determine that it is a hardware problem first. Thoughts?
  I'm open to trying something other than xmcd, but please suggest something
specific, as there are several things in just the pkgsrc. (I wish that
the README from the distribution was included so I'd know what each thing
did...)

   :!mcr!:            |  Sandelman Software Works Corporation, Ottawa, ON  
   Michael Richardson |Network and security consulting and contract programming
 Personal: mcr@sandelman.ottawa.on.ca. PGP key available.
 Corporate: sales@sandelman.ottawa.on.ca. 

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: latin1
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface

iQB1AwUBNPIJdNiXVu0RiA21AQHglAL+IBCfWzijaKkOWzaNOH507kmkag2WFDqL
DB4W3Eu9QaqFfCbkJsLW4FgOJAV/CY1LBab7MuA1oNEqbaWhjZOn3ncVrb8Tu34/
1HJhdKJsVNC0JlfAL8MzDZkII/E7qADm
=fENv
-----END PGP SIGNATURE-----