File tree Expand file tree Collapse file tree 3 files changed +14
-10
lines changed
drivers/net/ethernet/aquantia/atlantic Expand file tree Collapse file tree 3 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ void aq_nic_cfg_start(struct aq_nic_s *self)
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 ;
@@ -246,6 +247,8 @@ void aq_nic_ndev_init(struct aq_nic_s *self)
246
247
247
248
self -> ndev -> hw_features |= aq_hw_caps -> hw_features ;
248
249
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 ;
249
252
self -> ndev -> priv_flags = aq_hw_caps -> hw_priv_flags ;
250
253
self -> ndev -> priv_flags |= IFF_LIVE_ADDR_CHANGE ;
251
254
Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ struct aq_nic_s {
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 )
Original file line number Diff line number Diff line change @@ -267,16 +267,16 @@ static int aq_pci_probe(struct pci_dev *pdev,
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 );
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 ;
278
277
}
279
278
#endif
279
+ self -> irqvecs = numvecs ;
280
280
281
281
/* net device init */
282
282
aq_nic_cfg_start (self );
@@ -298,9 +298,9 @@ static int aq_pci_probe(struct pci_dev *pdev,
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
}
You can’t perform that action at this time.
0 commit comments