Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: David S. Miller <davem@davemloft.net>

+13 -9
+3
drivers/net/ethernet/aquantia/atlantic/aq_nic.c
··· 95 95 /*rss rings */ 96 96 cfg->vecs = min(cfg->aq_hw_caps->vecs, AQ_CFG_VECS_DEF); 97 97 cfg->vecs = min(cfg->vecs, num_online_cpus()); 98 + cfg->vecs = min(cfg->vecs, self->irqvecs); 98 99 /* cfg->vecs should be power of 2 for RSS */ 99 100 if (cfg->vecs >= 8U) 100 101 cfg->vecs = 8U; ··· 247 246 248 247 self->ndev->hw_features |= aq_hw_caps->hw_features; 249 248 self->ndev->features = aq_hw_caps->hw_features; 249 + self->ndev->vlan_features |= NETIF_F_HW_CSUM | NETIF_F_RXCSUM | 250 + NETIF_F_RXHASH | NETIF_F_SG | NETIF_F_LRO; 250 251 self->ndev->priv_flags = aq_hw_caps->hw_priv_flags; 251 252 self->ndev->priv_flags |= IFF_LIVE_ADDR_CHANGE; 252 253
+1
drivers/net/ethernet/aquantia/atlantic/aq_nic.h
··· 80 80 81 81 struct pci_dev *pdev; 82 82 unsigned int msix_entry_mask; 83 + u32 irqvecs; 83 84 }; 84 85 85 86 static inline struct device *aq_nic_get_dev(struct aq_nic_s *self)
+9 -9
drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
··· 267 267 numvecs = min(numvecs, num_online_cpus()); 268 268 /*enable interrupts */ 269 269 #if !AQ_CFG_FORCE_LEGACY_INT 270 - err = pci_alloc_irq_vectors(self->pdev, numvecs, numvecs, 271 - PCI_IRQ_MSIX); 270 + numvecs = pci_alloc_irq_vectors(self->pdev, 1, numvecs, 271 + PCI_IRQ_MSIX | PCI_IRQ_MSI | 272 + PCI_IRQ_LEGACY); 272 273 273 - if (err < 0) { 274 - err = pci_alloc_irq_vectors(self->pdev, 1, 1, 275 - PCI_IRQ_MSI | PCI_IRQ_LEGACY); 276 - if (err < 0) 277 - goto err_hwinit; 274 + if (numvecs < 0) { 275 + err = numvecs; 276 + goto err_hwinit; 278 277 } 279 278 #endif 279 + self->irqvecs = numvecs; 280 280 281 281 /* net device init */ 282 282 aq_nic_cfg_start(self); ··· 298 298 kfree(self->aq_hw); 299 299 err_ioremap: 300 300 free_netdev(ndev); 301 - err_pci_func: 302 - pci_release_regions(pdev); 303 301 err_ndev: 302 + pci_release_regions(pdev); 303 + err_pci_func: 304 304 pci_disable_device(pdev); 305 305 return err; 306 306 }