From: Niklas Cassel <cassel@kernel.org>
To: Koichiro Den <den@valinux.co.jp>, frank.li@nxp.com
Cc: Manivannan Sadhasivam <mani@kernel.org>,
bhelgaas@google.com, kwilczynski@kernel.org,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v8 0/5] PCI: endpoint: BAR subrange mapping support
Date: Fri, 23 Jan 2026 11:16:24 +0100 [thread overview]
Message-ID: <aXNKeKmkclah0eOp@ryzen> (raw)
In-Reply-To: <aXMytcJTIeBHatIF@ryzen>
On Fri, Jan 23, 2026 at 09:35:01AM +0100, Niklas Cassel wrote:
>
> pci_epf_test_enable_doorbell() simply does:
> pci_epc_get_next_free_bar() to get a BAR, then writes the BAR
> number in the in the pci-epf-test command registers, offset:
> PCI_ENDPOINT_TEST_DB_BAR 0x34
>
> However, the doorbells are most likely very small, so the chances
> that reg->doorbell_offset will have a value that is smaller than
> BAR size seems likely... but not guaranteed... and there is no
>
> if (reg->doorbell_offset > epf->bar[bar].size)
> goto err_doorbell_cleanup;
>
> So it seems that this doorbell test just ignores the problem...
>
> Frank, could you perhaps send a patch to add something like the above?
Frank, I guess the check would actually have to be something like:
if (reg->doorbell_offset + size of the doorbell > epf->bar[bar].size)
goto err_doorbell_cleanup;
Kind regards,
Niklas
next prev parent reply other threads:[~2026-01-23 10:16 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-15 8:49 [PATCH v8 0/5] PCI: endpoint: BAR subrange mapping support Koichiro Den
2026-01-15 8:49 ` Koichiro Den
2026-01-15 8:49 ` [PATCH v8 1/5] PCI: endpoint: Add dynamic_inbound_mapping EPC feature Koichiro Den
2026-01-15 8:49 ` Koichiro Den
2026-01-15 8:49 ` [PATCH v8 2/5] PCI: endpoint: Add BAR subrange mapping support Koichiro Den
2026-01-15 8:49 ` Koichiro Den
2026-01-15 14:52 ` Frank Li
2026-01-15 14:52 ` Frank Li
2026-01-15 15:21 ` Niklas Cassel
2026-01-15 15:21 ` Niklas Cassel
2026-01-15 19:44 ` Frank Li
2026-01-15 19:44 ` Frank Li
2026-01-19 8:42 ` Koichiro Den
2026-01-19 8:42 ` Koichiro Den
2026-01-15 8:49 ` [PATCH v8 3/5] PCI: dwc: Advertise dynamic inbound " Koichiro Den
2026-01-15 8:49 ` Koichiro Den
2026-01-15 14:54 ` Frank Li
2026-01-15 14:54 ` Frank Li
2026-01-15 8:49 ` [PATCH v8 4/5] PCI: dwc: ep: Support BAR subrange inbound mapping via Address Match Mode iATU Koichiro Den
2026-01-15 8:49 ` Koichiro Den
2026-01-15 15:22 ` Frank Li
2026-01-15 15:22 ` Frank Li
2026-01-15 8:49 ` [PATCH v8 5/5] Documentation: PCI: endpoint: Clarify pci_epc_set_bar() usage Koichiro Den
2026-01-15 8:49 ` Koichiro Den
2026-01-15 15:23 ` Frank Li
2026-01-15 15:23 ` Frank Li
2026-01-19 13:00 ` [PATCH v8 0/5] PCI: endpoint: BAR subrange mapping support Koichiro Den
2026-01-21 15:38 ` Manivannan Sadhasivam
2026-01-22 1:52 ` Koichiro Den
2026-01-22 6:46 ` Manivannan Sadhasivam
2026-01-22 8:45 ` Niklas Cassel
2026-01-22 14:02 ` Koichiro Den
2026-01-22 15:17 ` Niklas Cassel
2026-01-23 0:36 ` Koichiro Den
2026-01-23 7:11 ` Koichiro Den
2026-01-23 8:35 ` Niklas Cassel
2026-01-23 10:16 ` Niklas Cassel [this message]
2026-01-23 14:08 ` Koichiro Den
2026-01-23 14:57 ` Niklas Cassel
2026-01-26 14:26 ` Koichiro Den
2026-01-26 19:08 ` Niklas Cassel
2026-01-23 15:26 ` Niklas Cassel
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=aXNKeKmkclah0eOp@ryzen \
--to=cassel@kernel.org \
--cc=bhelgaas@google.com \
--cc=den@valinux.co.jp \
--cc=frank.li@nxp.com \
--cc=kwilczynski@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mani@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.