[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20120306.162017.761246743182346842.davem@davemloft.net>
Date: Tue, 06 Mar 2012 16:20:17 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: stigge@...com.de
Cc: jeffrey.t.kirsher@...el.com, alexander.h.duyck@...el.com,
eilong@...adcom.com, ian.campbell@...rix.com,
netdev@...r.kernel.org, w.sang@...gutronix.de,
linux-kernel@...r.kernel.org, kevin.wells@....com,
linux-arm-kernel@...ts.infradead.org, arnd@...db.de,
baruch@...s.co.il, joe@...ches.com
Subject: Re: [PATCH v5] lpc32xx: Added ethernet driver
From: Roland Stigge <stigge@...com.de>
Date: Tue, 6 Mar 2012 22:01:04 +0100
> +#define RXSTATUS_STATUS_ERROR \
> + (RXSTATUS_NODESC | RXSTATUS_OVERRUN | RXSTATUS_ALIGN | RXSTATUS_RANGE \
> + | RXSTATUS_LENGTH | RXSTATUS_SYMBOL | RXSTATUS_CRC)
Should be:
#define RXSTATUS_STATUS_ERROR \
(RXSTATUS_NODESC | RXSTATUS_OVERRUN | RXSTATUS_ALIGN | RXSTATUS_RANGE | \
RXSTATUS_LENGTH | RXSTATUS_SYMBOL | RXSTATUS_CRC)
> +static int lpc_eth_hard_start_xmit(struct sk_buff *skb,
> + struct net_device *ndev);
Should be:
static int lpc_eth_hard_start_xmit(struct sk_buff *skb,
struct net_device *ndev);
> +struct txrx_desc_t {
> + u32 packet;
> + u32 control;
> +};
> +struct rx_status_t {
> + u32 statusinfo;
> + u32 statushashcrc;
> +};
What is the endianness of these descriptors? Based upon the answer to
that question use __be32 or __le32 instead of u32.
> +static void __lpc_eth_clock_enable(struct netdata_local *pldat,
> + int enable)
Should be:
static void __lpc_eth_clock_enable(struct netdata_local *pldat,
int enable)
And you should also use "bool" for enable and pass in true/false
at the call sites.
> + writel((LPC_MACINT_RXDONEINTEN | LPC_MACINT_TXDONEINTEN),
> + LPC_ENET_INTENABLE(regbase));
Should be:
writel((LPC_MACINT_RXDONEINTEN | LPC_MACINT_TXDONEINTEN),
LPC_ENET_INTENABLE(regbase));
> + /* Setup base addresses in hardware to point to buffers and
> + descriptors */
Should be:
/* Setup base addresses in hardware to point to buffers and
* descriptors.
*/
> + writel((ENET_TX_DESC - 1),
> + LPC_ENET_TXDESCRIPTORNUMBER(pldat->net_base));
All of these writel() calls are improperly indented on the second and
any subsequent lines just like the one I pointed out above, fix them
all.
> +MODULE_LICENSE("GPL");
> +
Tailing empty line in this file, please remove.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists