On Jul 13, 2004, at 22:22, Jeff Garzik wrote:
Andy Fleming wrote:
Ok, I've got the new PHY code working, and I've done most of the
changes, but I have a couple more questions:
Ok, the first argument should be dev, but what should the second
argument be? This isn't a PCI device, it's
an on-chip peripheral, so I'm not sure what the class_device should
6) sysfs support: call SET_NETDEV_DEV()
It's a struct device, which all devices need to have.
I could have sworn OCP does struct device these days. If not, poke
the platform people.
Ah, I found it. ocpdev->dev. Done.
Hmm... I tried that, but netif_receive_skb() will eventually call
local_bh_enable(), which dislikes my disabling interrupts. I could
avoid this by unlocking around netif_receive_skb(), but this solution
seems ugly to me. What is the preferred way of doing this?
19) I think your gfar_poll() needs spin_lock_irqsave(), not
Duh. I had a brainfart.
RX "synchronization" is normally done by simply ensuring that no other
code will cause a NAPI poll. You shouldn't need spinlocks around that
section of code at all. Take a look at drivers/net/tg3.c, tg3_rx()
Ok. I will send a new patch tomorrow.