Skip to content

Commit

Permalink
cxgb4: fix delete filter entry fail in unload path
Browse files Browse the repository at this point in the history
Currently, the hardware TID index is assumed to start from index 0.
However, with the following changeset,

commit c219399 ("cxgb4: add support for high priority filters")

hardware TID index can start after the high priority region, which
has introduced a regression resulting in remove filters entry
failure for cxgb4 unload path. This patch fix that.

Fixes: c219399 ("cxgb4: add support for high priority filters")
Signed-off-by: Shahjada Abul Husain <shahjada@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Shahjada Abul Husain authored and David S. Miller committed Mar 15, 2020
1 parent fc191af commit 46ea929
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -902,15 +902,15 @@ void clear_all_filters(struct adapter *adapter)
adapter->tids.tid_tab[i];

if (f && (f->valid || f->pending))
cxgb4_del_filter(dev, i, &f->fs);
cxgb4_del_filter(dev, f->tid, &f->fs);
}

sb = t4_read_reg(adapter, LE_DB_SRVR_START_INDEX_A);
for (i = 0; i < sb; i++) {
f = (struct filter_entry *)adapter->tids.tid_tab[i];

if (f && (f->valid || f->pending))
cxgb4_del_filter(dev, i, &f->fs);
cxgb4_del_filter(dev, f->tid, &f->fs);
}
}
}
Expand Down

0 comments on commit 46ea929

Please sign in to comment.