From: Jens Axboe <axboe@suse.de>
To: Pascal Schmidt <der.eremit@email.de>, Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.6.0-mm1
Date: Tue, 23 Dec 2003 17:58:29 +0100 [thread overview]
Message-ID: <20031223165829.GF1601@suse.de> (raw)
In-Reply-To: <20031223165428.GD1601@suse.de>
On Tue, Dec 23 2003, Jens Axboe wrote:
> - rq->errors = 1;
> + info->write_timeout = jiffies + ATAPI_WAIT_WRITE_BUSY;
> + ++rq->errors;
Didn't mean to change the = 1, here's an updated one.
diff -urp linux-2.6.0-mm1.virgin/drivers/cdrom/cdrom.c linux-2.6.0-mm1/drivers/cdrom/cdrom.c
--- linux-2.6.0-mm1.virgin/drivers/cdrom/cdrom.c 2003-12-23 17:44:54.000000000 +0100
+++ linux-2.6.0-mm1/drivers/cdrom/cdrom.c 2003-12-23 17:50:56.320349076 +0100
@@ -497,7 +497,7 @@ int cdrom_mrw_probe_pc(struct cdrom_devi
printk(KERN_ERR "cdrom: %s: unknown mrw mode page\n", cdi->name);
return 1;
}
-
+
int cdrom_is_mrw(struct cdrom_device_info *cdi, int *write)
{
struct cdrom_generic_command cgc;
@@ -708,6 +708,11 @@ static int cdrom_open_write(struct cdrom
ret = cdrom_mrw_open_write(cdi);
else if (CDROM_CAN(CDC_DVD_RAM))
ret = cdrom_dvdram_open_write(cdi);
+ /*
+ * needs to really check whether media is writeable
+ */
+ else if (CDROM_CAN(CDC_MO_DRIVE))
+ ret = 0;
return ret;
}
@@ -737,7 +742,7 @@ int cdrom_open(struct cdrom_device_info
cdi->use_count++;
ret = -EROFS;
if (fp->f_mode & FMODE_WRITE) {
- if (!(CDROM_CAN(CDC_RAM) || CDROM_CAN(CDC_MO_DRIVE)))
+ if (!CDROM_CAN(CDC_RAM))
goto out;
if (cdrom_open_write(cdi))
goto out;
@@ -750,8 +755,6 @@ int cdrom_open(struct cdrom_device_info
else
ret = open_for_data(cdi);
- if (!ret) cdi->use_count++;
-
cdinfo(CD_OPEN, "Use count for \"/dev/%s\" now %d\n", cdi->name, cdi->use_count);
/* Do this on open. Don't wait for mount, because they might
not be mounting, but opening with O_NONBLOCK */
diff -urp linux-2.6.0-mm1.virgin/drivers/ide/ide-cd.c linux-2.6.0-mm1/drivers/ide/ide-cd.c
--- linux-2.6.0-mm1.virgin/drivers/ide/ide-cd.c 2003-12-23 17:44:54.000000000 +0100
+++ linux-2.6.0-mm1/drivers/ide/ide-cd.c 2003-12-23 17:57:26.326859551 +0100
@@ -790,7 +790,7 @@ static int cdrom_decode_status(ide_drive
* devices will return this error while flushing
* data from cache */
if (!rq->errors)
- info->write_timeout = jiffies + ATAPI_WAIT_BUSY;
+ info->write_timeout = jiffies + ATAPI_WAIT_WRITE_BUSY;
rq->errors = 1;
if (time_after(jiffies, info->write_timeout))
do_end_request = 1;
@@ -2950,6 +2950,7 @@ int ide_cdrom_probe_capabilities (ide_dr
if (drive->media == ide_optical) {
CDROM_CONFIG_FLAGS(drive)->mo_drive = 1;
+ CDROM_CONFIG_FLAGS(drive)->ram = 1;
printk("%s: ATAPI magneto-optical drive\n", drive->name);
return nslots;
}
@@ -3281,9 +3282,7 @@ int ide_cdrom_setup (ide_drive_t *drive)
/*
* set correct block size and read-only for non-ram media
*/
- set_disk_ro(drive->disk,
- !(CDROM_CONFIG_FLAGS(drive)->ram ||
- CDROM_CONFIG_FLAGS(drive)->mo_drive));
+ set_disk_ro(drive->disk, !CDROM_CONFIG_FLAGS(drive)->ram);
blk_queue_hardsect_size(drive->queue, CD_FRAMESIZE);
#if 0
diff -urp linux-2.6.0-mm1.virgin/drivers/ide/ide-cd.h linux-2.6.0-mm1/drivers/ide/ide-cd.h
--- linux-2.6.0-mm1.virgin/drivers/ide/ide-cd.h 2003-12-23 17:44:54.000000000 +0100
+++ linux-2.6.0-mm1/drivers/ide/ide-cd.h 2003-12-23 17:48:19.939386898 +0100
@@ -39,7 +39,7 @@
* typical timeout for packet command
*/
#define ATAPI_WAIT_PC (60 * HZ)
-#define ATAPI_WAIT_BUSY (5 * HZ)
+#define ATAPI_WAIT_WRITE_BUSY (10 * HZ)
/************************************************************************/
--
Jens Axboe
next prev parent reply other threads:[~2003-12-23 16:59 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-23 16:34 2.6.0-mm1 Pascal Schmidt
2003-12-23 16:39 ` 2.6.0-mm1 Jens Axboe
2003-12-23 16:54 ` 2.6.0-mm1 Jens Axboe
2003-12-23 16:58 ` Jens Axboe [this message]
2003-12-23 17:29 ` 2.6.0-mm1 Pascal Schmidt
2003-12-23 18:49 ` 2.6.0-mm1 Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2003-12-24 9:59 2.6.0-mm1 GCS
2003-12-24 11:32 ` 2.6.0-mm1 Andrew Morton
2003-12-24 11:53 ` 2.6.0-mm1 GCS
2003-12-24 12:23 ` 2.6.0-mm1 GCS
2003-12-24 15:17 ` 2.6.0-mm1 Dmitry Torokhov
2003-12-24 19:12 ` 2.6.0-mm1 GCS
2003-12-24 12:47 ` 2.6.0-mm1 Thomas Molina
2003-12-25 9:11 ` 2.6.0-mm1 Dmitry Torokhov
2003-12-25 18:22 ` 2.6.0-mm1 GCS
2003-12-24 14:38 ` 2.6.0-mm1 GCS
[not found] <20031223170633.GG1601@suse.de>
2003-12-23 17:15 ` 2.6.0-mm1 Pascal Schmidt
[not found] <15N7L-7y2-3@gated-at.bofh.it>
2003-12-23 15:41 ` 2.6.0-mm1 Pascal Schmidt
2003-12-23 16:32 ` 2.6.0-mm1 Jens Axboe
2003-12-23 16:46 ` 2.6.0-mm1 Pascal Schmidt
2003-12-23 16:56 ` 2.6.0-mm1 Jens Axboe
2003-12-23 5:11 2.6.0-mm1 Andrew Morton
2003-12-23 5:27 ` 2.6.0-mm1 Valdis.Kletnieks
2003-12-23 5:28 ` 2.6.0-mm1 Marcos D. Marado Torres
2003-12-23 5:28 ` 2.6.0-mm1 Andrew Morton
2003-12-23 5:40 ` 2.6.0-mm1 Stan Bubrouski
2003-12-23 7:57 ` 2.6.0-mm1 Andrew Walrond
2003-12-23 7:30 ` 2.6.0-mm1 Martin J. Bligh
2003-12-23 17:29 ` 2.6.0-mm1 Tom Rini
2003-12-23 17:31 ` 2.6.0-mm1 Tom Rini
2003-12-23 21:08 ` 2.6.0-mm1 viro
2003-12-24 13:09 ` 2.6.0-mm1 William Lee Irwin III
2003-12-24 14:26 ` 2.6.0-mm1 William Lee Irwin III
2003-12-24 15:39 ` 2.6.0-mm1 Gene Heskett
2003-12-28 10:58 ` 2.6.0-mm1 Christoph Hellwig
2003-12-28 19:49 ` 2.6.0-mm1 Andrew Morton
2003-12-28 19:52 ` 2.6.0-mm1 Christoph Hellwig
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=20031223165829.GF1601@suse.de \
--to=axboe@suse.de \
--cc=akpm@osdl.org \
--cc=der.eremit@email.de \
--cc=linux-kernel@vger.kernel.org \
/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