Skip to content

Commit ff9b5e1

Browse files
damien-lemoalbjorn-helgaas
authored andcommitted
net: atlantic: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY
Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY macro. To be consistent with this change, rename AQ_HW_IRQ_LEGACY and AQ_CFG_FORCE_LEGACY_INT to AQ_HW_IRQ_INTX and AQ_CFG_FORCE_INTX. Link: https://lore.kernel.org/r/20240325070944.3600338-16-dlemoal@kernel.org Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
1 parent 5b44c2a commit ff9b5e1

7 files changed

Lines changed: 9 additions & 12 deletions

File tree

drivers/net/ethernet/aquantia/atlantic/aq_cfg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#define AQ_CFG_IS_POLLING_DEF 0U
1919

20-
#define AQ_CFG_FORCE_LEGACY_INT 0U
20+
#define AQ_CFG_FORCE_INTX 0U
2121

2222
#define AQ_CFG_INTERRUPT_MODERATION_OFF 0
2323
#define AQ_CFG_INTERRUPT_MODERATION_ON 1

drivers/net/ethernet/aquantia/atlantic/aq_hw.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ struct aq_stats_s {
104104
};
105105

106106
#define AQ_HW_IRQ_INVALID 0U
107-
#define AQ_HW_IRQ_LEGACY 1U
107+
#define AQ_HW_IRQ_INTX 1U
108108
#define AQ_HW_IRQ_MSI 2U
109109
#define AQ_HW_IRQ_MSIX 3U
110110

drivers/net/ethernet/aquantia/atlantic/aq_nic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ void aq_nic_cfg_start(struct aq_nic_s *self)
127127

128128
cfg->irq_type = aq_pci_func_get_irq_type(self);
129129

130-
if ((cfg->irq_type == AQ_HW_IRQ_LEGACY) ||
130+
if ((cfg->irq_type == AQ_HW_IRQ_INTX) ||
131131
(cfg->aq_hw_caps->vecs == 1U) ||
132132
(cfg->vecs == 1U)) {
133133
cfg->is_rss = 0U;

drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ unsigned int aq_pci_func_get_irq_type(struct aq_nic_s *self)
200200
if (self->pdev->msi_enabled)
201201
return AQ_HW_IRQ_MSI;
202202

203-
return AQ_HW_IRQ_LEGACY;
203+
return AQ_HW_IRQ_INTX;
204204
}
205205

206206
static void aq_pci_free_irq_vectors(struct aq_nic_s *self)
@@ -298,11 +298,8 @@ static int aq_pci_probe(struct pci_dev *pdev,
298298

299299
numvecs += AQ_HW_SERVICE_IRQS;
300300
/*enable interrupts */
301-
#if !AQ_CFG_FORCE_LEGACY_INT
302-
err = pci_alloc_irq_vectors(self->pdev, 1, numvecs,
303-
PCI_IRQ_MSIX | PCI_IRQ_MSI |
304-
PCI_IRQ_LEGACY);
305-
301+
#if !AQ_CFG_FORCE_INTX
302+
err = pci_alloc_irq_vectors(self->pdev, 1, numvecs, PCI_IRQ_ALL_TYPES);
306303
if (err < 0)
307304
goto err_hwinit;
308305
numvecs = err;

drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ static int hw_atl_a0_hw_init(struct aq_hw_s *self, const u8 *mac_addr)
352352
{
353353
static u32 aq_hw_atl_igcr_table_[4][2] = {
354354
[AQ_HW_IRQ_INVALID] = { 0x20000000U, 0x20000000U },
355-
[AQ_HW_IRQ_LEGACY] = { 0x20000080U, 0x20000080U },
355+
[AQ_HW_IRQ_INTX] = { 0x20000080U, 0x20000080U },
356356
[AQ_HW_IRQ_MSI] = { 0x20000021U, 0x20000025U },
357357
[AQ_HW_IRQ_MSIX] = { 0x20000022U, 0x20000026U },
358358
};

drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ static int hw_atl_b0_hw_init(struct aq_hw_s *self, const u8 *mac_addr)
562562
{
563563
static u32 aq_hw_atl_igcr_table_[4][2] = {
564564
[AQ_HW_IRQ_INVALID] = { 0x20000000U, 0x20000000U },
565-
[AQ_HW_IRQ_LEGACY] = { 0x20000080U, 0x20000080U },
565+
[AQ_HW_IRQ_INTX] = { 0x20000080U, 0x20000080U },
566566
[AQ_HW_IRQ_MSI] = { 0x20000021U, 0x20000025U },
567567
[AQ_HW_IRQ_MSIX] = { 0x20000022U, 0x20000026U },
568568
};

drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ static int hw_atl2_hw_init(struct aq_hw_s *self, const u8 *mac_addr)
534534
{
535535
static u32 aq_hw_atl2_igcr_table_[4][2] = {
536536
[AQ_HW_IRQ_INVALID] = { 0x20000000U, 0x20000000U },
537-
[AQ_HW_IRQ_LEGACY] = { 0x20000080U, 0x20000080U },
537+
[AQ_HW_IRQ_INTX] = { 0x20000080U, 0x20000080U },
538538
[AQ_HW_IRQ_MSI] = { 0x20000021U, 0x20000025U },
539539
[AQ_HW_IRQ_MSIX] = { 0x20000022U, 0x20000026U },
540540
};

0 commit comments

Comments
 (0)