summaryrefslogtreecommitdiffstats
path: root/drivers/net/cassini.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/cassini.c')
-rw-r--r--drivers/net/cassini.c31
1 files changed, 4 insertions, 27 deletions
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c
index 04a03f7003a0..d6b6d6aa565a 100644
--- a/drivers/net/cassini.c
+++ b/drivers/net/cassini.c
@@ -107,12 +107,7 @@
#define cas_page_unmap(x) kunmap_atomic((x), KM_SKB_DATA_SOFTIRQ)
#define CAS_NCPUS num_online_cpus()
-#ifdef CONFIG_CASSINI_NAPI
-#define USE_NAPI
-#define cas_skb_release(x) netif_receive_skb(x)
-#else
#define cas_skb_release(x) netif_rx(x)
-#endif
/* select which firmware to use */
#define USE_HP_WORKAROUND
@@ -424,7 +419,7 @@ static u16 cas_phy_read(struct cas *cp, int reg)
udelay(10);
cmd = readl(cp->regs + REG_MIF_FRAME);
if (cmd & MIF_FRAME_TURN_AROUND_LSB)
- return (cmd & MIF_FRAME_DATA_MASK);
+ return cmd & MIF_FRAME_DATA_MASK;
}
return 0xFFFF; /* -1 */
}
@@ -809,7 +804,7 @@ static int cas_reset_mii_phy(struct cas *cp)
break;
udelay(10);
}
- return (limit <= 0);
+ return limit <= 0;
}
static int cas_saturn_firmware_init(struct cas *cp)
@@ -2154,7 +2149,7 @@ end_copy_pkt:
skb->csum = csum_unfold(~csum);
skb->ip_summed = CHECKSUM_COMPLETE;
} else
- skb->ip_summed = CHECKSUM_NONE;
+ skb_checksum_none_assert(skb);
return len;
}
@@ -3063,9 +3058,6 @@ static void cas_init_mac(struct cas *cp)
{
unsigned char *e = &cp->dev->dev_addr[0];
int i;
-#ifdef CONFIG_CASSINI_MULTICAST_REG_WRITE
- u32 rxcfg;
-#endif
cas_mac_reset(cp);
/* setup core arbitration weight register */
@@ -3133,23 +3125,8 @@ static void cas_init_mac(struct cas *cp)
writel(0xc200, cp->regs + REG_MAC_ADDRN(43));
writel(0x0180, cp->regs + REG_MAC_ADDRN(44));
-#ifndef CONFIG_CASSINI_MULTICAST_REG_WRITE
cp->mac_rx_cfg = cas_setup_multicast(cp);
-#else
- /* WTZ: Do what Adrian did in cas_set_multicast. Doing
- * a writel does not seem to be necessary because Cassini
- * seems to preserve the configuration when we do the reset.
- * If the chip is in trouble, though, it is not clear if we
- * can really count on this behavior. cas_set_multicast uses
- * spin_lock_irqsave, but we are called only in cas_init_hw and
- * cas_init_hw is protected by cas_lock_all, which calls
- * spin_lock_irq (so it doesn't need to save the flags, and
- * we should be OK for the writel, as that is the only
- * difference).
- */
- cp->mac_rx_cfg = rxcfg = cas_setup_multicast(cp);
- writel(rxcfg, cp->regs + REG_MAC_RX_CFG);
-#endif
+
spin_lock(&cp->stat_lock[N_TX_RINGS]);
cas_clear_mac_err(cp);
spin_unlock(&cp->stat_lock[N_TX_RINGS]);