All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Kern <alex.kern@gmx.de>
To: Stas Sergeev <stsp@aknet.ru>
Cc: Linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: bug: cd-rom autoclose no longer works (fix attempt)
Date: Thu, 30 Dec 2004 20:52:57 +0100	[thread overview]
Message-ID: <200412302053.00850.alex.kern@gmx.de> (raw)
In-Reply-To: <41D4483C.9030005@aknet.ru>

Am Donnerstag, 30. Dezember 2004 19:26 schrieb Stas Sergeev:
> Hello.
Hello,
>
> Alexander Kern wrote:
> >> The ide-cd.c change is as per 2.4.20
> >> which works. For some reasons
> >> sense.ascq == 0 for me when the tray
> >> is opened.
> >
> > ascq = 0 is legal.
> > According to mmc3r10g
> > asc 3a
> > ascq 0 is MEDIUM NOT PRESENT
> > ascq 1 is MEDIUM NOT PRESENT - TRAY CLOSED
> > ascq 2 is MEDIUM NOT PRESENT - TRAY OPEN
> > What in my eyes means, your drive is impossible to determine is tray open
> > or closed.
>
> I think so too, this is the problem most
> likely. However, my cd-roms are not that
> ancient, I expect there are millions of
> the like ones around. Breaking autoclose
> for all of them after it worked for ages,
> is no good IMO.
>
Can agree with you, but a modern cdrom should be able to konwn, is it open or 
not. This patch change basic behaviour for all cdroms.
> > Linux assumes if not known tray is closed. That is better default, it
> > avoids infinate trying to close.
>
> I don't think so. It is safe to assume the
> tray is opened, at least it worked in the
> past (or were there the real problems with
> this?) You can always try to close it only
> once, and if that still returns 0, then
> bail out. One extra closing attempt should
> not do any harm I suppose. That's exactly
> what my patch does (I hope). And that's most
> likely how it used to work before. I'll be
> disappointed if autoclose will remain broken -
> it was the very usefull feature, it will be
> missed. Unless there are the real technical
> reasons against the old behaviour, of course.
Old behaviour has another problems, and revert to 2.4.20 code base is a bad 
solution. I have nothing against changing the default.
The patch must be minimal...
         
	if (sense.sense_key == NOT_READY) {
               if (sense.asc == 0x3a) {
-                        if (sense.ascq == 0 || sense.ascq == 1)
+                        if (sense.ascq == 1)
                                return CDS_NO_DISC;
-                        else if (sense.ascq == 2)
+                        else if (sense.ascq == 0 || sense.ascq == 2)
                                return CDS_TRAY_OPEN;
                }
         }

Regards Alex

P.S. S Novym Godom!

  reply	other threads:[~2004-12-30 19:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200412301853.48677.alex.kern@gmx.de>
2004-12-30 18:26 ` bug: cd-rom autoclose no longer works (fix attempt) Stas Sergeev
2004-12-30 19:52   ` Alexander Kern [this message]
2004-12-30 20:35     ` Stas Sergeev
2004-12-29 18:12 Stas Sergeev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200412302053.00850.alex.kern@gmx.de \
    --to=alex.kern@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stsp@aknet.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.