linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: petkovbb@gmail.com
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ide-floppy: use scatterlists for pio transfers
Date: Wed, 6 Aug 2008 18:05:00 +0200	[thread overview]
Message-ID: <200808061805.01126.bzolnier@gmail.com> (raw)
In-Reply-To: <20080805051113.GA15834@gollum.tnic>


Hi,

On Tuesday 05 August 2008, Borislav Petkov wrote:
> Hi Bart,
> 
> here's my first stab at using scatterlists in ide-floppy. I've adapted your
> ide-scsi version to fit in here. The change here is that i use pc->b_count as
> a sort-of completion counter to know when i'm at the end of the sg element and
> be able to switch to the next/finish transfer. I've tested the patch with the
> Iomega ZIP drive i have here - it works. We should do some more testing first
> though, before sending it upstream.

[...]

> @@ -569,7 +577,7 @@ static void idefloppy_create_rw_cmd(idefloppy_floppy_t *floppy,
>  	memcpy(rq->cmd, pc->c, 12);
>  
>  	pc->rq = rq;
> -	pc->b_count = cmd == READ ? 0 : rq->bio->bi_size;
> +	pc->b_count = 0;
>  	if (rq->cmd_flags & REQ_RW)
>  		pc->flags |= PC_FLAG_WRITING;
>  	pc->buf = NULL;

Don't we also need to zero pc->b_count in idefloppy_blockpc_cmd()?

[ idefloppy_init_pc() clears whole pc so ->b_count assignment
  to zero is not strictly necessary ]

Except that it looks all good, thanks for working on it.

  reply	other threads:[~2008-08-06 16:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-05  5:11 [PATCH] ide-floppy: use scatterlists for pio transfers Borislav Petkov
2008-08-06 16:05 ` Bartlomiej Zolnierkiewicz [this message]
2008-08-06 19:30   ` Borislav Petkov
2008-08-07 16:57     ` 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=200808061805.01126.bzolnier@gmail.com \
    --to=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=petkovbb@gmail.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).