From: Alexey Kardashevskiy <aik@amd.com>
To: <linux-crypto@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>,
Ashish Kalra <ashish.kalra@amd.com>,
"Tom Lendacky" <thomas.lendacky@amd.com>,
John Allen <john.allen@amd.com>,
"Herbert Xu" <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Dan Williams <dan.j.williams@intel.com>,
Alexey Kardashevskiy <aik@amd.com>, <x86@kernel.org>,
<linux-coco@lists.linux.dev>,
"Pratik R . Sampat" <prsampat@amd.com>
Subject: [PATCH kernel 1/2] crypto/ccp: Use PCI bridge defaults for IDE
Date: Fri, 23 Jan 2026 16:30:56 +1100 [thread overview]
Message-ID: <20260123053057.1350569-2-aik@amd.com> (raw)
In-Reply-To: <20260123053057.1350569-1-aik@amd.com>
The current number of streams in AMD TSM is 1 which is too little,
the core uses 255. Also, even if the module parameter is increased,
calling pci_ide_set_nr_streams() second time triggers WARN_ON.
Simplify the code by sticking to the PCI core defaults.
Fixes: 4be423572da1 ("crypto/ccp: Implement SEV-TIO PCIe IDE (phase1)")
Signed-off-by: Alexey Kardashevskiy <aik@amd.com>
---
drivers/crypto/ccp/sev-dev-tsm.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/drivers/crypto/ccp/sev-dev-tsm.c b/drivers/crypto/ccp/sev-dev-tsm.c
index ea29cd5d0ff9..7407b77c2ef2 100644
--- a/drivers/crypto/ccp/sev-dev-tsm.c
+++ b/drivers/crypto/ccp/sev-dev-tsm.c
@@ -19,12 +19,6 @@
MODULE_IMPORT_NS("PCI_IDE");
-#define TIO_DEFAULT_NR_IDE_STREAMS 1
-
-static uint nr_ide_streams = TIO_DEFAULT_NR_IDE_STREAMS;
-module_param_named(ide_nr, nr_ide_streams, uint, 0644);
-MODULE_PARM_DESC(ide_nr, "Set the maximum number of IDE streams per PHB");
-
#define dev_to_sp(dev) ((struct sp_device *)dev_get_drvdata(dev))
#define dev_to_psp(dev) ((struct psp_device *)(dev_to_sp(dev)->psp_data))
#define dev_to_sev(dev) ((struct sev_device *)(dev_to_psp(dev)->sev_data))
@@ -193,7 +187,6 @@ static void streams_teardown(struct pci_ide **ide)
static int stream_alloc(struct pci_dev *pdev, struct pci_ide **ide,
unsigned int tc)
{
- struct pci_dev *rp = pcie_find_root_port(pdev);
struct pci_ide *ide1;
if (ide[tc]) {
@@ -201,11 +194,6 @@ static int stream_alloc(struct pci_dev *pdev, struct pci_ide **ide,
return -EBUSY;
}
- /* FIXME: find a better way */
- if (nr_ide_streams != TIO_DEFAULT_NR_IDE_STREAMS)
- pci_notice(pdev, "Enable non-default %d streams", nr_ide_streams);
- pci_ide_set_nr_streams(to_pci_host_bridge(rp->bus->bridge), nr_ide_streams);
-
ide1 = pci_ide_stream_alloc(pdev);
if (!ide1)
return -EFAULT;
--
2.52.0
next prev parent reply other threads:[~2026-01-23 5:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-23 5:30 [PATCH kernel 0/2] crypto/ccp: Fixes for PCI IDE Alexey Kardashevskiy
2026-01-23 5:30 ` Alexey Kardashevskiy [this message]
2026-01-23 22:48 ` [PATCH kernel 1/2] crypto/ccp: Use PCI bridge defaults for IDE dan.j.williams
2026-01-23 5:30 ` [PATCH kernel 2/2] crypto/ccp: Allow multiple streams on the same root bridge Alexey Kardashevskiy
2026-01-23 22:59 ` dan.j.williams
2026-01-26 0:44 ` Alexey Kardashevskiy
2026-01-27 6:59 ` dan.j.williams
2026-01-29 22:29 ` Alexey Kardashevskiy
2026-01-23 16:01 ` [PATCH kernel 0/2] crypto/ccp: Fixes for PCI IDE Tom Lendacky
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=20260123053057.1350569-2-aik@amd.com \
--to=aik@amd.com \
--cc=ashish.kalra@amd.com \
--cc=dan.j.williams@intel.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=john.allen@amd.com \
--cc=linux-coco@lists.linux.dev \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=prsampat@amd.com \
--cc=thomas.lendacky@amd.com \
--cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox