Domen's MPC5200 FEC cleanup patch.

Domen Puncer domen.puncer at telargo.com
Mon Sep 17 15:33:14 EST 2007


On 16/09/07 15:05 -0400, Jon Smirl wrote:
> This adjustment to the error counting is in the Efika patches and not
> in yours, should it be in yours too?

I know about this patch.

Error counting is reworked in newer anyway (mixing rmon and ieee
counters didn't look very nice to me).


	Domen

> 
> --- a/drivers/net/fec_mpc52xx/fec.c 2007-05-30 16:04:50.000000000 +0200
> +++ b/drivers/net/fec_mpc52xx/fec.c 2007-05-30 16:09:02.000000000 +0200
> @@ -411,7 +411,9 @@
> 
>  	stats->rx_bytes = in_be32(&fec->rmon_r_octets);
>  	stats->rx_packets = in_be32(&fec->rmon_r_packets);
> -	stats->rx_errors = stats->rx_packets - in_be32(&fec->ieee_r_frame_ok);
> +	stats->rx_errors = stats->rx_packets - (
> +			in_be32(&fec->ieee_r_frame_ok) +
> +			in_be32(&fec->rmon_r_mc_pkt));
>  	stats->tx_bytes = in_be32(&fec->rmon_t_octets);
>  	stats->tx_packets = in_be32(&fec->rmon_t_packets);
>  	stats->tx_errors = stats->tx_packets - (
> 
> -- 
> Jon Smirl
> jonsmirl at gmail.com


More information about the Linuxppc-embedded mailing list