All of lore.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 20:13:28 +0100	[thread overview]
Message-ID: <m33bixaaav.fsf@telia.com> (raw)
In-Reply-To: <20060115210443.GA6096@daper.net>

Damian Pietras <daper@daper.net> writes:

> On Sun, Jan 15, 2006 at 09:47:40PM +0100, Peter Osterlund wrote:
> > 
> > The irq timeout problem might be broken hardware/firmware, but there
> > is a problem with drive locking and the pktcdvd driver.
> > 
> > If you do
> > 
> > 	pktsetup 0 /dev/hdc
> > 	mount /dev/hdc /mnt/tmp
> > 	umount /mnt/tmp
> > 
> > the door will be left in a locked state. (It gets unlocked when you
> > run "pktsetup -d 0" though.) However, if you do:
> > 
> > 	pktsetup 0 /dev/hdc
> > 	mount /dev/pktcdvd/0 /mnt/tmp
> > 	umount /mnt/tmp
> 
> Thanks!
> 
> It works this way without any irq timeout. Unfortunately I can't use it
> as a workaround, because CD-R media must be mounted with '-o ro' or I
> get 'pktcdvd: Wrong disc profile (9)', so I can't just put it in fstab
> and use 'mount /media/cdrom' for both CD-R and RW discs.

Please try this patch.


Allow non-writable media to be mounted.

Signed-off-by: Peter Osterlund <petero2@telia.com>
---

 drivers/block/pktcdvd.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index 3445386..04117a7 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -1896,7 +1896,7 @@ static int pkt_open_write(struct pktcdvd
 
 	if ((ret = pkt_probe_settings(pd))) {
 		DPRINTK("pktcdvd: %s failed probe\n", pd->name);
-		return -EIO;
+		return -EROFS;
 	}
 
 	if ((ret = pkt_set_write_settings(pd))) {
@@ -2054,10 +2054,9 @@ static int pkt_open(struct inode *inode,
 			goto out_dec;
 		}
 	} else {
-		if (pkt_open_dev(pd, file->f_mode & FMODE_WRITE)) {
-			ret = -EIO;
+		ret = pkt_open_dev(pd, file->f_mode & FMODE_WRITE);
+		if (ret)
 			goto out_dec;
-		}
 		/*
 		 * needed here as well, since ext2 (among others) may change
 		 * the blocksize at mount time

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

  parent reply	other threads:[~2006-02-05 19:13 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 [this message]
2006-02-05 21:07             ` Damian Pietras
2006-02-05 22:44               ` Peter Osterlund
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=m33bixaaav.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 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.