linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] n64cart: fix the dma address in n64cart_do_bvec
@ 2021-08-04  9:49 Christoph Hellwig
  2021-08-04 10:01 ` Lauri Kasanen
  2021-08-04 17:15 ` Jens Axboe
  0 siblings, 2 replies; 5+ messages in thread
From: Christoph Hellwig @ 2021-08-04  9:49 UTC (permalink / raw)
  To: cand, axboe; +Cc: linux-block

dma_map_bvec already takes bv_offset into account.

Fixes: 9b2a2bbbb4d0 ("block: Add n64 cart driver")
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/block/n64cart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/n64cart.c b/drivers/block/n64cart.c
index 7b4dd10af9ec..c84be0028f63 100644
--- a/drivers/block/n64cart.c
+++ b/drivers/block/n64cart.c
@@ -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);
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-08-04 17:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-04  9:49 [PATCH] n64cart: fix the dma address in n64cart_do_bvec Christoph Hellwig
2021-08-04 10:01 ` Lauri Kasanen
2021-08-04 10:02   ` Christoph Hellwig
2021-08-04 10:16     ` Lauri Kasanen
2021-08-04 17:15 ` Jens Axboe

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).