diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-23 11:47:02 -0700 | 
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-23 11:47:02 -0700 | 
| commit | 5f05647dd81c11a6a165ccc8f0c1370b16f3bcb0 (patch) | |
| tree | 7851ef1c93aa1aba7ef327ca4b75fd35e6d10f29 /drivers/net/cpmac.c | |
| parent | 02f36038c568111ad4fc433f6fa760ff5e38fab4 (diff) | |
| parent | ec37a48d1d16c30b655ac5280209edf52a6775d4 (diff) | |
| download | olio-linux-3.10-5f05647dd81c11a6a165ccc8f0c1370b16f3bcb0.tar.xz olio-linux-3.10-5f05647dd81c11a6a165ccc8f0c1370b16f3bcb0.zip  | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1699 commits)
  bnx2/bnx2x: Unsupported Ethtool operations should return -EINVAL.
  vlan: Calling vlan_hwaccel_do_receive() is always valid.
  tproxy: use the interface primary IP address as a default value for --on-ip
  tproxy: added IPv6 support to the socket match
  cxgb3: function namespace cleanup
  tproxy: added IPv6 support to the TPROXY target
  tproxy: added IPv6 socket lookup function to nf_tproxy_core
  be2net: Changes to use only priority codes allowed by f/w
  tproxy: allow non-local binds of IPv6 sockets if IP_TRANSPARENT is enabled
  tproxy: added tproxy sockopt interface in the IPV6 layer
  tproxy: added udp6_lib_lookup function
  tproxy: added const specifiers to udp lookup functions
  tproxy: split off ipv6 defragmentation to a separate module
  l2tp: small cleanup
  nf_nat: restrict ICMP translation for embedded header
  can: mcp251x: fix generation of error frames
  can: mcp251x: fix endless loop in interrupt handler if CANINTF_MERRF is set
  can-raw: add msg_flags to distinguish local traffic
  9p: client code cleanup
  rds: make local functions/variables static
  ...
Fix up conflicts in net/core/dev.c, drivers/net/pcmcia/smc91c92_cs.c and
drivers/net/wireless/ath/ath9k/debug.c as per David
Diffstat (limited to 'drivers/net/cpmac.c')
| -rw-r--r-- | drivers/net/cpmac.c | 39 | 
1 files changed, 23 insertions, 16 deletions
diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c index e1f6156b371..fec939f8f65 100644 --- a/drivers/net/cpmac.c +++ b/drivers/net/cpmac.c @@ -38,7 +38,7 @@  #include <linux/platform_device.h>  #include <linux/dma-mapping.h>  #include <linux/clk.h> -#include <asm/gpio.h> +#include <linux/gpio.h>  #include <asm/atomic.h>  MODULE_AUTHOR("Eugene Konev <ejka@imfi.kspu.ru>"); @@ -108,7 +108,7 @@ MODULE_PARM_DESC(dumb_switch, "Assume switch is not connected to MDIO bus");  #define CPMAC_RX_INT_CLEAR		0x019c  #define CPMAC_MAC_INT_ENABLE		0x01a8  #define CPMAC_MAC_INT_CLEAR		0x01ac -#define CPMAC_MAC_ADDR_LO(channel) 	(0x01b0 + (channel) * 4) +#define CPMAC_MAC_ADDR_LO(channel)	(0x01b0 + (channel) * 4)  #define CPMAC_MAC_ADDR_MID		0x01d0  #define CPMAC_MAC_ADDR_HI		0x01d4  #define CPMAC_MAC_HASH_LO		0x01d8 @@ -227,7 +227,7 @@ static void cpmac_dump_regs(struct net_device *dev)  	for (i = 0; i < CPMAC_REG_END; i += 4) {  		if (i % 16 == 0) {  			if (i) -				printk("\n"); +				pr_cont("\n");  			printk(KERN_DEBUG "%s: reg[%p]:", dev->name,  			       priv->regs + i);  		} @@ -262,7 +262,7 @@ static void cpmac_dump_skb(struct net_device *dev, struct sk_buff *skb)  	for (i = 0; i < skb->len; i++) {  		if (i % 16 == 0) {  			if (i) -				printk("\n"); +				pr_cont("\n");  			printk(KERN_DEBUG "%s: data[%p]:", dev->name,  			       skb->data + i);  		} @@ -391,7 +391,7 @@ static struct sk_buff *cpmac_rx_one(struct cpmac_priv *priv,  	if (likely(skb)) {  		skb_put(desc->skb, desc->datalen);  		desc->skb->protocol = eth_type_trans(desc->skb, priv->dev); -		desc->skb->ip_summed = CHECKSUM_NONE; +		skb_checksum_none_assert(desc->skb);  		priv->dev->stats.rx_packets++;  		priv->dev->stats.rx_bytes += desc->datalen;  		result = desc->skb; @@ -506,7 +506,7 @@ static int cpmac_poll(struct napi_struct *napi, int budget)  					"restart rx from a descriptor that's "  					"not free: %p\n",  					priv->dev->name, restart); -				goto fatal_error; +			goto fatal_error;  		}  		cpmac_write(priv->regs, CPMAC_RX_PTR(0), restart->mapping); @@ -873,7 +873,8 @@ static int cpmac_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)  	return -EINVAL;  } -static void cpmac_get_ringparam(struct net_device *dev, struct ethtool_ringparam* ring) +static void cpmac_get_ringparam(struct net_device *dev, +						struct ethtool_ringparam *ring)  {  	struct cpmac_priv *priv = netdev_priv(dev); @@ -888,7 +889,8 @@ static void cpmac_get_ringparam(struct net_device *dev, struct ethtool_ringparam  	ring->tx_pending = 1;  } -static int cpmac_set_ringparam(struct net_device *dev, struct ethtool_ringparam* ring) +static int cpmac_set_ringparam(struct net_device *dev, +						struct ethtool_ringparam *ring)  {  	struct cpmac_priv *priv = netdev_priv(dev); @@ -1012,8 +1014,8 @@ static int cpmac_open(struct net_device *dev)  	priv->rx_head->prev->hw_next = (u32)0; -	if ((res = request_irq(dev->irq, cpmac_irq, IRQF_SHARED, -			       dev->name, dev))) { +	res = request_irq(dev->irq, cpmac_irq, IRQF_SHARED, dev->name, dev); +	if (res) {  		if (netif_msg_drv(priv))  			printk(KERN_ERR "%s: failed to obtain irq\n",  			       dev->name); @@ -1133,7 +1135,8 @@ static int __devinit cpmac_probe(struct platform_device *pdev)  	}  	if (phy_id == PHY_MAX_ADDR) { -		dev_err(&pdev->dev, "no PHY present, falling back to switch on MDIO bus 0\n"); +		dev_err(&pdev->dev, "no PHY present, falling back " +					"to switch on MDIO bus 0\n");  		strncpy(mdio_bus_id, "0", MII_BUS_ID_SIZE); /* fixed phys bus */  		phy_id = pdev->id;  	} @@ -1169,9 +1172,10 @@ static int __devinit cpmac_probe(struct platform_device *pdev)  	priv->msg_enable = netif_msg_init(debug_level, 0xff);  	memcpy(dev->dev_addr, pdata->dev_addr, sizeof(pdata->dev_addr)); -	snprintf(priv->phy_name, MII_BUS_ID_SIZE, PHY_ID_FMT, mdio_bus_id, phy_id); +	snprintf(priv->phy_name, MII_BUS_ID_SIZE, PHY_ID_FMT, +						mdio_bus_id, phy_id); -	priv->phy = phy_connect(dev, priv->phy_name, &cpmac_adjust_link, 0, +	priv->phy = phy_connect(dev, priv->phy_name, cpmac_adjust_link, 0,  						PHY_INTERFACE_MODE_MII);  	if (IS_ERR(priv->phy)) { @@ -1182,7 +1186,8 @@ static int __devinit cpmac_probe(struct platform_device *pdev)  		goto fail;  	} -	if ((rc = register_netdev(dev))) { +	rc = register_netdev(dev); +	if (rc) {  		printk(KERN_ERR "cpmac: error %i registering device %s\n", rc,  		       dev->name);  		goto fail; @@ -1248,11 +1253,13 @@ int __devinit cpmac_init(void)  	cpmac_mii->reset(cpmac_mii); -	for (i = 0; i < 300; i++) -		if ((mask = cpmac_read(cpmac_mii->priv, CPMAC_MDIO_ALIVE))) +	for (i = 0; i < 300; i++) { +		mask = cpmac_read(cpmac_mii->priv, CPMAC_MDIO_ALIVE); +		if (mask)  			break;  		else  			msleep(10); +	}  	mask &= 0x7fffffff;  	if (mask & (mask - 1)) {  |