* [PATCH v2] ath9k: use unmanaged PCI functions in ath9k_pci_owl_loader
@ 2024-04-09 20:28 Heiner Kallweit
2024-07-30 9:59 ` Toke Høiland-Jørgensen
2024-08-01 14:58 ` Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: Heiner Kallweit @ 2024-04-09 20:28 UTC (permalink / raw)
To: Toke Høiland-Jørgensen, Kalle Valo, Andreas Färber,
Manivannan Sadhasivami, Martin Blumenstingl
Cc: linux-wireless, linux-arm-kernel@lists.infradead.org,
linux-actions, linux-pci@vger.kernel.org
Only managed PCI resource in the driver is the iomapped bar. However the bar
is unmapped in the same function. Therefore using the device-managed
versions just causes overhead, w/o any benefit. Once this is switched to the
non-managed versions, there's nothing left to be managed for
pcim_enable_device(). Therefore we can reduce overhead here too and switch to
the non-managed version as well. This includes removing the no longer needed
call to pcim_pin_device().
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
v2:
- extended commit message
---
drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c b/drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c
index a5eb43f30..bc93ca075 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c
+++ b/drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c
@@ -65,7 +65,7 @@ static int ath9k_pci_fixup(struct pci_dev *pdev, const u16 *cal_data,
dev_info(&pdev->dev, "fixup device configuration\n");
- mem = pcim_iomap(pdev, 0, 0);
+ mem = pci_iomap(pdev, 0, 0);
if (!mem) {
dev_err(&pdev->dev, "ioremap error\n");
return -EINVAL;
@@ -103,7 +103,7 @@ static int ath9k_pci_fixup(struct pci_dev *pdev, const u16 *cal_data,
pci_write_config_word(pdev, PCI_COMMAND, cmd);
pci_write_config_dword(pdev, PCI_BASE_ADDRESS_0, bar0);
- pcim_iounmap(pdev, mem);
+ pci_iounmap(pdev, mem);
pci_disable_device(pdev);
@@ -200,11 +200,9 @@ static int owl_probe(struct pci_dev *pdev,
const char *eeprom_name;
int err = 0;
- if (pcim_enable_device(pdev))
+ if (pci_enable_device(pdev))
return -EIO;
- pcim_pin_device(pdev);
-
ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
if (!ctx)
return -ENOMEM;
--
2.44.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v2] ath9k: use unmanaged PCI functions in ath9k_pci_owl_loader
2024-04-09 20:28 [PATCH v2] ath9k: use unmanaged PCI functions in ath9k_pci_owl_loader Heiner Kallweit
@ 2024-07-30 9:59 ` Toke Høiland-Jørgensen
2024-08-01 14:58 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Toke Høiland-Jørgensen @ 2024-07-30 9:59 UTC (permalink / raw)
To: Heiner Kallweit, Kalle Valo, Andreas Färber,
Manivannan Sadhasivami, Martin Blumenstingl
Cc: linux-wireless, linux-arm-kernel@lists.infradead.org,
linux-actions, linux-pci@vger.kernel.org
Heiner Kallweit <hkallweit1@gmail.com> writes:
> Only managed PCI resource in the driver is the iomapped bar. However the bar
> is unmapped in the same function. Therefore using the device-managed
> versions just causes overhead, w/o any benefit. Once this is switched to the
> non-managed versions, there's nothing left to be managed for
> pcim_enable_device(). Therefore we can reduce overhead here too and switch to
> the non-managed version as well. This includes removing the no longer needed
> call to pcim_pin_device().
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] ath9k: use unmanaged PCI functions in ath9k_pci_owl_loader
2024-04-09 20:28 [PATCH v2] ath9k: use unmanaged PCI functions in ath9k_pci_owl_loader Heiner Kallweit
2024-07-30 9:59 ` Toke Høiland-Jørgensen
@ 2024-08-01 14:58 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2024-08-01 14:58 UTC (permalink / raw)
To: Heiner Kallweit
Cc: Toke Høiland-Jørgensen, Andreas Färber,
Manivannan Sadhasivami, Martin Blumenstingl, linux-wireless,
linux-arm-kernel@lists.infradead.org, linux-actions,
linux-pci@vger.kernel.org
Heiner Kallweit <hkallweit1@gmail.com> wrote:
> Only managed PCI resource in the driver is the iomapped bar. However the bar
> is unmapped in the same function. Therefore using the device-managed
> versions just causes overhead, w/o any benefit. Once this is switched to the
> non-managed versions, there's nothing left to be managed for
> pcim_enable_device(). Therefore we can reduce overhead here too and switch to
> the non-managed version as well. This includes removing the no longer needed
> call to pcim_pin_device().
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Patch applied to ath-next branch of ath.git, thanks.
aa0d7643c8dd wifi: ath9k: use unmanaged PCI functions in ath9k_pci_owl_loader
--
https://patchwork.kernel.org/project/linux-wireless/patch/3b46f6c7-4372-4cc9-9a7c-2c1c06d29324@gmail.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-08-01 14:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-09 20:28 [PATCH v2] ath9k: use unmanaged PCI functions in ath9k_pci_owl_loader Heiner Kallweit
2024-07-30 9:59 ` Toke Høiland-Jørgensen
2024-08-01 14:58 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).