{
int i;
struct cpmac_priv *priv = netdev_priv(dev);
+
for (i = 0; i < CPMAC_REG_END; i += 4) {
if (i % 16 == 0) {
if (i)
static void cpmac_dump_desc(struct net_device *dev, struct cpmac_desc *desc)
{
int i;
+
netdev_dbg(dev, "desc[%p]:", desc);
for (i = 0; i < sizeof(*desc) / 4; i++)
pr_debug(" %08x", ((u32 *)desc)[i]);
{
struct cpmac_priv *priv = netdev_priv(dev);
struct cpmac_desc *dump = priv->rx_head;
+
do {
cpmac_dump_desc(dev, dump);
dump = dump->next;
static void cpmac_dump_skb(struct net_device *dev, struct sk_buff *skb)
{
int i;
+
netdev_dbg(dev, "skb 0x%p, len=%d\n", skb, skb->len);
for (i = 0; i < skb->len; i++) {
if (i % 16 == 0) {
struct cpmac_priv *priv = netdev_priv(dev);
struct cpmac_desc *desc;
int i;
+
if (unlikely(!priv->rx_head))
return;
desc = priv->rx_head;
{
struct cpmac_priv *priv = netdev_priv(dev);
int i;
+
if (unlikely(!priv->desc_ring))
return;
for (i = 0; i < CPMAC_QUEUES; i++) {
static int cpmac_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{
struct cpmac_priv *priv = netdev_priv(dev);
+
if (!(netif_running(dev)))
return -EINVAL;
if (!priv->phy)
static int cpmac_remove(struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(pdev);
+
unregister_netdev(dev);
free_netdev(dev);
return 0;