public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Osterlund <petero2@telia.com>
To: Damian Pietras <daper@daper.net>
Cc: Phillip Susi <psusi@cfl.rr.com>, linux-kernel@vger.kernel.org
Subject: Re: Problems with eject and pktcdvd
Date: 05 Feb 2006 23:44:46 +0100	[thread overview]
Message-ID: <m3oe1l8ly9.fsf@telia.com> (raw)
In-Reply-To: <20060205210746.GA16023@daper.net>

Damian Pietras <daper@daper.net> writes:

> Now I can mount CD-R, CD-RW, DVD+RW using pktcdvd.
> 
> Something strange happend when I copied files to DVD+RW und used eject.
> After some time eject exitet, but the disc was stil in the burner, I was
> allowed to open it by pressing the eject button, but then:
> 
> hda: media error (bad sector): status=0x51 { DriveReady SeekComplete Error }
> hda: media error (bad sector): error=0x34 { AbortedCommand LastFailedSense=0x03

Thanks for testing. Please try this patch: It makes sure not to unlock
the door if the disc is in use.

diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index f92d22f..a43f68d 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -2436,7 +2436,8 @@ static int pkt_ioctl(struct block_device
 		 * The door gets locked when the device is opened, so we
 		 * have to unlock it or else the eject command fails.
 		 */
-		pkt_lock_door(pd, 0);
+		if (pd->refcnt == 1)
+			pkt_lock_door(pd, 0);
 		return blkdev_ioctl(pd->bdev, file, cmd, arg);
 
 	default:

> And also many messages like this:
> pktcdvd: Unknown ioctl for pktcdvd0 (5326)
> 
> When inserting CD-R I get:
> pktcdvd: Wrong disc profile (9)
> pktcdvd: pktcdvd0 failed probe
> 
> but everything works OK.

Yes, those messages are quite useless except for debugging. I'll make
them go away.

-- 
Peter Osterlund - petero2@telia.com
http://web.telia.com/~u89404340

  reply	other threads:[~2006-02-05 22:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-15 12:35 Problems with eject and pktcdvd Damian Pietras
2006-01-15 17:53 ` Phillip Susi
2006-01-15 18:50   ` Damian Pietras
2006-01-15 19:17     ` Phillip Susi
2006-01-15 20:47       ` Peter Osterlund
2006-01-15 21:04         ` Damian Pietras
2006-01-15 21:18           ` Jan Engelhardt
2006-01-15 21:34             ` Peter Osterlund
2006-02-05 19:13           ` Peter Osterlund
2006-02-05 21:07             ` Damian Pietras
2006-02-05 22:44               ` Peter Osterlund [this message]
2006-02-06 20:15                 ` Damian Pietras
2006-02-11 11:21                   ` Peter Osterlund
2006-02-12 10:34                     ` Damian Pietras
2006-01-15 22:23         ` Phillip Susi
2006-01-15 22:55         ` Nix

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=m3oe1l8ly9.fsf@telia.com \
    --to=petero2@telia.com \
    --cc=daper@daper.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=psusi@cfl.rr.com \
    /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