Re: [PATCH net-next v13 13/15] net: stmmac: dwmac-loongson: Drop pci_enable/disable_msi temporarily
From: Serge Semin <hidden>
Date: 2024-07-01 01:17:11
[PATCH net-next v13 13/15] net: stmmac: dwmac-loongson: Drop pci_enable/disable_msi temporarily
You don't drop the methods call "temporarily" but forever. So fix the subject like this please: [PATCH net-next v13 13/15] net: stmmac: dwmac-loongson: Drop pci_enable_msi/disable_msi methods call I understand that you meant that the MSI IRQs support will be added later in framework of another commit and for the multi-channel device case. But mentioning that in a way you did makes the commit log more confusing than better explaining the change. On Wed, May 29, 2024 at 06:21:08PM +0800, Yanteng Si wrote:
The LS2K2000 patch added later will alloc vectors, so let's remove pci_enable/disable_msi temporarily to prepare for later calls to pci_alloc_irq_vectors/pci_free_irq_vectors. This does not affect the work of gmac devices, as they actually use intx.
As I mentioned in v12 AFAICS the MSI IRQs haven't been utilized on the Loongseon GMAC devices so far since the IRQ numbers have been retrieved directly from device DT-node. That's what you should have mentioned in the log. Like this: "The Loongson GMAC driver currently doesn't utilize the MSI IRQs, but retrieves the IRQs specified in the device DT-node. Let's drop the direct pci_enable_msi()/pci_disable_msi() calls then as redundant." If what I said was correct and MSIs enable wasn't required for the platform IRQs to work, then please use the log and move this patch to being submitted between [PATCH net-next v13 04/15] net: stmmac: dwmac-loongson: Drop duplicated hash-based filter size init and [PATCH net-next v13 05/15] net: stmmac: dwmac-loongson: Use PCI_DEVICE_DATA() macro for device identification so the redundant pci_enable_msi()/pci_disable_msi() code wouldn't be getting on a way of the subsequent preparation changes. I'll get back to reviewing the rest of the patches tomorrow. That new LS2K2000 + LS GMAC info made things much harder to comprehend than I thought. But I think I finally managed to come up with what should be done with the commit logs and the changes, to make it being taken into account. -Serge(y)
quoted hunk ↗ jump to hunk
Signed-off-by: Feiyang Chen <redacted> Signed-off-by: Yinggang Gu <redacted> Signed-off-by: Yanteng Si <redacted> --- drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c index fdd25ff33d02..45dcc35b7955 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c@@ -167,7 +167,6 @@ static int loongson_dwmac_probe(struct pci_dev *pdev, const struct pci_device_id res.irq = pdev->irq; } - pci_enable_msi(pdev); memset(&res, 0, sizeof(res)); res.addr = pcim_iomap_table(pdev)[0];@@ -176,12 +175,10 @@ static int loongson_dwmac_probe(struct pci_dev *pdev, const struct pci_device_id ret = stmmac_dvr_probe(&pdev->dev, plat, &res); if (ret) - goto err_disable_msi; + goto err_disable_device; return ret; -err_disable_msi: - pci_disable_msi(pdev); err_disable_device: pci_disable_device(pdev); err_put_node:@@ -205,7 +202,6 @@ static void loongson_dwmac_remove(struct pci_dev *pdev) break; } - pci_disable_msi(pdev); pci_disable_device(pdev); }-- 2.31.4