mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:44:45 +01:00
crypto/ccp: Use PCI bridge defaults for IDE
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: 4be423572d ("crypto/ccp: Implement SEV-TIO PCIe IDE (phase1)")
Signed-off-by: Alexey Kardashevskiy <aik@amd.com>
Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
Link: https://patch.msgid.link/20260123053057.1350569-2-aik@amd.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
parent
894148a25a
commit
403dd7da22
1 changed files with 0 additions and 12 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue