diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-14 10:37:28 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-14 10:37:28 -0700 |
commit | d7e9660ad9d5e0845f52848bce31bcf5cdcdea6b (patch) | |
tree | c6c67d145771187b194d79d603742b31090a59d6 /drivers/net/tokenring | |
parent | b8cb48aae1b8c50b37dcb7710363aa69a7a0d9ca (diff) | |
parent | 13af7a6ea502fcdd4c0e3d7de6e332b102309491 (diff) |
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: (1623 commits)
netxen: update copyright
netxen: fix tx timeout recovery
netxen: fix file firmware leak
netxen: improve pci memory access
netxen: change firmware write size
tg3: Fix return ring size breakage
netxen: build fix for INET=n
cdc-phonet: autoconfigure Phonet address
Phonet: back-end for autoconfigured addresses
Phonet: fix netlink address dump error handling
ipv6: Add IFA_F_DADFAILED flag
net: Add DEVTYPE support for Ethernet based devices
mv643xx_eth.c: remove unused txq_set_wrr()
ucc_geth: Fix hangs after switching from full to half duplex
ucc_geth: Rearrange some code to avoid forward declarations
phy/marvell: Make non-aneg speed/duplex forcing work for 88E1111 PHYs
drivers/net/phy: introduce missing kfree
drivers/net/wan: introduce missing kfree
net: force bridge module(s) to be GPL
Subject: [PATCH] appletalk: Fix skb leak when ipddp interface is not loaded
...
Fixed up trivial conflicts:
- arch/x86/include/asm/socket.h
converted to <asm-generic/socket.h> in the x86 tree. The generic
header has the same new #define's, so that works out fine.
- drivers/net/tun.c
fix conflict between 89f56d1e9 ("tun: reuse struct sock fields") that
switched over to using 'tun->socket.sk' instead of the redundantly
available (and thus removed) 'tun->sk', and 2b980dbd ("lsm: Add hooks
to the TUN driver") which added a new 'tun->sk' use.
Noted in 'next' by Stephen Rothwell.
Diffstat (limited to 'drivers/net/tokenring')
-rw-r--r-- | drivers/net/tokenring/3c359.c | 6 | ||||
-rw-r--r-- | drivers/net/tokenring/ibmtr.c | 8 | ||||
-rw-r--r-- | drivers/net/tokenring/lanstreamer.c | 8 | ||||
-rw-r--r-- | drivers/net/tokenring/olympic.c | 8 | ||||
-rw-r--r-- | drivers/net/tokenring/smctr.c | 44 | ||||
-rw-r--r-- | drivers/net/tokenring/tms380tr.c | 21 |
6 files changed, 45 insertions, 50 deletions
diff --git a/drivers/net/tokenring/3c359.c b/drivers/net/tokenring/3c359.c index b40b6de2d08..724158966ec 100644 --- a/drivers/net/tokenring/3c359.c +++ b/drivers/net/tokenring/3c359.c @@ -128,7 +128,7 @@ static int xl_init(struct net_device *dev); static int xl_open(struct net_device *dev); static int xl_open_hw(struct net_device *dev) ; static int xl_hw_reset(struct net_device *dev); -static int xl_xmit(struct sk_buff *skb, struct net_device *dev); +static netdev_tx_t xl_xmit(struct sk_buff *skb, struct net_device *dev); static void xl_dn_comp(struct net_device *dev); static int xl_close(struct net_device *dev); static void xl_set_rx_mode(struct net_device *dev); @@ -1193,7 +1193,7 @@ static irqreturn_t xl_interrupt(int irq, void *dev_id) * Tx - Polling configuration */ -static int xl_xmit(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t xl_xmit(struct sk_buff *skb, struct net_device *dev) { struct xl_private *xl_priv=netdev_priv(dev); struct xl_tx_desc *txd ; @@ -1240,7 +1240,7 @@ static int xl_xmit(struct sk_buff *skb, struct net_device *dev) spin_unlock_irqrestore(&xl_priv->xl_lock,flags) ; - return 0; + return NETDEV_TX_OK; } else { spin_unlock_irqrestore(&xl_priv->xl_lock,flags) ; return NETDEV_TX_BUSY; diff --git a/drivers/net/tokenring/ibmtr.c b/drivers/net/tokenring/ibmtr.c index 08a6c41c159..525bbc5b9c9 100644 --- a/drivers/net/tokenring/ibmtr.c +++ b/drivers/net/tokenring/ibmtr.c @@ -191,7 +191,8 @@ static int tok_init_card(struct net_device *dev); static void tok_open_adapter(unsigned long dev_addr); static void open_sap(unsigned char type, struct net_device *dev); static void tok_set_multicast_list(struct net_device *dev); -static int tok_send_packet(struct sk_buff *skb, struct net_device *dev); +static netdev_tx_t tok_send_packet(struct sk_buff *skb, + struct net_device *dev); static int tok_close(struct net_device *dev); static irqreturn_t tok_interrupt(int irq, void *dev_id); static void initial_tok_int(struct net_device *dev); @@ -1022,7 +1023,8 @@ static void tok_set_multicast_list(struct net_device *dev) #define STATION_ID_OFST 4 -static int tok_send_packet(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t tok_send_packet(struct sk_buff *skb, + struct net_device *dev) { struct tok_info *ti; unsigned long flags; @@ -1041,7 +1043,7 @@ static int tok_send_packet(struct sk_buff *skb, struct net_device *dev) writeb(CMD_IN_SRB, ti->mmio + ACA_OFFSET + ACA_SET + ISRA_ODD); spin_unlock_irqrestore(&(ti->lock), flags); dev->trans_start = jiffies; - return 0; + return NETDEV_TX_OK; } /*****************************************************************************/ diff --git a/drivers/net/tokenring/lanstreamer.c b/drivers/net/tokenring/lanstreamer.c index b3715efdce5..26dca2b2bdb 100644 --- a/drivers/net/tokenring/lanstreamer.c +++ b/drivers/net/tokenring/lanstreamer.c @@ -203,7 +203,8 @@ static int streamer_ioctl(struct net_device *, struct ifreq *, int); static int streamer_reset(struct net_device *dev); static int streamer_open(struct net_device *dev); -static int streamer_xmit(struct sk_buff *skb, struct net_device *dev); +static netdev_tx_t streamer_xmit(struct sk_buff *skb, + struct net_device *dev); static int streamer_close(struct net_device *dev); static void streamer_set_rx_mode(struct net_device *dev); static irqreturn_t streamer_interrupt(int irq, void *dev_id); @@ -1141,7 +1142,8 @@ static irqreturn_t streamer_interrupt(int irq, void *dev_id) return IRQ_HANDLED; } -static int streamer_xmit(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t streamer_xmit(struct sk_buff *skb, + struct net_device *dev) { struct streamer_private *streamer_priv = netdev_priv(dev); @@ -1183,7 +1185,7 @@ static int streamer_xmit(struct sk_buff *skb, struct net_device *dev) streamer_priv->tx_ring_free = (streamer_priv->tx_ring_free + 1) & (STREAMER_TX_RING_SIZE - 1); spin_unlock_irqrestore(&streamer_priv->streamer_lock,flags); - return 0; + return NETDEV_TX_OK; } else { netif_stop_queue(dev); spin_unlock_irqrestore(&streamer_priv->streamer_lock,flags); diff --git a/drivers/net/tokenring/olympic.c b/drivers/net/tokenring/olympic.c index 451b54136ed..d9ec7f0bbd0 100644 --- a/drivers/net/tokenring/olympic.c +++ b/drivers/net/tokenring/olympic.c @@ -182,7 +182,8 @@ MODULE_DEVICE_TABLE(pci,olympic_pci_tbl) ; static int olympic_probe(struct pci_dev *pdev, const struct pci_device_id *ent); static int olympic_init(struct net_device *dev); static int olympic_open(struct net_device *dev); -static int olympic_xmit(struct sk_buff *skb, struct net_device *dev); +static netdev_tx_t olympic_xmit(struct sk_buff *skb, + struct net_device *dev); static int olympic_close(struct net_device *dev); static void olympic_set_rx_mode(struct net_device *dev); static void olympic_freemem(struct net_device *dev) ; @@ -1030,7 +1031,8 @@ static irqreturn_t olympic_interrupt(int irq, void *dev_id) return IRQ_HANDLED; } -static int olympic_xmit(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t olympic_xmit(struct sk_buff *skb, + struct net_device *dev) { struct olympic_private *olympic_priv=netdev_priv(dev); u8 __iomem *olympic_mmio=olympic_priv->olympic_mmio; @@ -1052,7 +1054,7 @@ static int olympic_xmit(struct sk_buff *skb, struct net_device *dev) writew((((readw(olympic_mmio+TXENQ_1)) & 0x8000) ^ 0x8000) | 1,olympic_mmio+TXENQ_1); netif_wake_queue(dev); spin_unlock_irqrestore(&olympic_priv->olympic_lock,flags); - return 0; + return NETDEV_TX_OK; } else { spin_unlock_irqrestore(&olympic_priv->olympic_lock,flags); return NETDEV_TX_BUSY; diff --git a/drivers/net/tokenring/smctr.c b/drivers/net/tokenring/smctr.c index 54ad4ed0337..ebda61bc4c2 100644 --- a/drivers/net/tokenring/smctr.c +++ b/drivers/net/tokenring/smctr.c @@ -234,7 +234,8 @@ static int smctr_rx_frame(struct net_device *dev); /* S */ static int smctr_send_dat(struct net_device *dev); -static int smctr_send_packet(struct sk_buff *skb, struct net_device *dev); +static netdev_tx_t smctr_send_packet(struct sk_buff *skb, + struct net_device *dev); static int smctr_send_lobe_media_test(struct net_device *dev); static int smctr_send_rpt_addr(struct net_device *dev, MAC_HEADER *rmf, __u16 correlator); @@ -3091,11 +3092,7 @@ static int smctr_lobe_media_test(struct net_device *dev) /* Setup the lobe media test. */ smctr_lobe_media_test_cmd(dev); if(smctr_wait_cmd(dev)) - { - smctr_reset_adapter(dev); - tp->status = CLOSED; - return (LOBE_MEDIA_TEST_FAILED); - } + goto err; /* Tx lobe media test frames. */ for(i = 0; i < 1500; ++i) @@ -3103,20 +3100,12 @@ static int smctr_lobe_media_test(struct net_device *dev) if(smctr_send_lobe_media_test(dev)) { if(perror) - { - smctr_reset_adapter(dev); - tp->state = CLOSED; - return (LOBE_MEDIA_TEST_FAILED); - } + goto err; else { perror = 1; if(smctr_lobe_media_test_cmd(dev)) - { - smctr_reset_adapter(dev); - tp->state = CLOSED; - return (LOBE_MEDIA_TEST_FAILED); - } + goto err; } } } @@ -3124,28 +3113,24 @@ static int smctr_lobe_media_test(struct net_device *dev) if(smctr_send_dat(dev)) { if(smctr_send_dat(dev)) - { - smctr_reset_adapter(dev); - tp->state = CLOSED; - return (LOBE_MEDIA_TEST_FAILED); - } + goto err; } /* Check if any frames received during test. */ if((tp->rx_fcb_curr[MAC_QUEUE]->frame_status) || (tp->rx_fcb_curr[NON_MAC_QUEUE]->frame_status)) - { - smctr_reset_adapter(dev); - tp->state = CLOSED; - return (LOBE_MEDIA_TEST_FAILED); - } + goto err; /* Set receive mask to "Promisc" mode. */ tp->receive_mask = saved_rcv_mask; smctr_chg_rx_mask(dev); - return (0); + return 0; +err: + smctr_reset_adapter(dev); + tp->status = CLOSED; + return LOBE_MEDIA_TEST_FAILED; } static int smctr_lobe_media_test_cmd(struct net_device *dev) @@ -4587,7 +4572,8 @@ static void smctr_timeout(struct net_device *dev) /* * Gets skb from system, queues it and checks if it can be sent */ -static int smctr_send_packet(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t smctr_send_packet(struct sk_buff *skb, + struct net_device *dev) { struct net_local *tp = netdev_priv(dev); @@ -4609,7 +4595,7 @@ static int smctr_send_packet(struct sk_buff *skb, struct net_device *dev) if(tp->QueueSkb > 0) netif_wake_queue(dev); - return (0); + return NETDEV_TX_OK; } static int smctr_send_lobe_media_test(struct net_device *dev) diff --git a/drivers/net/tokenring/tms380tr.c b/drivers/net/tokenring/tms380tr.c index a2eab72b507..a7b6888829b 100644 --- a/drivers/net/tokenring/tms380tr.c +++ b/drivers/net/tokenring/tms380tr.c @@ -144,8 +144,8 @@ static void tms380tr_exec_sifcmd(struct net_device *dev, unsigned int WriteValu /* "G" */ static struct net_device_stats *tms380tr_get_stats(struct net_device *dev); /* "H" */ -static int tms380tr_hardware_send_packet(struct sk_buff *skb, - struct net_device *dev); +static netdev_tx_t tms380tr_hardware_send_packet(struct sk_buff *skb, + struct net_device *dev); /* "I" */ static int tms380tr_init_adapter(struct net_device *dev); static void tms380tr_init_ipb(struct net_local *tp); @@ -165,7 +165,8 @@ static int tms380tr_reset_adapter(struct net_device *dev); static void tms380tr_reset_interrupt(struct net_device *dev); static void tms380tr_ring_status_irq(struct net_device *dev); /* "S" */ -static int tms380tr_send_packet(struct sk_buff *skb, struct net_device *dev); +static netdev_tx_t tms380tr_send_packet(struct sk_buff *skb, + struct net_device *dev); static void tms380tr_set_multicast_list(struct net_device *dev); static int tms380tr_set_mac_address(struct net_device *dev, void *addr); /* "T" */ @@ -599,21 +600,23 @@ static void tms380tr_timeout(struct net_device *dev) /* * Gets skb from system, queues it and checks if it can be sent */ -static int tms380tr_send_packet(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t tms380tr_send_packet(struct sk_buff *skb, + struct net_device *dev) { struct net_local *tp = netdev_priv(dev); - int err; + netdev_tx_t rc; - err = tms380tr_hardware_send_packet(skb, dev); + rc = tms380tr_hardware_send_packet(skb, dev); if(tp->TplFree->NextTPLPtr->BusyFlag) netif_stop_queue(dev); - return (err); + return rc; } /* * Move frames into adapter tx queue */ -static int tms380tr_hardware_send_packet(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t tms380tr_hardware_send_packet(struct sk_buff *skb, + struct net_device *dev) { TPL *tpl; short length; @@ -682,7 +685,7 @@ static int tms380tr_hardware_send_packet(struct sk_buff *skb, struct net_device tms380tr_exec_sifcmd(dev, CMD_TX_VALID); spin_unlock_irqrestore(&tp->lock, flags); - return 0; + return NETDEV_TX_OK; } /* |