From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Borislav Petkov <petkovbb@googlemail.com>
Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org,
Borislav Petkov <petkovbb@gmail.com>
Subject: Re: [PATCH 3/3] ide-cd: fix DMA for non bio-backed requests
Date: Tue, 27 Jan 2009 16:06:03 +0100 [thread overview]
Message-ID: <200901271606.04097.bzolnier@gmail.com> (raw)
In-Reply-To: <1233002440-4325-3-git-send-email-petkovbb@gmail.com>
On Monday 26 January 2009, Borislav Petkov wrote:
> This one fixes http://bugzilla.kernel.org/show_bug.cgi?id=12320.
>
> Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
> ---
> drivers/ide/ide-cd.c | 3 +++
> drivers/ide/ide-io.c | 9 ++++++---
> 2 files changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
> index 94981f9..84bc370 100644
> --- a/drivers/ide/ide-cd.c
> +++ b/drivers/ide/ide-cd.c
> @@ -784,6 +784,9 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
> if (blk_fs_request(rq)) {
> ide_end_request(drive, 1, rq->nr_sectors);
> return ide_stopped;
> + } else if (rq->cmd_type == REQ_TYPE_ATA_PC && !rq->bio) {
> + ide_end_request(drive, 1, 1);
> + return ide_stopped;
> }
> goto end_request;
> }
> diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
> index 9927b03..615b6e7 100644
> --- a/drivers/ide/ide-io.c
> +++ b/drivers/ide/ide-io.c
> @@ -291,11 +291,14 @@ void ide_map_sg(ide_drive_t *drive, struct request *rq)
> ide_hwif_t *hwif = drive->hwif;
> struct scatterlist *sg = hwif->sg_table;
>
> - if (rq->cmd_type != REQ_TYPE_ATA_TASKFILE) {
> - hwif->sg_nents = blk_rq_map_sg(drive->queue, rq, sg);
> - } else {
> + if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) {
> sg_init_one(sg, rq->buffer, rq->nr_sectors * SECTOR_SIZE);
> hwif->sg_nents = 1;
> + } else if (!rq->bio) {
> + sg_init_one(sg, rq->data, rq->data_len);
> + hwif->sg_nents = 1;
> + } else {
> + hwif->sg_nents = blk_rq_map_sg(drive->queue, rq, sg);
> }
> }
applied
Thanks for fixing this.
next prev parent reply other threads:[~2009-01-27 15:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-26 20:40 [PATCH 1/3] ide-cd: use ide_drive_t's rq in cdrom_queue_request_sense Borislav Petkov
2009-01-26 20:40 ` [PATCH 2/3] ide: improve debugging scheme Borislav Petkov
2009-01-27 6:19 ` Borislav Petkov
2009-01-27 15:22 ` Bartlomiej Zolnierkiewicz
2009-01-26 20:40 ` [PATCH 3/3] ide-cd: fix DMA for non bio-backed requests Borislav Petkov
2009-01-27 15:06 ` Bartlomiej Zolnierkiewicz [this message]
2009-01-27 15:07 ` [PATCH 1/3] ide-cd: use ide_drive_t's rq in cdrom_queue_request_sense Bartlomiej Zolnierkiewicz
2009-01-27 16:47 ` Borislav Petkov
2009-02-01 16:04 ` Bartlomiej Zolnierkiewicz
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=200901271606.04097.bzolnier@gmail.com \
--to=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=petkovbb@gmail.com \
--cc=petkovbb@googlemail.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;
as well as URLs for NNTP newsgroup(s).