Skip to content

Commit 60706ea

Browse files
damien-lemoalbjorn-helgaas
authored andcommitted
wifi: ath10k: Refer to INTX instead of LEGACY
To be consistent with the deprecation of PCI_IRQ_LEGACY and its replacement with PCI_IRQ_INTX, rename macros and functions referencing "legacy irq" to instead use the term "intx irq". Link: https://lore.kernel.org/r/20240325070944.3600338-20-dlemoal@kernel.org Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
1 parent 935d5b3 commit 60706ea

3 files changed

Lines changed: 30 additions & 30 deletions

File tree

drivers/net/wireless/ath/ath10k/ahb.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -394,14 +394,14 @@ static irqreturn_t ath10k_ahb_interrupt_handler(int irq, void *arg)
394394
if (!ath10k_pci_irq_pending(ar))
395395
return IRQ_NONE;
396396

397-
ath10k_pci_disable_and_clear_legacy_irq(ar);
397+
ath10k_pci_disable_and_clear_intx_irq(ar);
398398
ath10k_pci_irq_msi_fw_mask(ar);
399399
napi_schedule(&ar->napi);
400400

401401
return IRQ_HANDLED;
402402
}
403403

404-
static int ath10k_ahb_request_irq_legacy(struct ath10k *ar)
404+
static int ath10k_ahb_request_irq_intx(struct ath10k *ar)
405405
{
406406
struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
407407
struct ath10k_ahb *ar_ahb = ath10k_ahb_priv(ar);
@@ -415,12 +415,12 @@ static int ath10k_ahb_request_irq_legacy(struct ath10k *ar)
415415
ar_ahb->irq, ret);
416416
return ret;
417417
}
418-
ar_pci->oper_irq_mode = ATH10K_PCI_IRQ_LEGACY;
418+
ar_pci->oper_irq_mode = ATH10K_PCI_IRQ_INTX;
419419

420420
return 0;
421421
}
422422

423-
static void ath10k_ahb_release_irq_legacy(struct ath10k *ar)
423+
static void ath10k_ahb_release_irq_intx(struct ath10k *ar)
424424
{
425425
struct ath10k_ahb *ar_ahb = ath10k_ahb_priv(ar);
426426

@@ -430,7 +430,7 @@ static void ath10k_ahb_release_irq_legacy(struct ath10k *ar)
430430
static void ath10k_ahb_irq_disable(struct ath10k *ar)
431431
{
432432
ath10k_ce_disable_interrupts(ar);
433-
ath10k_pci_disable_and_clear_legacy_irq(ar);
433+
ath10k_pci_disable_and_clear_intx_irq(ar);
434434
}
435435

436436
static int ath10k_ahb_resource_init(struct ath10k *ar)
@@ -621,7 +621,7 @@ static int ath10k_ahb_hif_start(struct ath10k *ar)
621621

622622
ath10k_core_napi_enable(ar);
623623
ath10k_ce_enable_interrupts(ar);
624-
ath10k_pci_enable_legacy_irq(ar);
624+
ath10k_pci_enable_intx_irq(ar);
625625

626626
ath10k_pci_rx_post(ar);
627627

@@ -775,7 +775,7 @@ static int ath10k_ahb_probe(struct platform_device *pdev)
775775

776776
ath10k_pci_init_napi(ar);
777777

778-
ret = ath10k_ahb_request_irq_legacy(ar);
778+
ret = ath10k_ahb_request_irq_intx(ar);
779779
if (ret)
780780
goto err_free_pipes;
781781

@@ -806,7 +806,7 @@ static int ath10k_ahb_probe(struct platform_device *pdev)
806806
ath10k_ahb_clock_disable(ar);
807807

808808
err_free_irq:
809-
ath10k_ahb_release_irq_legacy(ar);
809+
ath10k_ahb_release_irq_intx(ar);
810810

811811
err_free_pipes:
812812
ath10k_pci_release_resource(ar);
@@ -828,7 +828,7 @@ static void ath10k_ahb_remove(struct platform_device *pdev)
828828

829829
ath10k_core_unregister(ar);
830830
ath10k_ahb_irq_disable(ar);
831-
ath10k_ahb_release_irq_legacy(ar);
831+
ath10k_ahb_release_irq_intx(ar);
832832
ath10k_pci_release_resource(ar);
833833
ath10k_ahb_halt_chip(ar);
834834
ath10k_ahb_clock_disable(ar);

drivers/net/wireless/ath/ath10k/pci.c

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ bool ath10k_pci_irq_pending(struct ath10k *ar)
721721
return false;
722722
}
723723

724-
void ath10k_pci_disable_and_clear_legacy_irq(struct ath10k *ar)
724+
void ath10k_pci_disable_and_clear_intx_irq(struct ath10k *ar)
725725
{
726726
/* IMPORTANT: INTR_CLR register has to be set after
727727
* INTR_ENABLE is set to 0, otherwise interrupt can not be
@@ -739,7 +739,7 @@ void ath10k_pci_disable_and_clear_legacy_irq(struct ath10k *ar)
739739
PCIE_INTR_ENABLE_ADDRESS);
740740
}
741741

742-
void ath10k_pci_enable_legacy_irq(struct ath10k *ar)
742+
void ath10k_pci_enable_intx_irq(struct ath10k *ar)
743743
{
744744
ath10k_pci_write32(ar, SOC_CORE_BASE_ADDRESS +
745745
PCIE_INTR_ENABLE_ADDRESS,
@@ -1935,7 +1935,7 @@ static void ath10k_pci_irq_msi_fw_unmask(struct ath10k *ar)
19351935
static void ath10k_pci_irq_disable(struct ath10k *ar)
19361936
{
19371937
ath10k_ce_disable_interrupts(ar);
1938-
ath10k_pci_disable_and_clear_legacy_irq(ar);
1938+
ath10k_pci_disable_and_clear_intx_irq(ar);
19391939
ath10k_pci_irq_msi_fw_mask(ar);
19401940
}
19411941

@@ -1949,7 +1949,7 @@ static void ath10k_pci_irq_sync(struct ath10k *ar)
19491949
static void ath10k_pci_irq_enable(struct ath10k *ar)
19501950
{
19511951
ath10k_ce_enable_interrupts(ar);
1952-
ath10k_pci_enable_legacy_irq(ar);
1952+
ath10k_pci_enable_intx_irq(ar);
19531953
ath10k_pci_irq_msi_fw_unmask(ar);
19541954
}
19551955

@@ -3111,11 +3111,11 @@ static irqreturn_t ath10k_pci_interrupt_handler(int irq, void *arg)
31113111
return IRQ_NONE;
31123112
}
31133113

3114-
if ((ar_pci->oper_irq_mode == ATH10K_PCI_IRQ_LEGACY) &&
3114+
if ((ar_pci->oper_irq_mode == ATH10K_PCI_IRQ_INTX) &&
31153115
!ath10k_pci_irq_pending(ar))
31163116
return IRQ_NONE;
31173117

3118-
ath10k_pci_disable_and_clear_legacy_irq(ar);
3118+
ath10k_pci_disable_and_clear_intx_irq(ar);
31193119
ath10k_pci_irq_msi_fw_mask(ar);
31203120
napi_schedule(&ar->napi);
31213121

@@ -3152,7 +3152,7 @@ static int ath10k_pci_napi_poll(struct napi_struct *ctx, int budget)
31523152
napi_schedule(ctx);
31533153
goto out;
31543154
}
3155-
ath10k_pci_enable_legacy_irq(ar);
3155+
ath10k_pci_enable_intx_irq(ar);
31563156
ath10k_pci_irq_msi_fw_unmask(ar);
31573157
}
31583158

@@ -3177,7 +3177,7 @@ static int ath10k_pci_request_irq_msi(struct ath10k *ar)
31773177
return 0;
31783178
}
31793179

3180-
static int ath10k_pci_request_irq_legacy(struct ath10k *ar)
3180+
static int ath10k_pci_request_irq_intx(struct ath10k *ar)
31813181
{
31823182
struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
31833183
int ret;
@@ -3199,8 +3199,8 @@ static int ath10k_pci_request_irq(struct ath10k *ar)
31993199
struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
32003200

32013201
switch (ar_pci->oper_irq_mode) {
3202-
case ATH10K_PCI_IRQ_LEGACY:
3203-
return ath10k_pci_request_irq_legacy(ar);
3202+
case ATH10K_PCI_IRQ_INTX:
3203+
return ath10k_pci_request_irq_intx(ar);
32043204
case ATH10K_PCI_IRQ_MSI:
32053205
return ath10k_pci_request_irq_msi(ar);
32063206
default:
@@ -3232,7 +3232,7 @@ static int ath10k_pci_init_irq(struct ath10k *ar)
32323232
ath10k_pci_irq_mode);
32333233

32343234
/* Try MSI */
3235-
if (ath10k_pci_irq_mode != ATH10K_PCI_IRQ_LEGACY) {
3235+
if (ath10k_pci_irq_mode != ATH10K_PCI_IRQ_INTX) {
32363236
ar_pci->oper_irq_mode = ATH10K_PCI_IRQ_MSI;
32373237
ret = pci_enable_msi(ar_pci->pdev);
32383238
if (ret == 0)
@@ -3250,15 +3250,15 @@ static int ath10k_pci_init_irq(struct ath10k *ar)
32503250
* For now, fix the race by repeating the write in below
32513251
* synchronization checking.
32523252
*/
3253-
ar_pci->oper_irq_mode = ATH10K_PCI_IRQ_LEGACY;
3253+
ar_pci->oper_irq_mode = ATH10K_PCI_IRQ_INTX;
32543254

32553255
ath10k_pci_write32(ar, SOC_CORE_BASE_ADDRESS + PCIE_INTR_ENABLE_ADDRESS,
32563256
PCIE_INTR_FIRMWARE_MASK | PCIE_INTR_CE_MASK_ALL);
32573257

32583258
return 0;
32593259
}
32603260

3261-
static void ath10k_pci_deinit_irq_legacy(struct ath10k *ar)
3261+
static void ath10k_pci_deinit_irq_intx(struct ath10k *ar)
32623262
{
32633263
ath10k_pci_write32(ar, SOC_CORE_BASE_ADDRESS + PCIE_INTR_ENABLE_ADDRESS,
32643264
0);
@@ -3269,8 +3269,8 @@ static int ath10k_pci_deinit_irq(struct ath10k *ar)
32693269
struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
32703270

32713271
switch (ar_pci->oper_irq_mode) {
3272-
case ATH10K_PCI_IRQ_LEGACY:
3273-
ath10k_pci_deinit_irq_legacy(ar);
3272+
case ATH10K_PCI_IRQ_INTX:
3273+
ath10k_pci_deinit_irq_intx(ar);
32743274
break;
32753275
default:
32763276
pci_disable_msi(ar_pci->pdev);
@@ -3307,14 +3307,14 @@ int ath10k_pci_wait_for_target_init(struct ath10k *ar)
33073307
if (val & FW_IND_INITIALIZED)
33083308
break;
33093309

3310-
if (ar_pci->oper_irq_mode == ATH10K_PCI_IRQ_LEGACY)
3310+
if (ar_pci->oper_irq_mode == ATH10K_PCI_IRQ_INTX)
33113311
/* Fix potential race by repeating CORE_BASE writes */
3312-
ath10k_pci_enable_legacy_irq(ar);
3312+
ath10k_pci_enable_intx_irq(ar);
33133313

33143314
mdelay(10);
33153315
} while (time_before(jiffies, timeout));
33163316

3317-
ath10k_pci_disable_and_clear_legacy_irq(ar);
3317+
ath10k_pci_disable_and_clear_intx_irq(ar);
33183318
ath10k_pci_irq_msi_fw_mask(ar);
33193319

33203320
if (val == 0xffffffff) {

drivers/net/wireless/ath/ath10k/pci.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ struct ath10k_pci_supp_chip {
101101

102102
enum ath10k_pci_irq_mode {
103103
ATH10K_PCI_IRQ_AUTO = 0,
104-
ATH10K_PCI_IRQ_LEGACY = 1,
104+
ATH10K_PCI_IRQ_INTX = 1,
105105
ATH10K_PCI_IRQ_MSI = 2,
106106
};
107107

@@ -243,9 +243,9 @@ int ath10k_pci_init_pipes(struct ath10k *ar);
243243
int ath10k_pci_init_config(struct ath10k *ar);
244244
void ath10k_pci_rx_post(struct ath10k *ar);
245245
void ath10k_pci_flush(struct ath10k *ar);
246-
void ath10k_pci_enable_legacy_irq(struct ath10k *ar);
246+
void ath10k_pci_enable_intx_irq(struct ath10k *ar);
247247
bool ath10k_pci_irq_pending(struct ath10k *ar);
248-
void ath10k_pci_disable_and_clear_legacy_irq(struct ath10k *ar);
248+
void ath10k_pci_disable_and_clear_intx_irq(struct ath10k *ar);
249249
void ath10k_pci_irq_msi_fw_mask(struct ath10k *ar);
250250
int ath10k_pci_wait_for_target_init(struct ath10k *ar);
251251
int ath10k_pci_setup_resource(struct ath10k *ar);

0 commit comments

Comments
 (0)