Skip to content

Commit

Permalink
n64cart: fix the dma address in n64cart_do_bvec
Browse files Browse the repository at this point in the history
dma_map_bvec already takes bv_offset into account.

Fixes: 9b2a2bbbb4d0 ("block: Add n64 cart driver")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Christoph Hellwig authored and Jens Axboe committed Aug 4, 2021
1 parent 952835e commit 402e0b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/block/n64cart.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ static bool n64cart_do_bvec(struct device *dev, struct bio_vec *bv, u32 pos)

n64cart_wait_dma();

n64cart_write_reg(PI_DRAM_REG, dma_addr + bv->bv_offset);
n64cart_write_reg(PI_DRAM_REG, dma_addr);
n64cart_write_reg(PI_CART_REG, (bstart | CART_DOMAIN) & CART_MAX);
n64cart_write_reg(PI_WRITE_REG, bv->bv_len - 1);

Expand Down

0 comments on commit 402e0b8

Please sign in to comment.