Re: [PATCH RFC 2/6] net: dsa: microchip: Add MIB counter reading support

2018-12-06 Thread Andrew Lunn
> I wonder what is the official way to clear the counters. I don't think there is one, other than unloading the driver and loading it again. Andrew

RE: [PATCH RFC 2/6] net: dsa: microchip: Add MIB counter reading support

2018-12-06 Thread Tristram.Ha
> > +static void ksz9477_r_mib_cnt(struct ksz_device *dev, int port, u16 addr, > > + u64 *cnt) > > +{ > > + u32 data; > > + int timeout; > > + struct ksz_port *p = &dev->ports[port]; > > + > > + /* retain the flush/freeze bit */ > > + data = p->freeze ? MIB_COUNTER

Re: [PATCH RFC 2/6] net: dsa: microchip: Add MIB counter reading support

2018-12-05 Thread Andrew Lunn
Hi Tristan > +static void ksz9477_r_mib_cnt(struct ksz_device *dev, int port, u16 addr, > + u64 *cnt) > +{ > + u32 data; > + int timeout; > + struct ksz_port *p = &dev->ports[port]; > + > + /* retain the flush/freeze bit */ > + data = p->freeze ? MIB_C