Thread (4 messages) 4 messages, 4 authors, 2011-11-04

Re: [PATCH] net: add calxeda xgmac ethernet driver

From: Joe Perches <joe@perches.com>
Date: 2011-10-27 03:35:52
Also in: linux-devicetree

On Wed, 2011-10-26 at 21:56 -0500, Rob Herring wrote:
Add support for the XGMAC 10Gb ethernet device in the Calxeda Highbank
SOC.
Hi Rob, just trivia:

Most of the logging dev_<level> messages
should be netdev_<level>

Adding #define pr_fmt KBUILD_MODNAME ": " fmt
before any #include would be useful to prefix
the module name to pr_<level> output.
+static int desc_get_tx_status(struct xgmac_extra_stats *x,
+			      struct xgmac_dma_desc *p, void __iomem *ioaddr)
+{
[]
+	if (status & TXDESC_JABBER_TIMEOUT) {
+		pr_debug("\tjabber_timeout error\n");
+		x->tx_jabber++;
+	}
Adding pr_fmt, the output would become:
calxeda_xgmac: 	jabber_timeout error

[]
+static void xgmac_rx_refill(struct xgmac_priv *priv)
+		dev_dbg(priv->device, "rx ring: head %d, tail %d\n",
+			priv->rx_head, priv->rx_tail);
	netdev_dbg(priv->dev, "rx ring: head %d, tail %d\n",
		   etc...)
[]
+static int xgmac_open(struct net_device *dev)
+{
[]
+	if (!is_valid_ether_addr(dev->dev_addr)) {
+		random_ether_addr(dev->dev_addr);
+		dev_dbg(priv->device, "generated random MAC address %pM\n",
+			dev->dev_addr);
		netdev_dbg(dev, "generated random MAC address %pM\n",
			   dev->dev_addr);

etc...

cheers, Joe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help