Subject: cdplay crashes kernel on 4.0_BETA2 (long)
To: NetBSD port-sparc mailing list <port-sparc@netbsd.org>
From: Julian Coleman <jdc@coris.org.uk>
List: port-sparc
Date: 01/02/2007 12:21:45
It's not possible to use `cdplay` to play CD's on sparc/sparc64 with 4.0
Beta 2, as trying to will crash the kernel.  For example, on an Ultra 60:

ultra60 $ dmesg | <just the relevant bits>
  esiop3 at pci2 dev 1 function 1: Symbios Logic 53c875 (ultra-wide scsi)
  scsibus3 at esiop3: 16 targets, 8 luns per target
  st0 at scsibus3 target 4 lun 0: <EXABYTE, EXB-8505SMBANSH2, 07T0> tape removable
  st0: drive empty
  st0: sync (200.00ns offset 11), 8-bit (5.000MB/s) transfers
  cd1 at scsibus3 target 6 lun 0: <PLEXTOR, CD-R   PX-W124TS, 1.07> cdrom removable
  cd1: sync (50.00ns offset 8), 8-bit (20.000MB/s) transfers

ultra60 $ cdplay -f /dev/cd1c info
  esiop3: unexpected phase mismatch 1
  esiop3: unhandled scsi interrupt, sist=0xc0 sstat1=0x89 DSA=0xfe319600 DSP=0x580
  cd1(esiop3:0:6:0): command timeout, CDB: 0x25 00 00 00 00 00 00 00 00 00
  esiop3: scsi bus reset
  st0: async, 8-bit transfers
  cd1(esiop3:0:6:0): command with tag id -1 reset
  cd1: async, 8-bit transfers
  esiop3: DMA IRQ: Illegal instruction DMA fifo empty, DSP=0x740, DSA=0xfe319760: I/L/Q=6/0/-1
  last msg_in=0x0 status=0xff
  esiop3: scsi bus reset
  cd1: async, 8-bit transfers
  cd1(esiop3:0:6:0): command with tag id -1 reset
  esiop3: DMA IRQ: Illegal instruction DMA fifo empty, DSP=0x740, DSA=0xfe3198c0: I/L/Q=6/0/-1
  last msg_in=0x0 status=0xff
  
   [ repeat 5 times with different DSA address until ... ]

  esiop3: scsi bus reset
  cd1: async, 8-bit transfers
  cd1(esiop3:0:6:0): command with tag id -1 reset
  esiop3: DMA IRQ: Illegal instruction DMA fifo empty, DSP=0x740, DSA=0xfe318160: I/L/Q=6/0/-1
  last msg_in=0x0 status=0xff
  esiop3: scsi bus reset
  cd1: async, 8-bit transfers
  cd1(esiop3:0:6:0): command with tag id -1 reset
  panic: buf mem pool index 55

Trying `cdplay` on an Ultra 1 gives:

  (esp0:6:0): selection failed; 0 left in FIFO [intr 18, stat 81, step 3]
  cd0(esp0:0:6:0): esp0: timed out [ecb 0x21c7f40 (flags 0x1, dleft 8, stat 0)], <state 2, nexus 0x21c7f40, phase(l 1, c 1, p 3), resid 0, msg(q 20,o 0) >

etc., and we crash with the same `panic: buf mem pool index 55'.

On a SPARCstation 20, we crash and reset.

I guess this is a problem with siop/esiop that has been caused by some change
in the CD handling code, but I'm not sure which change.

The kernel I'm currently using on the Ultra 60 is 3.99.16 from March 4th,
2006.  When I first access a new CD using that version, I see:

  cd1(esiop3:0:6:0):  Check Condition on CDB: 0x1a 00 00 00 0c 00
      SENSE KEY:  Illegal Request
       ASC/ASCQ:  Illegal Field in CDB
  
  cd1(esiop3:0:6:0):  Check Condition on CDB: 0x08 00 00 00 01 00
      SENSE KEY:  Illegal Request
       ASC/ASCQ:  Illegal Mode For This Track
  
  cd1: disk label read error

but things work normally after,

Any pointers?

Thanks,

J

-- 
  My other computer also runs NetBSD    /        Sailing at Newbiggin
        http://www.netbsd.org/        /   http://www.newbigginsailingclub.org/