From: Pascal Schmidt <der.eremit@email.de>
To: Andries Brouwer <aebr@win.tue.nl>
Cc: Jens Axboe <axboe@suse.de>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] fix for ide-scsi crash
Date: Tue, 20 Jan 2004 21:58:00 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.44.0401202154560.2427-100000@neptune.local> (raw)
In-Reply-To: <20040120210123.A1528@pclin040.win.tue.nl>
On Tue, 20 Jan 2004, Andries Brouwer wrote:
> Yes, they are meaningless.
> The code that used them was removed in 2.5.1.
Then perhaps it would be a good idea to apply the following cleanup
patch:
--- ide-cd.c.orig Tue Jan 20 21:47:30 2004
+++ ide-cd.c Tue Jan 20 21:52:34 2004
@@ -1236,13 +1236,7 @@ static int cdrom_read_from_buffer (ide_d
static ide_startstop_t cdrom_start_read_continuation (ide_drive_t *drive)
{
struct request *rq = HWGROUP(drive)->rq;
- int nsect, sector, nframes, frame, nskip;
-
- /* Number of sectors to transfer. */
- nsect = rq->nr_sectors;
-
- /* Starting sector. */
- sector = rq->sector;
+ int nskip;
/* If the requested sector doesn't start on a cdrom block boundary,
we must adjust the start of the transfer so that it does,
@@ -1251,7 +1245,7 @@ static ide_startstop_t cdrom_start_read_
of the buffer, it will mean that we're to skip a number
of sectors equal to the amount by which CURRENT_NR_SECTORS
is larger than the buffer size. */
- nskip = (sector % SECTORS_PER_FRAME);
+ nskip = (rq->sector % SECTORS_PER_FRAME);
if (nskip > 0) {
/* Sanity check... */
if (rq->current_nr_sectors != bio_cur_sectors(rq->bio) &&
@@ -1261,21 +1255,9 @@ static ide_startstop_t cdrom_start_read_
cdrom_end_request(drive, 0);
return ide_stopped;
}
- sector -= nskip;
- nsect += nskip;
rq->current_nr_sectors += nskip;
}
- /* Convert from sectors to cdrom blocks, rounding up the transfer
- length if needed. */
- nframes = (nsect + SECTORS_PER_FRAME-1) / SECTORS_PER_FRAME;
- frame = sector / SECTORS_PER_FRAME;
-
- /* Largest number of frames was can transfer at once is 64k-1. For
- some drives we need to limit this even more. */
- nframes = MIN (nframes, (CDROM_CONFIG_FLAGS (drive)->limit_nframes) ?
- (65534 / CD_FRAMESIZE) : 65535);
-
/* Set up the command */
rq->timeout = WAIT_CMD;
--
Ciao,
Pascal
next prev parent reply other threads:[~2004-01-20 20:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-20 17:08 [PATCH] fix for ide-scsi crash Pascal Schmidt
2004-01-20 20:01 ` Andries Brouwer
2004-01-20 20:58 ` Pascal Schmidt [this message]
[not found] <1fMNb-6UA-15@gated-at.bofh.it>
[not found] ` <1fYEB-pz-23@gated-at.bofh.it>
[not found] ` <1g4Ao-60b-25@gated-at.bofh.it>
2004-01-20 14:59 ` Pascal Schmidt
2004-01-20 19:04 ` bill davidsen
-- strict thread matches above, loose matches on Subject: below --
2004-01-20 9:44 Andries.Brouwer
2004-01-20 12:04 ` Pascal Schmidt
2004-01-20 13:56 ` Jens Axboe
2004-01-20 17:56 ` Linus Torvalds
2004-01-20 18:46 ` Ben Pfaff
2004-01-19 22:56 Andries.Brouwer
2004-01-19 18:51 Pascal Schmidt
2004-01-20 7:32 ` Linus Torvalds
2004-01-20 13:54 ` Jens Axboe
2004-01-19 4:35 Andries.Brouwer
2004-01-19 22:35 ` Willem Riede
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=Pine.LNX.4.44.0401202154560.2427-100000@neptune.local \
--to=der.eremit@email.de \
--cc=aebr@win.tue.nl \
--cc=axboe@suse.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;
as well as URLs for NNTP newsgroup(s).