Skip to contentSkip to conversation

dmaengine: Add Synopsys eDMA IP PCIe glue-logic

RFC New Andy Shevchenko 1 participant 1 message Jan 19, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

RFC v3 5/7 dmaengine: Add Synopsys eDMA IP PCIe glue-logic

Quoted 19 lines · Gustavo Pimentel
Quoted 18 lines · Andy Shevchenko
Quoted 16 lines · Gustavo Pimentel
Quoted 8 lines · Andy Shevchenko

Review

Quoted 3 lines · Gustavo Pimentel
(quoted diff) +3 -0
+static bool disable_msix;
+module_param(disable_msix, bool, 0644);
+MODULE_PARM_DESC(disable_msix, "Disable MSI-X interrupts");

Why?!
We are no allow new module parameters without very strong arguments.

Since this is a reference driver and might be used to test customized HW solutions, I added this parameter to allow the possibility to test the solution forcing the MSI feature binding. This is required specially if who will test this solution has a Root Complex with both features available (MSI and MSI-X), because the Kernel will give always preference to MSI-X binding (assuming that the EP has also both features available).

Quoted 6 lines
Quoted 1 line

Yes, you may do it for testing purposes, but it doesn't fit the kernel standards.

Ok, but how should I proceed? May I leave it or substitute by another way to do it? If so, how?
As I said, the intended is to be only used for this test case, on normal operation the parameter it should be always false.

Keep out-of-tree patch for your needs.

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines

Review

Quoted 4 lines
(quoted diff) +4 -0
+	if (!pdata) {
+		dev_err(dev, "%s missing data structure\n", pci_name(pdev));
+		return -EFAULT;
+	}

Useless check.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

Why? It's just a precaution, isn't it a good practice always to think of the worst case?

You just can put an implicit requirement of pdata rather than doing this

Ok, how can I do it? What I should add to the code to force that?

Not adding, removing. That's what I put before.

Quoted 5 lines
Quoted 3 lines

useless check. I don't believe it would make sense to have NULL pdata for the driver since it wouldn't be functional anyhow.

Yes, you're right without pdata the driver can't do anything.