mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Nikita Yushchenko <nikita.yoush@cogentembedded.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: "Sergey Shtylyov" <s.shtylyov@omp.ru>,
	"Claudiu Beznea" <claudiu.beznea.uj@bp.renesas.com>,
	"Yoshihiro Shimoda" <yoshihiro.shimoda.uh@renesas.com>,
	"Wolfram Sang" <wsa+renesas@sang-engineering.com>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: ravb: Fix wrong dma_unmap_single() calls in ring unmapping
Date: Sat, 13 Jan 2024 13:13:45 -0800	[thread overview]
Message-ID: <ad44b540-0b17-4d13-8c89-984e0432805d@gmail.com> (raw)
In-Reply-To: <20240113044721.481131-1-nikita.yoush@cogentembedded.com>



On 1/12/2024 8:47 PM, Nikita Yushchenko wrote:
> When unmapping ring entries on Rx ring release, ravb driver needs to
> unmap only those entries that have been mapped successfully.
> 
> To check if an entry needs to be unmapped, currently the address stored
> inside descriptor is passed to dma_mapping_error() call. But, address
> field inside descriptor is 32-bit, while dma_mapping_error() is
> implemented by comparing it's argument with DMA_MAPPING_ERROR constant
> that is 64-bit when dma_addr_t is 64-bit. So the comparison gets wrong,
> resulting into ravb driver calling dma_unnmap_single() for 0xffffffff
> address.

I would still spell out explicitly that a failed mapping from 
ravb_rx_ring_format_gbeth() and ravb_rx_ring_format_rcar() results in 
writing the ds_cc descriptor field to 0.

With that fixed and the typo spotted by Sergey, you may add:

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
-- 
Florian

      parent reply	other threads:[~2024-01-13 21:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-13  4:47 Nikita Yushchenko
2024-01-13  9:47 ` Sergey Shtylyov
2024-01-15  2:28   ` Nikita Yushchenko
2024-01-13 21:13 ` Florian Fainelli [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ad44b540-0b17-4d13-8c89-984e0432805d@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=claudiu.beznea.uj@bp.renesas.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nikita.yoush@cogentembedded.com \
    --cc=pabeni@redhat.com \
    --cc=s.shtylyov@omp.ru \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=yoshihiro.shimoda.uh@renesas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®