Skip to content

Commit 879c380

Browse files
committed
Merge branch 'net-aquantia-fixes-on-vlan-filters-and-other-conditions'
Igor Russkikh says: ==================== net: aquantia: fixes on vlan filters and other conditions Here is a set of various bug fixes related to vlan filter offload and two other rare cases. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 154f4fb + be6cef6 commit 879c380

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,8 @@ int aq_del_fvlan_by_vlan(struct aq_nic_s *aq_nic, u16 vlan_id)
431431
if (be16_to_cpu(rule->aq_fsp.h_ext.vlan_tci) == vlan_id)
432432
break;
433433
}
434-
if (rule && be16_to_cpu(rule->aq_fsp.h_ext.vlan_tci) == vlan_id) {
434+
if (rule && rule->type == aq_rx_filter_vlan &&
435+
be16_to_cpu(rule->aq_fsp.h_ext.vlan_tci) == vlan_id) {
435436
struct ethtool_rxnfc cmd;
436437

437438
cmd.fs.location = rule->aq_fsp.location;
@@ -843,7 +844,7 @@ int aq_filters_vlans_update(struct aq_nic_s *aq_nic)
843844
return err;
844845

845846
if (aq_nic->ndev->features & NETIF_F_HW_VLAN_CTAG_FILTER) {
846-
if (hweight < AQ_VLAN_MAX_FILTERS && hweight > 0) {
847+
if (hweight <= AQ_VLAN_MAX_FILTERS && hweight > 0) {
847848
err = aq_hw_ops->hw_filter_vlan_ctrl(aq_hw,
848849
!(aq_nic->packet_filter & IFF_PROMISC));
849850
aq_nic->aq_nic_cfg.is_vlan_force_promisc = false;

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ static int aq_ndev_open(struct net_device *ndev)
6161
if (err < 0)
6262
goto err_exit;
6363

64+
err = aq_filters_vlans_update(aq_nic);
65+
if (err < 0)
66+
goto err_exit;
67+
6468
err = aq_nic_start(aq_nic);
6569
if (err < 0)
6670
goto err_exit;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ int aq_nic_start(struct aq_nic_s *self)
393393
self->aq_nic_cfg.link_irq_vec);
394394
err = request_threaded_irq(irqvec, NULL,
395395
aq_linkstate_threaded_isr,
396-
IRQF_SHARED,
396+
IRQF_SHARED | IRQF_ONESHOT,
397397
self->ndev->name, self);
398398
if (err < 0)
399399
goto err_exit;

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ static int aq_vec_poll(struct napi_struct *napi, int budget)
8686
}
8787
}
8888

89+
err_exit:
8990
if (!was_tx_cleaned)
9091
work_done = budget;
9192

@@ -95,7 +96,7 @@ static int aq_vec_poll(struct napi_struct *napi, int budget)
9596
1U << self->aq_ring_param.vec_idx);
9697
}
9798
}
98-
err_exit:
99+
99100
return work_done;
100101
}
101102

0 commit comments

Comments
 (0)