Hi Andrew,
Andrew Lunn <[email protected]> writes:
> When gettting the number of statistics, the strings and the actual
getting
> statistics, call the SERDES ops if implemented. This means the stats
> code needs to return the number of strings/stats they have placed into
> the data, so that the SERDES strings/stats can follow on.
> /* Return the number of strings describing statistics */
> int (*stats_get_sset_count)(struct mv88e6xxx_chip *chip);
> - void (*stats_get_strings)(struct mv88e6xxx_chip *chip, uint8_t *data);
> - void (*stats_get_stats)(struct mv88e6xxx_chip *chip, int port,
> - uint64_t *data);
> + int (*stats_get_strings)(struct mv88e6xxx_chip *chip, uint8_t *data);
> + int (*stats_get_stats)(struct mv88e6xxx_chip *chip, int port,
> + uint64_t *data);
> int (*set_cpu_port)(struct mv88e6xxx_chip *chip, int port);
> int (*set_egress_port)(struct mv88e6xxx_chip *chip, int port);
> const struct mv88e6xxx_irq_ops *watchdog_ops;
> @@ -337,6 +337,13 @@ struct mv88e6xxx_ops {
> /* Power on/off a SERDES interface */
> int (*serdes_power)(struct mv88e6xxx_chip *chip, int port, bool on);
>
> + /* Statistics from the SERDES interface */
> + int (*serdes_get_sset_count)(struct mv88e6xxx_chip *chip, int port);
> + void (*serdes_get_strings)(struct mv88e6xxx_chip *chip, int port,
> + uint8_t *data);
> + void (*serdes_get_stats)(struct mv88e6xxx_chip *chip, int port,
> + uint64_t *data);
> +
Shouldn't serdes_get_{strings,stats} be symmetrical with
stats_get_{strings,stats} and return the count as well?
Thanks,
Vivien