On 2/20/19 7:08 AM, Andrew Lunn wrote:
>> +static void mib_monitor(struct timer_list *t)
>> +{
>> +struct ksz_device *dev = from_timer(dev, t, mib_read_timer);
>> +const struct dsa_port *dp;
>> +struct net_device *netdev;
>> +struct ksz_port_mib *mib;
>> +struct ksz_port *p;
>>
> +static void mib_monitor(struct timer_list *t)
> +{
> + struct ksz_device *dev = from_timer(dev, t, mib_read_timer);
> + const struct dsa_port *dp;
> + struct net_device *netdev;
> + struct ksz_port_mib *mib;
> + struct ksz_port *p;
> + int i;
> +
> + mod_timer(&dev->m
From: Tristram Ha
Add background MIB counter reading support.
Port MIB counters should only be read when there is link. Otherwise it is
a waste of time as hardware never increases those counters. There are
exceptions as some switches keep track of dropped counts no matter waht.
Signed-off-by: