lkml.org 
[lkml]   [2012]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3] lpc32xx: Added ethernet driver
From
Date
On Mon, 2012-02-27 at 18:42 +0100, Roland Stigge wrote:
> This patch adds an ethernet driver for the LPC32xx ARM SoC.

This looks nicer to me, thanks.
Just a few more trivial comments.

[]
> +++ linux-2.6/drivers/net/ethernet/nxp/lpc_eth.c
[]
> +static int lpc_mdio_read(struct mii_bus *bus, int phy_id, int phyreg)
> +{
> + struct netdata_local *pldat = bus->priv;
> + unsigned long timeout = jiffies + ((HZ * 100) / 1000); /* 100mS */

msecs_to_jiffies?

> +static void __lpc_handle_xmit(struct net_device *ndev)
> +{
[]
> + /* Any errors occurred? */
> + if (txstat & 0x80000000) {
> + if (txstat & 0x20000000) {

It might be clearer to use #defines

> + /* FIFO underrun */
> + ndev->stats.tx_fifo_errors++;
> + ndev->stats.tx_errors++;
> + }
> + if (txstat & 0x10000000) {
> + /* Late collision */
> + ndev->stats.tx_aborted_errors++;
> + ndev->stats.tx_errors++;

double counting tx_errors?




\
 
 \ /
  Last update: 2012-02-27 18:59    [W:0.047 / U:2.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site