[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20071221.155714.71084400.k-ueda@ct.jp.nec.com>
Date: Fri, 21 Dec 2007 15:57:14 -0500 (EST)
From: Kiyoshi Ueda <k-ueda@...jp.nec.com>
To: jens.axboe@...cle.com
Cc: grant.likely@...retlab.ca, linux-kernel@...r.kernel.org,
akpm@...ux-foundation.org, j-nomura@...jp.nec.com,
k-ueda@...jp.nec.com
Subject: [PATCH] (linux-2.6-block.git) xsysace: fix size misconversion of
blk_end_request
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@...retlab.ca>
Signed-off-by: Kiyoshi Ueda <k-ueda@...jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@...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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists