diff options
author | Andrew Lunn <andrew@lunn.ch> | 2018-03-28 23:50:28 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-29 21:04:22 +0200 |
commit | 65f60e4582bd321f4df1433a22f717f18e60f721 (patch) | |
tree | 9f2577306ba82031773faea60ffc8381c1ebc47a /drivers/net/dsa/mv88e6xxx/global1_vtu.c | |
parent | sctp: fix unused lable warning (diff) | |
download | linux-65f60e4582bd321f4df1433a22f717f18e60f721.tar.xz linux-65f60e4582bd321f4df1433a22f717f18e60f721.zip |
net: dsa: mv88e6xxx: Keep ATU/VTU violation statistics
Count the numbers of various ATU and VTU violation statistics and
return them as part of the ethtool -S statistics.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx/global1_vtu.c')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/global1_vtu.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/global1_vtu.c b/drivers/net/dsa/mv88e6xxx/global1_vtu.c index 7997961647de..2cbaf946e7ed 100644 --- a/drivers/net/dsa/mv88e6xxx/global1_vtu.c +++ b/drivers/net/dsa/mv88e6xxx/global1_vtu.c @@ -539,18 +539,20 @@ static irqreturn_t mv88e6xxx_g1_vtu_prob_irq_thread_fn(int irq, void *dev_id) if (err) goto out; - mutex_unlock(&chip->reg_lock); - spid = val & MV88E6XXX_G1_VTU_OP_SPID_MASK; if (val & MV88E6XXX_G1_VTU_OP_MEMBER_VIOLATION) { dev_err_ratelimited(chip->dev, "VTU member violation for vid %d, source port %d\n", entry.vid, spid); + chip->ports[spid].vtu_member_violation++; } - if (val & MV88E6XXX_G1_VTU_OP_MISS_VIOLATION) + if (val & MV88E6XXX_G1_VTU_OP_MISS_VIOLATION) { dev_err_ratelimited(chip->dev, "VTU miss violation for vid %d, source port %d\n", entry.vid, spid); + chip->ports[spid].vtu_miss_violation++; + } + mutex_unlock(&chip->reg_lock); return IRQ_HANDLED; |