mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 13:29:17 -04:00
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>
This commit is contained in:
committed by
Bjorn Helgaas
parent
5b44c2a705
commit
ff9b5e1477
@@ -17,7 +17,7 @@
|
||||
|
||||
#define AQ_CFG_IS_POLLING_DEF 0U
|
||||
|
||||
#define AQ_CFG_FORCE_LEGACY_INT 0U
|
||||
#define AQ_CFG_FORCE_INTX 0U
|
||||
|
||||
#define AQ_CFG_INTERRUPT_MODERATION_OFF 0
|
||||
#define AQ_CFG_INTERRUPT_MODERATION_ON 1
|
||||
|
||||
@@ -104,7 +104,7 @@ struct aq_stats_s {
|
||||
};
|
||||
|
||||
#define AQ_HW_IRQ_INVALID 0U
|
||||
#define AQ_HW_IRQ_LEGACY 1U
|
||||
#define AQ_HW_IRQ_INTX 1U
|
||||
#define AQ_HW_IRQ_MSI 2U
|
||||
#define AQ_HW_IRQ_MSIX 3U
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ void aq_nic_cfg_start(struct aq_nic_s *self)
|
||||
|
||||
cfg->irq_type = aq_pci_func_get_irq_type(self);
|
||||
|
||||
if ((cfg->irq_type == AQ_HW_IRQ_LEGACY) ||
|
||||
if ((cfg->irq_type == AQ_HW_IRQ_INTX) ||
|
||||
(cfg->aq_hw_caps->vecs == 1U) ||
|
||||
(cfg->vecs == 1U)) {
|
||||
cfg->is_rss = 0U;
|
||||
|
||||
@@ -200,7 +200,7 @@ unsigned int aq_pci_func_get_irq_type(struct aq_nic_s *self)
|
||||
if (self->pdev->msi_enabled)
|
||||
return AQ_HW_IRQ_MSI;
|
||||
|
||||
return AQ_HW_IRQ_LEGACY;
|
||||
return AQ_HW_IRQ_INTX;
|
||||
}
|
||||
|
||||
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,
|
||||
|
||||
numvecs += AQ_HW_SERVICE_IRQS;
|
||||
/*enable interrupts */
|
||||
#if !AQ_CFG_FORCE_LEGACY_INT
|
||||
err = pci_alloc_irq_vectors(self->pdev, 1, numvecs,
|
||||
PCI_IRQ_MSIX | PCI_IRQ_MSI |
|
||||
PCI_IRQ_LEGACY);
|
||||
|
||||
#if !AQ_CFG_FORCE_INTX
|
||||
err = pci_alloc_irq_vectors(self->pdev, 1, numvecs, PCI_IRQ_ALL_TYPES);
|
||||
if (err < 0)
|
||||
goto err_hwinit;
|
||||
numvecs = err;
|
||||
|
||||
@@ -352,7 +352,7 @@ static int hw_atl_a0_hw_init(struct aq_hw_s *self, const u8 *mac_addr)
|
||||
{
|
||||
static u32 aq_hw_atl_igcr_table_[4][2] = {
|
||||
[AQ_HW_IRQ_INVALID] = { 0x20000000U, 0x20000000U },
|
||||
[AQ_HW_IRQ_LEGACY] = { 0x20000080U, 0x20000080U },
|
||||
[AQ_HW_IRQ_INTX] = { 0x20000080U, 0x20000080U },
|
||||
[AQ_HW_IRQ_MSI] = { 0x20000021U, 0x20000025U },
|
||||
[AQ_HW_IRQ_MSIX] = { 0x20000022U, 0x20000026U },
|
||||
};
|
||||
|
||||
@@ -562,7 +562,7 @@ static int hw_atl_b0_hw_init(struct aq_hw_s *self, const u8 *mac_addr)
|
||||
{
|
||||
static u32 aq_hw_atl_igcr_table_[4][2] = {
|
||||
[AQ_HW_IRQ_INVALID] = { 0x20000000U, 0x20000000U },
|
||||
[AQ_HW_IRQ_LEGACY] = { 0x20000080U, 0x20000080U },
|
||||
[AQ_HW_IRQ_INTX] = { 0x20000080U, 0x20000080U },
|
||||
[AQ_HW_IRQ_MSI] = { 0x20000021U, 0x20000025U },
|
||||
[AQ_HW_IRQ_MSIX] = { 0x20000022U, 0x20000026U },
|
||||
};
|
||||
|
||||
@@ -534,7 +534,7 @@ static int hw_atl2_hw_init(struct aq_hw_s *self, const u8 *mac_addr)
|
||||
{
|
||||
static u32 aq_hw_atl2_igcr_table_[4][2] = {
|
||||
[AQ_HW_IRQ_INVALID] = { 0x20000000U, 0x20000000U },
|
||||
[AQ_HW_IRQ_LEGACY] = { 0x20000080U, 0x20000080U },
|
||||
[AQ_HW_IRQ_INTX] = { 0x20000080U, 0x20000080U },
|
||||
[AQ_HW_IRQ_MSI] = { 0x20000021U, 0x20000025U },
|
||||
[AQ_HW_IRQ_MSIX] = { 0x20000022U, 0x20000026U },
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user