From nobody@FreeBSD.ORG Wed Jun  9 18:51:20 1999
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id B599414D9E; Wed,  9 Jun 1999 18:51:20 -0700 (PDT)
Message-Id: <19990610015120.B599414D9E@hub.freebsd.org>
Date: Wed,  9 Jun 1999 18:51:20 -0700 (PDT)
From: tempest@ecst.csuchico.edu
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@freebsd.org
Subject: Certain cdcontrol commands don't work properly with my ATAPI CD-ROM drive
X-Send-Pr-Version: www-1.0

>Number:         12104
>Category:       kern
>Synopsis:       Certain cdcontrol commands don't work properly with my ATAPI CD-ROM drive
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun  9 19:00:00 PDT 1999
>Closed-Date:    Tue May 29 06:16:14 PDT 2001
>Last-Modified:  Tue May 29 06:17:15 PDT 2001
>Originator:     Ken Lui
>Release:        FreeBSD 3.2-RELEASE
>Organization:
>Environment:
FreeBSD black 3.2-RELEASE FreeBSD 3.2-RELEASE #11: Tue Jun  1 21:04:12 PDT 1999
     root@black.tmpest1.org:/usr/src/sys/compile/BLACK  i386

>Description:
Certain kernel functions for ATAPI CD-ROMs are broken. Namely close door
and pause don't work. First these problems manifested themselves with
wmcdplayer but they exhibit the same problem (though with more error
displayed) using cdcontrol. Note that closing the door and pausing works
fine under Linux 2.2.7 and the same hardware.

>How-To-Repeat:
Copyright (c) 1992-1999 FreeBSD Inc.
Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California. All rights reserved.
FreeBSD 3.2-RELEASE #11: Tue Jun  1 21:04:12 PDT 1999
    root@black.tmpest1.org:/usr/src/sys/compile/BLACK
Timecounter "i8254"  frequency 1193182 Hz
CPU: AMD-K6(tm) 3D processor (333.37-MHz 586-class CPU)
  Origin = "AuthenticAMD"  Id = 0x580  Stepping=0
  Features=0x8001bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8,MMX>
real memory  = 100663296 (98304K bytes)
avail memory = 94826496 (92604K bytes)
Preloaded elf kernel "kernel" at 0xc02d1000.
Preloaded userconfig_script "/boot/kernel.conf" at 0xc02d109c.
Probing for devices on PCI bus 0:
chip0: <AcerLabs M1541 (Aladdin-V) PCI host bridge> rev 0x04 on pci0.0.0
chip1: <AcerLabs M5243 PCI-PCI bridge> rev 0x04 on pci0.1.0
chip2: <AcerLabs M1533 portable PCI-ISA bridge> rev 0xb4 on pci0.7.0
ed1: <NE2000 PCI Ethernet (RealTek 8029)> rev 0x00 int a irq 9 on pci0.8.0
ed1: address 00:80:c8:fd:90:ae, type NE2000 (16 bit) 
ed2: <NE2000 PCI Ethernet (RealTek 8029)> rev 0x00 int a irq 9 on pci0.9.0
ed2: address 00:80:c8:fd:88:0d, type NE2000 (16 bit) 
adv0: <AdvanSys ASC3150 Ultra SCSI controller> rev 0x02 int a irq 9 on pci0.11.0
adv0: AdvanSys Ultra SCSI Host Adapter, SCSI ID 7, queue depth 240
ide_pci0: <Acer Aladdin IV/V (M5229) Bus-master IDE controller> rev 0x20 int a i
rq 0 on pci0.15.0
Probing for devices on PCI bus 1:
vga0: <Trident model 9750 VGA-compatible display device> rev 0xf3 int a irq 10 o
n pci1.6.0
Probing for PnP devices:
CSN 1 Vendor ID: CTL00f0 [0xf0008c0e] Serial 0xffffffff Comp ID: PNPb02f [0x2fb0
d041]
pcm1 (SB16pnp <Vibra16X> sn 0xffffffff) at 0x220-0x22f irq 5 drq 1 flags 0x10 on
 isa
Probing for devices on the ISA bus:
sc0 on isa
sc0: VGA color <16 virtual consoles, flags=0x0>
ed0 not found at 0x280
atkbdc0 at 0x60-0x6f on motherboard
atkbd0 irq 1 on isa
psm0 irq 12 on isa
psm0: model MouseMan+, device ID 0
sio0 at 0x3f8-0x3ff irq 4 flags 0x10 on isa
sio0: type 16550A
sio1 at 0x2f8-0x2ff irq 3 on isa
sio1: type 16550A
pcm0 not probed due to drq conflict with pcm1 at 1
fdc0 at 0x3f0-0x3f7 irq 6 drq 2 on isa
fdc0: FIFO enabled, 8 bytes threshold
fd0: 1.44MB 3.5in
wdc0 at 0x1f0-0x1f7 irq 14 flags 0xa0ffa0ff on isa
wdc0: unit 0 (wd0): <ST31720A>, DMA, 32-bit, multi-block-16
wd0: 1625MB (3329424 sectors), 3303 cyls, 16 heads, 63 S/T, 512 B/S
wdc0: unit 1 (wd1): <QUANTUM FIREBALL EX3.2A>, 32-bit, multi-block-16
wd1: 3079MB (6306048 sectors), 6256 cyls, 16 heads, 63 S/T, 512 B/S
wdc1 at 0x170-0x177 irq 15 flags 0xa0ffa0ff on isa
wdc1: unit 1 (wd3): <Maxtor 90432D2>, 32-bit, multi-block-16
wd3: 4121MB (8440992 sectors), 8374 cyls, 16 heads, 63 S/T, 512 B/S
wdc1: unit 0 (atapi): <OTI-HERMES/F910v320>, removable, intr, dma, iordy
acd0: drive speed 1031KB/sec, 120KB cache
acd0: supported read types: CD-DA
acd0: Audio: play, 255 volume levels
acd0: Mechanism: ejectable tray
acd0: Medium: no/blank disc inside, unlocked
ppc0 at 0x378 irq 7 flags 0x40 on isa
ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/1 bytes threshold
lpt0: <generic printer> on ppbus 0
lpt0: Interrupt-driven port
lpt0: <generic printer> on ppbus 0
lpt0: Interrupt-driven port
adv0 not found at 0x330
vga0 at 0x3b0-0x3df maddr 0xa0000 msize 131072 on isa
npx0 on motherboard
npx0: INT 16 interface
apm0 on isa
apm: found APM BIOS version 1.2
Waiting 5 seconds for SCSI devices to settle
changing root device to wd3s1a
da0 at adv0 bus 0 target 0 lun 0
da0: <SEAGATE ST32550N 0021> Fixed Direct Access SCSI-2 device 
da0: 10.000MB/s transfers (10.000MHz, offset 15), Tagged Queueing Enabled
da0: 2047MB (4194058 512 byte sectors: 255H 63S/T 261C)

ATAPI is a master on second IDE channel.

su# cdcontrol -f /dev/acd0 eject
black </root>
su# cdcontrol -f /dev/acd0 close            # pauses before I get
                                            # prompt back but tray
                                            # doesn't close
black </root>
su# cdcontrol -f /dev/acd0 play 16
black </root>
su# cdcontrol -f /dev/acd0 pause
black </root>
su# cdcontrol -f /dev/acd0 resume              # doesn't resume
black </root>
su# echo $?
255
black </root>
su# cdcontrol -f /dev/acd0 stop 
black </root>
su# echo $?
0
black </root>
su# cdcontrol -f /dev/acd0 eject
black </root>
su# echo $?
0
black </root>
su# cdcontrol -f /dev/acd0 close         # again, pauses about 1.5secs
                                         # before I get prompt back but
                                         # tray doesn't close
black </root>
su# echo $?
0

>Fix:


>Release-Note:
>Audit-Trail:

From: Tony Finch <fanf@demon.net>
To: FreeBSD-gnats-submit@freebsd.org, tempest@ecst.csuchico.edu
Cc:  
Subject: Re: kern/12104: Certain cdcontrol commands don%27t work properly with my ATAPI CD-ROM drive
Date: Wed, 05 Jan 2000 12:40:49 +0000

 I have the same problem, but with a couple of additional issues: if I
 use `cdcontrol status` or `cdcontrol info` while the cd is playing
 then playing stops. Also, when I use `cdcontrol close` the kernel logs
 "read_toc failed" twice (it also does this if I use `cdcontrol play`
 when the drive is open).
 
 
 Copyright (c) 1992-1999 FreeBSD Inc.
 Copyright (c) 1982, 1986, 1989, 1991, 1993
 	The Regents of the University of California. All rights reserved.
 FreeBSD 3.3-STABLE-19991115 #0: Mon Nov 15 14:39:47 GMT 1999
     root@fanf.eng.demon.net:/usr/src/sys/compile/DELL-PREC410-SMP
 Timecounter "i8254"  frequency 1193182 Hz
 CPU: Pentium III (686-class CPU)
   Origin = "GenuineIntel"  Id = 0x673  Stepping = 3
   Features=0x383fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,<b25>>
 real memory  = 268435456 (262144K bytes)
 avail memory = 258355200 (252300K bytes)
 Programming 24 pins in IOAPIC #0
 FreeBSD/SMP: Multiprocessor motherboard
  cpu0 (BSP): apic id:  0, version: 0x00040011, at 0xfee00000
  cpu1 (AP):  apic id:  1, version: 0x00040011, at 0xfee00000
  io0 (APIC): apic id:  2, version: 0x00170011, at 0xfec00000
 Preloaded elf kernel "kernel" at 0xc02b8000.
 Preloaded userconfig_script "/boot/kernel.conf" at 0xc02b809c.
 Pentium Pro MTRR support enabled
 Probing for devices on PCI bus 0:
 chip0: <Intel 82443BX host to PCI bridge> rev 0x03 on pci0.0.0
 chip1: <Intel 82443BX host to AGP bridge> rev 0x03 on pci0.1.0
 chip2: <Intel 82371AB PCI to ISA bridge> rev 0x02 on pci0.7.0
 ide_pci0: <Intel PIIX4 Bus-master IDE controller> rev 0x01 on pci0.7.1
 chip3: <Intel 82371AB Power management controller> rev 0x02 on pci0.7.3
 xl0: <3Com 3c905B-TX Fast Etherlink XL> rev 0x00 int a irq 19 on pci0.17.0
 xl0: Ethernet address: 00:c0:4f:60:49:dd
 xl0: autoneg complete, link status good (half-duplex, 100Mbps)
 chip4: <PCI to PCI bridge (vendor=1011 device=0024)> rev 0x03 on pci0.19.0
 Probing for devices on PCI bus 1:
 vga0: <VGA-compatible display device> rev 0x11 int a irq 16 on pci1.0.0
 Probing for devices on PCI bus 2:
 ahc0: <Adaptec aic7890/91 Ultra2 SCSI adapter> rev 0x00 int a irq 18 on pci2.10.0
 ahc0: aic7890/91 Wide Channel A, SCSI Id=7, 16/255 SCBs
 ahc1: <Adaptec aic7880 Ultra SCSI adapter> rev 0x01 int a irq 18 on pci2.14.0
 ahc1: aic7880 Wide Channel A, SCSI Id=7, 16/255 SCBs
 Probing for PnP devices:
 CSN 1 Vendor ID: CSC6835 [0x3568630e] Serial 0xffffffff Comp ID: @@@0000 [0x00000000]
 mss_attach <CS4236B>1 at 0x530 irq 5 dma 1:0 flags 0x10
 pcm1 (CS423x/Yamaha/AD1816 <CS4236B> sn 0xffffffff) at 0x530-0x537 irq 5 drq 1 flags 0x10 on isa
 Probing for devices on the ISA bus:
 sc0 on isa
 sc0: VGA color <16 virtual consoles, flags=0x0>
 atkbdc0 at 0x60-0x6f on motherboard
 atkbd0 irq 1 on isa
 psm0 irq 12 on isa
 psm0: model Generic PS/2 mouse, device ID 0
 sio0 at 0x3f8-0x3ff irq 4 flags 0x10 on isa
 sio0: type 16550A
 sio1 at 0x2f8-0x2ff irq 3 on isa
 sio1: type 16550A
 fdc0 at 0x3f0-0x3f7 irq 6 drq 2 on isa
 fdc0: FIFO enabled, 8 bytes threshold
 fd0: 1.44MB 3.5in
 wdc0 not found at 0x1f0
 wdc1 at 0x170-0x177 irq 15 on isa
 wdc1: unit 0 (atapi): <SAMSUNG SC-140B/    d003>, removable, intr, dma, iordis
 acd0: drive speed 6875KB/sec, 128KB cache
 acd0: supported read types: CD-R, CD-RW, CD-DA, packet track
 acd0: Audio: play, 255 volume levels
 acd0: Mechanism: ejectable tray
 acd0: Medium: CD-ROM 120mm audio disc loaded, unlocked
 ppc0 at 0x378 irq 7 flags 0x40 on isa
 ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
 ppc0: FIFO with 16/16/8 bytes threshold
 lpt0: <generic printer> on ppbus 0
 lpt0: Interrupt-driven port
 ppi0: <generic parallel i/o> on ppbus 0
 npx0 on motherboard
 npx0: INT 16 interface
 vga0 at 0x3b0-0x3df maddr 0xa0000 msize 131072 on isa
 APIC_IO: Testing 8254 interrupt delivery
 APIC_IO: routing 8254 via pin 2
 SMP: AP CPU #1 Launched!
 changing root device to da0s1a
 da0 at ahc0 bus 0 target 0 lun 0
 da0: <SEAGATE ST39103LW 0001> Fixed Direct Access SCSI-2 device 
 da0: 80.000MB/s transfers (40.000MHz, offset 15, 16bit), Tagged Queueing Enabled
 da0: 8683MB (17783240 512 byte sectors: 255H 63S/T 1106C)
 
State-Changed-From-To: open->closed 
State-Changed-By: sos 
State-Changed-When: Tue May 29 06:16:14 PDT 2001 
State-Changed-Why:  
The ATA system has been rewritten, so this is no longer valid. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=12104 
>Unformatted:
