Thread (53 messages) 53 messages, 9 authors, 2012-04-05

Re: [PATCH v3] Ethernet driver for the WIZnet W5300 chip

flat view

From: Joe Perches <joe@perches.com>
Date: 2012-03-24 15:53:21
Also in: lkml

On Sat, 2012-03-24 at 16:02 +0500, Mike Sinkovsky wrote:
Based on original driver from chip manufacturer, but nearly full rewite.
Tested and used in production with Blackfin BF531 embedded processor.
Hi Mike.

Just a trivial comment.  Instead of:
	if (netif_<test>(priv))
		netdev_<level>(ndev, ...)
you can use
	netif_<level>(priv, <test>, ndev, ,...)
quoted hunk ↗ jump to hunk
diff --git a/drivers/net/ethernet/wiznet/w5300.c b/drivers/net/ethernet/wiznet/w5300.c
[]
quoted hunk ↗ jump to hunk
+static irqreturn_t w5300_detect_link(int irq, void *ndev_instance)
+{
+	struct net_device *ndev = ndev_instance;
+	struct w5300_private *priv = netdev_priv(ndev);
+
+	if (netif_running(ndev)) {
+		if (gpio_get_value(priv->link_gpio) != 0) {
[]
+			if (netif_msg_link(priv))
+				netdev_info(ndev, "link is Up\n");
like:
			netif_info(priv, link, ndev, "link is up\n");
quoted hunk ↗ jump to hunk
+			netif_carrier_on(ndev);
+		} else {
+			if (netif_msg_link(priv))
+				netdev_info(ndev, "link is Down\n");
			netif_info(priv, link, ndev, "link is down\n");
quoted hunk ↗ jump to hunk
+static int w5300_stop(struct net_device *ndev)
+{
+	struct w5300_private *priv = netdev_priv(ndev);
+
+	if (netif_msg_ifdown(priv))
+		netdev_dbg(ndev, "shutting down\n");
		netif_dbg(priv, ifdown, ndev, "shutting down\n");
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help