From: Pavel Pisa <pisa@fel.cvut.cz>
To: Avi Weiss <thnkslprpt@gmail.com>
Cc: linux-can@vger.kernel.org, Ondrej Ille <ondrej.ille@gmail.com>,
"Marc Kleine-Budde" <mkl@pengutronix.de>,
Vincent Mailhol <mailhol@kernel.org>,
Martin Jerabek <martin.jerabek01@gmail.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] can: ctucanfd: unmap BAR0 using base address
Date: Thu, 23 Jul 2026 12:17:28 +0200 [thread overview]
Message-ID: <202607231217.28574.pisa@fel.cvut.cz> (raw)
In-Reply-To: <20260723095934.181042-1-thnkslprpt@gmail.com>
Hello Avi,
thanks for correction.
On Thursday 23 of July 2026 11:59:34 Avi Weiss wrote:
> BAR0 is mapped into bar0_base, while cra_addr points to an offset
> within that mapping and is used for other purposes.
>
> Pass bar0_base to pci_iounmap(), instead of cra_addr, on the probe error
> path so the address returned by pci_iomap() is used for unmapping.
>
> Fixes: 792a5b678e81 ("can: ctucanfd: CTU CAN FD open-source IP core - PCI
> bus support.") Signed-off-by: Avi Weiss <thnkslprpt@gmail.com>
> ---
> drivers/net/can/ctucanfd/ctucanfd_pci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/can/ctucanfd/ctucanfd_pci.c
> b/drivers/net/can/ctucanfd/ctucanfd_pci.c index 625788fa8976..f845951c5d51
> 100644
> --- a/drivers/net/can/ctucanfd/ctucanfd_pci.c
> +++ b/drivers/net/can/ctucanfd/ctucanfd_pci.c
> @@ -194,7 +194,7 @@ static int ctucan_pci_probe(struct pci_dev *pdev,
> pci_set_drvdata(pdev, NULL);
> kfree(bdata);
> err_pci_iounmap_bar0:
> - pci_iounmap(pdev, cra_addr);
> + pci_iounmap(pdev, bar0_base);
> err_pci_iounmap_bar1:
> pci_iounmap(pdev, addr);
> err_release_regions:
Acked-by: Pavel Pisa <pisa@fel.cvut.cz>
CRA has been on the start in initial PCIe integrated
version and when it has been shifted the switch
of the name has been done incorrectly for pci_iounmap
Best wishes,
Pavel Pisa
phone: +420 603531357
e-mail: pisa@cmp.felk.cvut.cz
Department of Control Engineering FEE CVUT
Karlovo namesti 13, 121 35, Prague 2
university: http://control.fel.cvut.cz/
personal: http://cmp.felk.cvut.cz/~pisa
social: https://social.kernel.org/ppisa
projects: https://www.openhub.net/accounts/ppisa
CAN related:http://canbus.pages.fel.cvut.cz/
RISC-V education: https://comparch.edu.cvut.cz/
Open Technologies Research Education and Exchange Services
https://gitlab.fel.cvut.cz/otrees/org/-/wikis/home
prev parent reply other threads:[~2026-07-23 10:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-23 9:59 [PATCH net] can: ctucanfd: unmap BAR0 using base address Avi Weiss
2026-07-23 10:17 ` Pavel Pisa [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=202607231217.28574.pisa@fel.cvut.cz \
--to=pisa@fel.cvut.cz \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mailhol@kernel.org \
--cc=martin.jerabek01@gmail.com \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=ondrej.ille@gmail.com \
--cc=thnkslprpt@gmail.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