From cmjg@tribble.ilrt.bris.ac.uk  Fri Jan 12 03:27:14 2001
Return-Path: <cmjg@tribble.ilrt.bris.ac.uk>
Received: from tribble.ilrt.bris.ac.uk (tribble.ilrt.bris.ac.uk [137.222.34.34])
	by hub.freebsd.org (Postfix) with ESMTP id 3768E37B400
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 12 Jan 2001 03:27:13 -0800 (PST)
Received: (from cmjg@localhost)
	by tribble.ilrt.bris.ac.uk (8.11.1/8.11.1) id f0CBRBw06516;
	Fri, 12 Jan 2001 11:27:11 GMT
	(envelope-from cmjg)
Message-Id: <200101121127.f0CBRBw06516@tribble.ilrt.bris.ac.uk>
Date: Fri, 12 Jan 2001 11:27:11 GMT
From: jan.grant@bristol.ac.uk
Reply-To: jan.grant@bristol.ac.uk
To: FreeBSD-gnats-submit@freebsd.org
Subject: ATAPI CD open causes "ticks" on IDE drive
X-Send-Pr-Version: 3.2

>Number:         24272
>Category:       i386
>Synopsis:       ATAPI CD "open" causes "ticks" as ATA drive is pinged
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 12 03:30:00 PST 2001
>Closed-Date:    Tue May 29 06:25:14 PDT 2001
>Last-Modified:  Tue May 29 06:26:00 PDT 2001
>Originator:     jan grant
>Release:        FreeBSD 4.2-STABLE i386
>Organization:
ILRT, University of Bristol
>Environment:
4-stable cvsupped yesterday

FreeBSD tribble.ilrt.bris.ac.uk 4.2-STABLE FreeBSD 4.2-STABLE #0: Thu Jan 11 21:14:50 GMT 2001     cmjg@tribble.ilrt.bris.ac.uk:/external/usr.obj/usr/src/sys/JAN  i386

Relevant lines from dmesg:
atapci0: <Intel PIIX4 ATA33 controller> port 0x14a0-0x14af at device 7.1 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
ad0: 8063MB <WDC AC38400L> [16383/16/63] at ata0-master UDMA33
acd0: CDROM <SAMSUNG CD-ROM SCR-3231> at ata1-master using PIO4

A GENERIC kernel with the following additions:

#Sound...
device		pcm

>Description:

(I'm a KDE-1 user) kscd was running (no CD in the tray). The system produced an
insistent "ticking" sound once per second. This appeared to be caused by the
IDE drive on the primary master springing into life (the drive-in-use light
flashes once per second or so).

Looking at recent logs (prior to this the last CVSUP was about 10 days ago)
this may have been introduced at about the same time the "close tray on open"
changes were made (you need nimble fingers to get a CD into the drive with
kscd trying to open it! :-) - this may be a problem with kscd repeatedly
trying to open the CD but I'd imagine most desktop CD players operate after
a similar fashion)

I don't really care about the CD tray behaviour; but the system seems to
be pinging the ATA drive on the main controller for every attempted CD open.
This is the problem!

>How-To-Repeat:

CVSUP to stable as of 11 jan 2001 and run kscd on a machine with an ATA drive on
IDE primary master, ATAPI CD on primary slave.

>Fix:

Haven't located the exact problem in source.

>Release-Note:
>Audit-Trail:

From: Soren Schmidt <sos@freebsd.dk>
To: jan.grant@bristol.ac.uk
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: i386/24272: ATAPI CD open causes "ticks" on IDE drive
Date: Fri, 12 Jan 2001 12:55:58 +0100 (CET)

 It seems jan.grant@bristol.ac.uk wrote:
 > 
 > >Number:         24272
 > >Category:       i386
 > >Synopsis:       ATAPI CD "open" causes "ticks" as ATA drive is pinged
 > >Confidential:   no
 > >Severity:       non-critical
 > >Priority:       medium
 > >Responsible:    freebsd-bugs
 > >State:          open
 > >Quarter:        
 > >Keywords:       
 > >Date-Required:
 > >Class:          sw-bug
 > >Submitter-Id:   current-users
 > >Arrival-Date:   Fri Jan 12 03:30:00 PST 2001
 > >Closed-Date:
 > >Last-Modified:
 > >Originator:     jan grant
 > >Release:        FreeBSD 4.2-STABLE i386
 > >Organization:
 > ILRT, University of Bristol
 > >Environment:
 > 4-stable cvsupped yesterday
 > 
 > FreeBSD tribble.ilrt.bris.ac.uk 4.2-STABLE FreeBSD 4.2-STABLE #0: Thu Jan 11 21:14:50 GMT 2001     cmjg@tribble.ilrt.bris.ac.uk:/external/usr.obj/usr/src/sys/JAN  i386
 > 
 > Relevant lines from dmesg:
 > atapci0: <Intel PIIX4 ATA33 controller> port 0x14a0-0x14af at device 7.1 on pci0
 > ata0: at 0x1f0 irq 14 on atapci0
 > ata1: at 0x170 irq 15 on atapci0
 > ad0: 8063MB <WDC AC38400L> [16383/16/63] at ata0-master UDMA33
 > acd0: CDROM <SAMSUNG CD-ROM SCR-3231> at ata1-master using PIO4
 > 
 > A GENERIC kernel with the following additions:
 > 
 > #Sound...
 > device		pcm
 > 
 > >Description:
 > 
 > (I'm a KDE-1 user) kscd was running (no CD in the tray). The system produced an
 > insistent "ticking" sound once per second. This appeared to be caused by the
 > IDE drive on the primary master springing into life (the drive-in-use light
 > flashes once per second or so).
 > 
 > Looking at recent logs (prior to this the last CVSUP was about 10 days ago)
 > this may have been introduced at about the same time the "close tray on open"
 > changes were made (you need nimble fingers to get a CD into the drive with
 > kscd trying to open it! :-) - this may be a problem with kscd repeatedly
 > trying to open the CD but I'd imagine most desktop CD players operate after
 > a similar fashion)
 > 
 > I don't really care about the CD tray behaviour; but the system seems to
 > be pinging the ATA drive on the main controller for every attempted CD open.
 > This is the problem!
 > 
 > >How-To-Repeat:
 > 
 > CVSUP to stable as of 11 jan 2001 and run kscd on a machine with an ATA drive on
 > IDE primary master, ATAPI CD on primary slave.
 
 Hmm, if kscd is polling the drive once a second, and you have both
 disk and CDROM on the primary, I'd bet those blinking lights are
 from accesses to the CDROM and not the disk...
 
 However in you probemessages above disk and CDROM are located on
 seperate controllers, so now what gives ?
 
 -Sren
 

From: Jan Grant <Jan.Grant@bristol.ac.uk>
To: Soren Schmidt <sos@freebsd.dk>
Cc: jan.grant@bristol.ac.uk, FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: i386/24272: ATAPI CD open causes "ticks" on IDE drive
Date: Fri, 12 Jan 2001 12:10:42 +0000 (GMT)

 On Fri, 12 Jan 2001, Soren Schmidt wrote:
 
 > Hmm, if kscd is polling the drive once a second, and you have both
 > disk and CDROM on the primary, I'd bet those blinking lights are
 > from accesses to the CDROM and not the disk...
 > 
 > However in you probemessages above disk and CDROM are located on
 > seperate controllers, so now what gives ?
 
 As I said, it really does sound like the hard drive head is "ticking";
 there is a separate CD-rom activity light and both lights generally
 only come on during activity of the appropriate device.
 
 Yes, the two devices _are_ on separate controllers. It may be that the
 hardware causes both devices/controllers to jump on a tray-close; I'm
 not a hardware expert.
 
 In either case, it is definitely being caused by the tray-close-on-open
 CD behaviour (which I'd contend is pretty broken; if such behaviour is
 required by a user program, it can close the tray itself).
 
 In other words, I think the recent change in behaviour is broken; it
 just so happens that it's come to light due to kscd.
 
 -- 
 jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
 Tel +44(0)117 9287163 Fax +44 (0)117 9287112 RFC822 jan.grant@bris.ac.uk
 Whenever I see a dog salivate I get an insatiable urge to ring a bell.
 
 
State-Changed-From-To: open->closed 
State-Changed-By: sos 
State-Changed-When: Tue May 29 06:25:14 PDT 2001 
State-Changed-Why:  
The close tray behavior is no longer there. 


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