Skip to content

Commit 895b617

Browse files
committed
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 <[email protected]>
2 parents a9f71d0 + a09bd81 commit 895b617

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ void aq_nic_cfg_start(struct aq_nic_s *self)
9595
/*rss rings */
9696
cfg->vecs = min(cfg->aq_hw_caps->vecs, AQ_CFG_VECS_DEF);
9797
cfg->vecs = min(cfg->vecs, num_online_cpus());
98+
cfg->vecs = min(cfg->vecs, self->irqvecs);
9899
/* cfg->vecs should be power of 2 for RSS */
99100
if (cfg->vecs >= 8U)
100101
cfg->vecs = 8U;
@@ -246,6 +247,8 @@ void aq_nic_ndev_init(struct aq_nic_s *self)
246247

247248
self->ndev->hw_features |= aq_hw_caps->hw_features;
248249
self->ndev->features = aq_hw_caps->hw_features;
250+
self->ndev->vlan_features |= NETIF_F_HW_CSUM | NETIF_F_RXCSUM |
251+
NETIF_F_RXHASH | NETIF_F_SG | NETIF_F_LRO;
249252
self->ndev->priv_flags = aq_hw_caps->hw_priv_flags;
250253
self->ndev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
251254

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ struct aq_nic_s {
8080

8181
struct pci_dev *pdev;
8282
unsigned int msix_entry_mask;
83+
u32 irqvecs;
8384
};
8485

8586
static inline struct device *aq_nic_get_dev(struct aq_nic_s *self)

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -267,16 +267,16 @@ static int aq_pci_probe(struct pci_dev *pdev,
267267
numvecs = min(numvecs, num_online_cpus());
268268
/*enable interrupts */
269269
#if !AQ_CFG_FORCE_LEGACY_INT
270-
err = pci_alloc_irq_vectors(self->pdev, numvecs, numvecs,
271-
PCI_IRQ_MSIX);
272-
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;
270+
numvecs = pci_alloc_irq_vectors(self->pdev, 1, numvecs,
271+
PCI_IRQ_MSIX | PCI_IRQ_MSI |
272+
PCI_IRQ_LEGACY);
273+
274+
if (numvecs < 0) {
275+
err = numvecs;
276+
goto err_hwinit;
278277
}
279278
#endif
279+
self->irqvecs = numvecs;
280280

281281
/* net device init */
282282
aq_nic_cfg_start(self);
@@ -298,9 +298,9 @@ static int aq_pci_probe(struct pci_dev *pdev,
298298
kfree(self->aq_hw);
299299
err_ioremap:
300300
free_netdev(ndev);
301-
err_pci_func:
302-
pci_release_regions(pdev);
303301
err_ndev:
302+
pci_release_regions(pdev);
303+
err_pci_func:
304304
pci_disable_device(pdev);
305305
return err;
306306
}

0 commit comments

Comments
 (0)