Commit 895b6176 authored by David S. Miller's avatar David S. Miller

Merge branch 'Aquantia-various-patches-2018-05'

Igor Russkikh says:

====================
Aquantia various patches 2018-05

These are two patches covering issues found during test cycles:

First is that driver should declare valid vlan_features
Second fix is about correct allocation of MSI interrupts on some systems.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents a9f71d0d a09bd81b
...@@ -95,6 +95,7 @@ void aq_nic_cfg_start(struct aq_nic_s *self) ...@@ -95,6 +95,7 @@ void aq_nic_cfg_start(struct aq_nic_s *self)
/*rss rings */ /*rss rings */
cfg->vecs = min(cfg->aq_hw_caps->vecs, AQ_CFG_VECS_DEF); cfg->vecs = min(cfg->aq_hw_caps->vecs, AQ_CFG_VECS_DEF);
cfg->vecs = min(cfg->vecs, num_online_cpus()); cfg->vecs = min(cfg->vecs, num_online_cpus());
cfg->vecs = min(cfg->vecs, self->irqvecs);
/* cfg->vecs should be power of 2 for RSS */ /* cfg->vecs should be power of 2 for RSS */
if (cfg->vecs >= 8U) if (cfg->vecs >= 8U)
cfg->vecs = 8U; cfg->vecs = 8U;
...@@ -246,6 +247,8 @@ void aq_nic_ndev_init(struct aq_nic_s *self) ...@@ -246,6 +247,8 @@ void aq_nic_ndev_init(struct aq_nic_s *self)
self->ndev->hw_features |= aq_hw_caps->hw_features; self->ndev->hw_features |= aq_hw_caps->hw_features;
self->ndev->features = aq_hw_caps->hw_features; self->ndev->features = aq_hw_caps->hw_features;
self->ndev->vlan_features |= NETIF_F_HW_CSUM | NETIF_F_RXCSUM |
NETIF_F_RXHASH | NETIF_F_SG | NETIF_F_LRO;
self->ndev->priv_flags = aq_hw_caps->hw_priv_flags; self->ndev->priv_flags = aq_hw_caps->hw_priv_flags;
self->ndev->priv_flags |= IFF_LIVE_ADDR_CHANGE; self->ndev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
......
...@@ -80,6 +80,7 @@ struct aq_nic_s { ...@@ -80,6 +80,7 @@ struct aq_nic_s {
struct pci_dev *pdev; struct pci_dev *pdev;
unsigned int msix_entry_mask; unsigned int msix_entry_mask;
u32 irqvecs;
}; };
static inline struct device *aq_nic_get_dev(struct aq_nic_s *self) static inline struct device *aq_nic_get_dev(struct aq_nic_s *self)
......
...@@ -267,16 +267,16 @@ static int aq_pci_probe(struct pci_dev *pdev, ...@@ -267,16 +267,16 @@ static int aq_pci_probe(struct pci_dev *pdev,
numvecs = min(numvecs, num_online_cpus()); numvecs = min(numvecs, num_online_cpus());
/*enable interrupts */ /*enable interrupts */
#if !AQ_CFG_FORCE_LEGACY_INT #if !AQ_CFG_FORCE_LEGACY_INT
err = pci_alloc_irq_vectors(self->pdev, numvecs, numvecs, numvecs = pci_alloc_irq_vectors(self->pdev, 1, numvecs,
PCI_IRQ_MSIX); PCI_IRQ_MSIX | PCI_IRQ_MSI |
PCI_IRQ_LEGACY);
if (err < 0) {
err = pci_alloc_irq_vectors(self->pdev, 1, 1, if (numvecs < 0) {
PCI_IRQ_MSI | PCI_IRQ_LEGACY); err = numvecs;
if (err < 0) goto err_hwinit;
goto err_hwinit;
} }
#endif #endif
self->irqvecs = numvecs;
/* net device init */ /* net device init */
aq_nic_cfg_start(self); aq_nic_cfg_start(self);
...@@ -298,9 +298,9 @@ static int aq_pci_probe(struct pci_dev *pdev, ...@@ -298,9 +298,9 @@ static int aq_pci_probe(struct pci_dev *pdev,
kfree(self->aq_hw); kfree(self->aq_hw);
err_ioremap: err_ioremap:
free_netdev(ndev); free_netdev(ndev);
err_pci_func:
pci_release_regions(pdev);
err_ndev: err_ndev:
pci_release_regions(pdev);
err_pci_func:
pci_disable_device(pdev); pci_disable_device(pdev);
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment