From: Bjorn Helgaas <helgaas@kernel.org>
To: Rick Wertenbroek <rick.wertenbroek@gmail.com>
Cc: rick.wertenbroek@heig-vd.ch, dlemoal@kernel.org,
alberto.dassatti@heig-vd.ch,
"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
"Krzysztof Wilczyński" <kw@linux.com>,
"Kishon Vijay Abraham I" <kishon@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Niklas Cassel" <cassel@kernel.org>,
"Frank Li" <Frank.Li@nxp.com>,
"Lars-Peter Clausen" <lars@metafoo.de>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI: endpoint: pci-epf-test: Move DMA check into read/write/copy functions
Date: Tue, 6 Aug 2024 14:15:41 -0500 [thread overview]
Message-ID: <20240806191541.GA73196@bhelgaas> (raw)
In-Reply-To: <20240806162756.607002-1-rick.wertenbroek@gmail.com>
On Tue, Aug 06, 2024 at 06:27:54PM +0200, Rick Wertenbroek wrote:
> The test for a DMA transfer was done in pci_epf_test_cmd_handler, which
> if not supported would lead to the endpoint function just printing an
> error message and waiting for further commands. This would leave the
I guess it's the *test* that prints the error message? Is this the
"Cannot transfer data using DMA" message?
> host side PCI driver waiting for an interrupt because the call to
> pci_epf_test_raise_irq is skipped. The host side driver
> drivers/misc/pci_endpoint_test.c would hang indefinitely when sending
> a transfer request with DMA if the endpoint does not support it.
> This is because wait_for_completion() is used in the host side driver.
>
> Move the DMA check into the read/write/copy functions so that they
> report a transfer (IO) error so that pci_epf_test_raise_irq() is
> called when a transfer with DMA is requested, even if unsupported.
Add "()" after function names above, as you did for
pci_epf_test_raise_irq().
> The host side driver will still report an error on transfer thanks
> to the checksum, because no data was moved, but will not hang anymore
> waiting for an interrupt that will never arrive.
next prev parent reply other threads:[~2024-08-06 19:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-06 16:27 [PATCH] PCI: endpoint: pci-epf-test: Move DMA check into read/write/copy functions Rick Wertenbroek
2024-08-06 19:15 ` Bjorn Helgaas [this message]
2024-08-09 6:56 ` Rick Wertenbroek
2024-08-09 18:41 ` Bjorn Helgaas
2024-08-07 16:08 ` Damien Le Moal
2024-08-09 6:58 ` Rick Wertenbroek
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=20240806191541.GA73196@bhelgaas \
--to=helgaas@kernel.org \
--cc=Frank.Li@nxp.com \
--cc=alberto.dassatti@heig-vd.ch \
--cc=bhelgaas@google.com \
--cc=cassel@kernel.org \
--cc=dlemoal@kernel.org \
--cc=kishon@kernel.org \
--cc=kw@linux.com \
--cc=lars@metafoo.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=rick.wertenbroek@gmail.com \
--cc=rick.wertenbroek@heig-vd.ch \
/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.