Re: [PATCH 1/4] net, phy: am79c874 support
From: Anatolij Gustschin <agust@denx.de>
Date: 2012-03-18 21:22:29
Hello Heiko, some comments below. On Wed, 22 Jun 2011 09:55:08 +0200 Heiko Schocher [off-list ref] wrote: ...
quoted hunk ↗ jump to hunk
diff --git a/drivers/net/phy/amd79.c b/drivers/net/phy/amd79.c new file mode 100644 index 0000000..914d696 --- /dev/null +++ b/drivers/net/phy/amd79.c
...
+#include <linux/kernel.h> +#include <linux/string.h> +#include <linux/errno.h> +#include <linux/unistd.h> +#include <linux/interrupt.h> +#include <linux/init.h> +#include <linux/io.h> +#include <linux/delay.h> +#include <linux/netdevice.h> +#include <linux/etherdevice.h> +#include <linux/skbuff.h> +#include <linux/spinlock.h> +#include <linux/mm.h> +#include <linux/module.h> +#include <linux/mii.h> +#include <linux/ethtool.h> +#include <linux/phy.h> +#include <linux/uaccess.h> + +#include <asm/irq.h>
We should remove not needed headers here. ...
+static int amd79_config_intr(struct phy_device *phydev)
+{
+ int err;
+
+ if (phydev->interrupts == PHY_INTERRUPT_ENABLED)
+ err = phy_write(phydev, MII_AMD79_IR_EN_LINK,
+ MII_AMD79_IR_EN_LINK);
+ else
+ err = phy_write(phydev, MII_AMD79_IR_EN_LINK, 0);Here is an issue, we should write to the interrupt control/status register, so the 2nd argument of phy_write() should be MII_AMD79_IR. I've fixed this and resubmitted your patch to the netdev list. Thanks, Anatolij