Re: [PATCH] n64cart: fix the dma address in n64cart_do_bvec

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed,  4 Aug 2021 11:49:58 +0200
Christoph Hellwig <hch@xxxxxx> wrote:

> dma_map_bvec already takes bv_offset into account.
>
> Fixes: 9b2a2bbbb4d0 ("block: Add n64 cart driver")
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> ---
>  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);

Hm, then how did it work? Does it always happen to be zero?

Have you tested this? I don't have the equipment currently.

- Lauri




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux