linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
To: jens.axboe@oracle.com
Cc: grant.likely@secretlab.ca, linux-kernel@vger.kernel.org,
	akpm@linux-foundation.org, j-nomura@ce.jp.nec.com,
	k-ueda@ct.jp.nec.com
Subject: [PATCH] (linux-2.6-block.git) xsysace: fix size misconversion of blk_end_request
Date: Fri, 21 Dec 2007 15:57:14 -0500 (EST)	[thread overview]
Message-ID: <20071221.155714.71084400.k-ueda@ct.jp.nec.com> (raw)

Hi Jens,

I found this change is not yet included in your linux-2.6-block.git tree:
    http://marc.info/?l=linux-kernel&m=119747954926232&w=2

Please apply this patch (just a rebased version of the above)
to your for-akpm branch before Andrew pulls.
Otherwise, xsysace driver will not work correctly.


This patch fixes the misconversion from sector to byte
in the blk_end_request patch-set.

In ace_fsm_dostate(), the variable 'i' was used only for passing
sector size of the request to __end_end_request().
So I removed it and changed the code to pass the size in bytes
directly to __blk_end_request().

Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
---
 drivers/block/xsysace.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/drivers/block/xsysace.c
+++ b/drivers/block/xsysace.c
@@ -483,7 +483,6 @@ static void ace_fsm_dostate(struct ace_d
 	u32 status;
 	u16 val;
 	int count;
-	int i;
 
 #if defined(DEBUG)
 	dev_dbg(ace->dev, "fsm_state=%i, id_req_count=%i\n",
@@ -688,7 +687,6 @@ static void ace_fsm_dostate(struct ace_d
 		}
 
 		/* Transfer the next buffer */
-		i = 16;
 		if (ace->fsm_task == ACE_TASK_WRITE)
 			ace->reg_ops->dataout(ace);
 		else
@@ -702,8 +700,8 @@ static void ace_fsm_dostate(struct ace_d
 		}
 
 		/* bio finished; is there another one? */
-		i = ace->req->current_nr_sectors;
-		if (__blk_end_request(ace->req, 0, i)) {
+		if (__blk_end_request(ace->req, 0,
+				      blk_rq_cur_bytes(ace->req))) {
 			/* dev_dbg(ace->dev, "next block; h=%li c=%i\n",
 			 *      ace->req->hard_nr_sectors,
 			 *      ace->req->current_nr_sectors);

Thanks,
Kiyoshi Ueda

                 reply	other threads:[~2007-12-21 20:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20071221.155714.71084400.k-ueda@ct.jp.nec.com \
    --to=k-ueda@ct.jp.nec.com \
    --cc=akpm@linux-foundation.org \
    --cc=grant.likely@secretlab.ca \
    --cc=j-nomura@ce.jp.nec.com \
    --cc=jens.axboe@oracle.com \
    --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).