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 <[EMAIL PROTECTED]>
Signed-off-by: Kiyoshi Ueda <[EMAIL PROTECTED]>
Signed-off-by: Jun'ichi Nomura <[EMAIL PROTECTED]>
---
 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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to