From: Ed Sweetman <ed.sweetman@wmich.edu>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: Walt H <waltabbyh@comcast.net>
Subject: Re: Can't eject a previously mounted CD?
Date: Mon, 29 Dec 2003 02:41:37 -0500 [thread overview]
Message-ID: <3FEFDAB1.2050202@wmich.edu> (raw)
In-Reply-To: <3FEFC86E.9050307@wmich.edu>
Just to add to my previous post about the problem with the ide-cd
driver. It appears that loading and unloading it and loading it again a
couple times causes the driver to mess up it's interrupts. Now i get a
recurring "lost interrupt to hdc" message and the device is
non-responsive, causing any attempt to rmmod or modprobe ide-cd to hang,
and the /dev entry is missing according to hdparm.
Ed Sweetman wrote:
> Walt H wrote:
>
>> Ed Sweetman wrote:
>>
>>> I'd have to say the december 17th listed changes are the culprit here.
>>> I'm definitely not up to figuring out what change is the bad one. If
>>> any of the cdrom/ide-cd people wanna have me get some data from them
>>> then just tell me how. I've tried viewing the debug output from the
>>> modules with no success in figuring out the problem.
>>>
>>>
>
>>
>> Luckily for me, I built my cdrom drivers as modules, so I could play :)
>
>
> so did i. I looked at the debugging output and noticed the increments
> increasing. This had no effect on me unloading the module so i didn't
> care. It also should have nothing to do with not being able to eject it
> since being unable to eject would imply that the door is locked, in
> which case the command "eject" should also fail but it does not. I think
> the kernel is really really fubarred since the dec 17th patches dealing
> with ide-cd. My cd writer is no longer able to write in atapi direct
> mode because the driver isn't giving it the capabalities it should have.
> It's being shown as a simple cdrom as far as the kernel is concerned.
> Also, the drive throws errors about being unable to access sector 0, as
> many others have pointed out. This is an error that should be caught
> prior to actually sending such a command since media is not in the drive
> in the first place.
>
> It's definitely not up to me but i would roll back the cdrom and ide-cd
> changes from dec 17th and re-add them much more carefully because
> something is really messed up.
>
> cdrecord is showing the TOC as just CdRom and reports the drive as
> readonly. That's about all the irregular information i can find on my
> own. I dont know where to look for anything else, the cdrom debugging
> output doesn't report anything irregular except for the behavior
> described below and that really doesn't help me with anything except to
> prove that the patches that went in last are the cause of the problem,
> not necessarily famd's hackish behavior or hardware.
>
>> I turned on debugging, and noticed that cdi->use_count continues to
>> increment by
>> 2 for each access. In cdrom_release, only one cdi->use_count-- exists,
>> so the
>> driver never gets to 0 use count and releases. I noticed in
>> drivers/cdrom/cdrom.c line 753:
>>
>> if (!ret) cdi->use_count++;
>>
>> Which is our second increment, but I can't find two decrements,
>> because the
>> check further down won't ever be true if the above is true. Hence, two
>> increments and only 1 dec when we reach cdrom_release. What I did, was
>> add a
>> conditional decrement right before the open_for_data call, which makes
>> the value
>> of use_count like it used to be prior to the Mt. Rainier patches.
>> Seems kinda
>> hacky :)
>>
next prev parent reply other threads:[~2003-12-29 7:41 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-29 1:56 Can't eject a previously mounted CD? Walt H
2003-12-29 2:04 ` Ed Sweetman
2003-12-29 3:45 ` Walt H
2003-12-29 6:23 ` Ed Sweetman
2003-12-29 7:41 ` Ed Sweetman [this message]
2003-12-29 7:56 ` Ed Sweetman
2003-12-29 16:36 ` Walt H
2003-12-29 17:53 ` Ed Sweetman
2003-12-29 18:05 ` Walt H
2003-12-29 19:23 ` Walt H
2003-12-29 19:40 ` Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2003-12-27 0:31 Matt
2003-12-27 0:44 ` Rob Love
2003-12-27 1:13 ` Ed Sweetman
2003-12-27 15:11 ` Matt
2003-12-27 3:12 ` Joshua Kwan
2003-12-26 8:15 Joshua Kwan
2003-12-26 10:34 ` Vojtech Pavlik
2003-12-26 19:44 ` Joshua Kwan
2003-12-26 19:54 ` Samuel Flory
2003-12-26 20:27 ` Joshua Kwan
2003-12-26 23:26 ` Ed Sweetman
2003-12-26 23:56 ` Nuno Silva
2003-12-27 2:28 ` Joshua Kwan
2003-12-29 0:20 ` Samuel Flory
2003-12-29 0:28 ` Ed Sweetman
2003-12-29 1:36 ` Ed Sweetman
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=3FEFDAB1.2050202@wmich.edu \
--to=ed.sweetman@wmich.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=waltabbyh@comcast.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox