NetBSD Problem Report #43373

From Ephaeton@gmx.net  Thu May 27 22:34:15 2010
Return-Path: <Ephaeton@gmx.net>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 8448263B873
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 27 May 2010 22:34:15 +0000 (UTC)
Message-Id: <20100527223400.96C1BB356@agamemnon.entropie.local>
Date: Thu, 27 May 2010 18:34:00 -0400 (EDT)
From: Ephaeton@gmx.net
Reply-To: Ephaeton@gmx.net
To: gnats-bugs@gnats.NetBSD.org
Subject: (abcde?) renders cd0 useless
X-Send-Pr-Version: 3.95

>Number:         43373
>Category:       port-i386
>Synopsis:       (abcde?) renders cd0 useless
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-i386-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 27 22:35:00 +0000 2010
>Last-Modified:  Sat May 29 05:05:01 +0000 2010
>Originator:     Martin S. Weber
>Release:        NetBSD 5.1_RC1
>Organization:
	EnTr0pIe!!

>Environment:


System: NetBSD agamemnon.entropie.local 5.1_RC1 NetBSD 5.1_RC1 (AGAMEMNON5) #0: Mon Apr 26 23:49:59 EDT 2010 root@agamemnon.entropie.local:/space/obj/sys/arch/i386/compile/AGAMEMNON5 i386
Architecture: i386
Machine: i386
>Description:
when using abcde, everything works fine until you want to remove your CD from
the drive. Hitting the button on the cd-rom does not work. You have to use
eject(1) to open the drive. And the drive does not notice that it's being
opened. When inserting another CD afterwards, and running abcde again, this
is the error message of abcde:

cd-discid: /dev/rcd0d: CDROMREADTOCHDR: Input/output error
abcde error: CD could not be read. Perhaps there's no CD in the drive?

At the same time, this appears in msgbuf:

cd0(piixide0:0:0):  Check Condition on CDB: 0x43 00 00 00 00 00 00 00 04 00
    SENSE KEY:  Unit Attention
	ASC/ASCQ:  Not Ready To Ready Transition (Medium May Have Changed)

A reboot is necessary to pound some sense into the CD-Drive again (pity
that drvctl doesn't support rescanning of atapibus! (or the other way round))

This all happens on a Thinkpad T61, here's the relevant stuff from
dmesg:
mainbus0 (root)
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
piixide0 at pci0 dev 31 function 1
piixide0: Intel 82801HBM IDE Controller (ICH8M) (rev. 0x03)
piixide0: bus-master DMA support present
piixide0: primary channel configured to compatibility mode
piixide0: primary channel interrupting at ioapic0 pin 14
atabus0 at piixide0 channel 0
atabus1 at ahcisata0 channel 0
atabus2 at ahcisata0 channel 2
atapibus0 at atabus0: 2 targets
wd0 at atabus1 drive 0: <Hitachi HTS725050A9A364>
cd0 at atapibus0 drive 0: <HL-DT-STCD-RW/DVD DRIVE GCC-M10N, , 1.02> cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)

I'm not sure which part of abcde fucks up the cd0 or whether it's possible
to achive the same fuckup with other tools, too.
>How-To-Repeat:

	abcde a CD.
	eject cd0
	abcde another CD.
>Fix:


>Audit-Trail:
From: Manuel Bouyer <bouyer@antioche.eu.org>
To: gnats-bugs@NetBSD.org
Cc: port-i386-maintainer@NetBSD.org, gnats-admin@NetBSD.org,
        netbsd-bugs@NetBSD.org
Subject: Re: port-i386/43373: (abcde?) renders cd0 useless
Date: Fri, 28 May 2010 21:18:27 +0200

 On Thu, May 27, 2010 at 10:35:00PM +0000, Ephaeton@gmx.net wrote:
 > cd-discid: /dev/rcd0d: CDROMREADTOCHDR: Input/output error
 > abcde error: CD could not be read. Perhaps there's no CD in the drive?
 > 
 > At the same time, this appears in msgbuf:
 > 
 > cd0(piixide0:0:0):  Check Condition on CDB: 0x43 00 00 00 00 00 00 00 04 00
 >     SENSE KEY:  Unit Attention
 > 	ASC/ASCQ:  Not Ready To Ready Transition (Medium May Have Changed)

 Does this happen if you start abcde a second time ?
 "Not Ready To Ready Transition" condition is supposed to be cleared
 by requesting sense, so the next command should succeed. 

 -- 
 Manuel Bouyer <bouyer@antioche.eu.org>
      NetBSD: 26 ans d'experience feront toujours la difference
 --

From: dieter roelants <dieter.NetBSD@pandora.be>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-i386/43373: (abcde?) renders cd0 useless
Date: Fri, 28 May 2010 20:55:25 +0200

 On Thu, 27 May 2010 22:35:00 +0000 (UTC)
 Ephaeton@gmx.net wrote:

 > when using abcde, everything works fine until you want to remove your
 > CD from the drive. Hitting the button on the cd-rom does not work.
 > You have to use eject(1) to open the drive.

 Are you running hald? I faintly remember seeing experiencing something
 like this when I had it running.
 FWIW, I used abcde last weekend (on -current though) without problems...

 dieter

From: "Martin S. Weber" <Ephaeton@gmx.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-i386/43373: (abcde?) renders cd0 useless
Date: Sat, 29 May 2010 00:58:16 -0400

 On Fri, May 28, 2010 at 07:20:04PM +0000, Manuel Bouyer wrote:
 > From: Manuel Bouyer <bouyer@antioche.eu.org>
 >  > (...)
 >  > At the same time, this appears in msgbuf:
 >  > 
 >  > cd0(piixide0:0:0):  Check Condition on CDB: 0x43 00 00 00 00 00 00 00 04 00
 >  >     SENSE KEY:  Unit Attention
 >  > 	ASC/ASCQ:  Not Ready To Ready Transition (Medium May Have Changed)
 >  
 >  Does this happen if you start abcde a second time ?

 The abcde error? yes. The msg in msgbuf? no.

 >  "Not Ready To Ready Transition" condition is supposed to be cleared
 >  by requesting sense, so the next command should succeed. 

 That seems to work. 

 Regards,
 -Martin

From: "Martin S. Weber" <Ephaeton@gmx.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-i386/43373: (abcde?) renders cd0 useless
Date: Sat, 29 May 2010 01:03:53 -0400

 On Fri, May 28, 2010 at 07:20:09PM +0000, dieter roelants wrote:
 >  > when using abcde, everything works fine until you want to remove your
 >  > CD from the drive. Hitting the button on the cd-rom does not work.
 >  > You have to use eject(1) to open the drive.
 >  
 >  Are you running hald? I faintly remember seeing experiencing something
 >  like this when I had it running.

 Indeed, I have hald running. I stopped it now, started abcde -- now 
 that part at least works.  I'll get back to you on this. 

 Thanks for the hint so far!

 Regards,

 -Martin

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.