netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, David Brownell <dbrownell@users.sourceforge.net>
Subject: [PATCH 06/19] usbnet: convert to netdev_tx_t
Date: Mon, 31 Aug 2009 22:50:45 -0700	[thread overview]
Message-ID: <20090901055128.980638707@vyatta.com> (raw)
In-Reply-To: 20090901055039.824876937@vyatta.com

[-- Attachment #1: usb-tx.patch --]
[-- Type: text/plain, Size: 6161 bytes --]

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>


---
 drivers/net/usb/catc.c       |    3 ++-
 drivers/net/usb/cdc-phonet.c |    6 +++---
 drivers/net/usb/hso.c        |    3 ++-
 drivers/net/usb/kaweth.c     |    3 ++-
 drivers/net/usb/pegasus.c    |    3 ++-
 drivers/net/usb/rtl8150.c    |    3 ++-
 drivers/net/usb/usbnet.c     |    8 ++++----
 drivers/usb/gadget/u_ether.c |    3 ++-
 include/linux/usb/usbnet.h   |    3 ++-
 9 files changed, 21 insertions(+), 14 deletions(-)

--- a/drivers/net/usb/catc.c	2009-08-31 16:17:53.251107228 -0700
+++ b/drivers/net/usb/catc.c	2009-08-31 16:26:12.571081682 -0700
@@ -411,7 +411,8 @@ static void catc_tx_done(struct urb *urb
 	spin_unlock_irqrestore(&catc->tx_lock, flags);
 }
 
-static int catc_start_xmit(struct sk_buff *skb, struct net_device *netdev)
+static netdev_tx_t catc_start_xmit(struct sk_buff *skb,
+					 struct net_device *netdev)
 {
 	struct catc *catc = netdev_priv(netdev);
 	unsigned long flags;
--- a/drivers/net/usb/cdc-phonet.c	2009-08-31 16:17:53.231091626 -0700
+++ b/drivers/net/usb/cdc-phonet.c	2009-08-31 16:26:12.571081682 -0700
@@ -55,7 +55,7 @@ static void rx_complete(struct urb *req)
 /*
  * Network device callbacks
  */
-static int usbpn_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t usbpn_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct usbpn_dev *pnd = netdev_priv(dev);
 	struct urb *req = NULL;
@@ -82,12 +82,12 @@ static int usbpn_xmit(struct sk_buff *sk
 	if (pnd->tx_queue >= dev->tx_queue_len)
 		netif_stop_queue(dev);
 	spin_unlock_irqrestore(&pnd->tx_lock, flags);
-	return 0;
+	return NETDEV_TX_OK;
 
 drop:
 	dev_kfree_skb(skb);
 	dev->stats.tx_dropped++;
-	return 0;
+	return NETDEV_TX_OK;
 }
 
 static void tx_complete(struct urb *req)
--- a/drivers/net/usb/hso.c	2009-08-31 16:17:53.241081443 -0700
+++ b/drivers/net/usb/hso.c	2009-08-31 16:26:12.571081682 -0700
@@ -771,7 +771,8 @@ static void write_bulk_callback(struct u
 }
 
 /* called by kernel when we need to transmit a packet */
-static int hso_net_start_xmit(struct sk_buff *skb, struct net_device *net)
+static netdev_tx_t hso_net_start_xmit(struct sk_buff *skb,
+					    struct net_device *net)
 {
 	struct hso_net *odev = netdev_priv(net);
 	int result;
--- a/drivers/net/usb/kaweth.c	2009-08-31 16:17:53.241081443 -0700
+++ b/drivers/net/usb/kaweth.c	2009-08-31 16:26:12.571081682 -0700
@@ -803,7 +803,8 @@ static void kaweth_usb_transmit_complete
 /****************************************************************
  *     kaweth_start_xmit
  ****************************************************************/
-static int kaweth_start_xmit(struct sk_buff *skb, struct net_device *net)
+static netdev_tx_t kaweth_start_xmit(struct sk_buff *skb,
+					   struct net_device *net)
 {
 	struct kaweth_device *kaweth = netdev_priv(net);
 	__le16 *private_header;
--- a/drivers/net/usb/pegasus.c	2009-08-31 16:17:53.251107228 -0700
+++ b/drivers/net/usb/pegasus.c	2009-08-31 16:26:12.571081682 -0700
@@ -876,7 +876,8 @@ static void pegasus_tx_timeout(struct ne
 	pegasus->stats.tx_errors++;
 }
 
-static int pegasus_start_xmit(struct sk_buff *skb, struct net_device *net)
+static netdev_tx_t pegasus_start_xmit(struct sk_buff *skb,
+					    struct net_device *net)
 {
 	pegasus_t *pegasus = netdev_priv(net);
 	int count = ((skb->len + 2) & 0x3f) ? skb->len + 2 : skb->len + 3;
--- a/drivers/net/usb/rtl8150.c	2009-08-31 16:17:53.261106055 -0700
+++ b/drivers/net/usb/rtl8150.c	2009-08-31 16:26:12.571081682 -0700
@@ -727,7 +727,8 @@ static void rtl8150_set_multicast(struct
 	netif_wake_queue(netdev);
 }
 
-static int rtl8150_start_xmit(struct sk_buff *skb, struct net_device *netdev)
+static netdev_tx_t rtl8150_start_xmit(struct sk_buff *skb,
+					    struct net_device *netdev)
 {
 	rtl8150_t *dev = netdev_priv(netdev);
 	int count, res;
--- a/drivers/net/usb/usbnet.c	2009-08-31 16:17:53.241081443 -0700
+++ b/drivers/net/usb/usbnet.c	2009-08-31 16:26:12.571081682 -0700
@@ -1007,15 +1007,16 @@ EXPORT_SYMBOL_GPL(usbnet_tx_timeout);
 
 /*-------------------------------------------------------------------------*/
 
-int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net)
+netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
+				     struct net_device *net)
 {
 	struct usbnet		*dev = netdev_priv(net);
 	int			length;
-	int			retval = NET_XMIT_SUCCESS;
 	struct urb		*urb = NULL;
 	struct skb_data		*entry;
 	struct driver_info	*info = dev->driver_info;
 	unsigned long		flags;
+	int retval;
 
 	// some devices want funky USB-level framing, for
 	// win32 driver (usually) and/or hardware quirks
@@ -1079,7 +1080,6 @@ int usbnet_start_xmit (struct sk_buff *s
 		if (netif_msg_tx_err (dev))
 			devdbg (dev, "drop, code %d", retval);
 drop:
-		retval = NET_XMIT_SUCCESS;
 		dev->net->stats.tx_dropped++;
 		if (skb)
 			dev_kfree_skb_any (skb);
@@ -1088,7 +1088,7 @@ drop:
 		devdbg (dev, "> tx, len %d, type 0x%x",
 			length, skb->protocol);
 	}
-	return retval;
+	return NETDEV_TX_OK;
 }
 EXPORT_SYMBOL_GPL(usbnet_start_xmit);
 
--- a/include/linux/usb/usbnet.h	2009-08-31 16:17:53.281109296 -0700
+++ b/include/linux/usb/usbnet.h	2009-08-31 16:26:53.171108362 -0700
@@ -182,7 +182,8 @@ struct skb_data {	/* skb->cb is one of t
 
 extern int usbnet_open (struct net_device *net);
 extern int usbnet_stop (struct net_device *net);
-extern int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net);
+extern netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
+				      struct net_device *net);
 extern void usbnet_tx_timeout (struct net_device *net);
 extern int usbnet_change_mtu (struct net_device *net, int new_mtu);
 
--- a/drivers/usb/gadget/u_ether.c	2009-08-31 16:17:53.271081695 -0700
+++ b/drivers/usb/gadget/u_ether.c	2009-08-31 16:26:12.571081682 -0700
@@ -465,7 +465,8 @@ static inline int is_promisc(u16 cdc_fil
 	return cdc_filter & USB_CDC_PACKET_TYPE_PROMISCUOUS;
 }
 
-static int eth_start_xmit(struct sk_buff *skb, struct net_device *net)
+static netdev_tx_t eth_start_xmit(struct sk_buff *skb,
+					struct net_device *net)
 {
 	struct eth_dev		*dev = netdev_priv(net);
 	int			length = skb->len;

-- 


  parent reply	other threads:[~2009-09-01  5:58 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-01  5:50 [PATCH 00/19] net_tx_t: network device transmit return value change Stephen Hemminger
2009-09-01  5:50 ` [PATCH 01/19] netdev: change transmit to limited range type Stephen Hemminger
2009-09-01  7:39   ` Eric Dumazet
2009-09-01  8:18     ` David Miller
2009-09-01  5:50 ` [PATCH 02/19] netdev: convert pseudo-devices to netdev_tx_t Stephen Hemminger
2009-09-01  5:50 ` [PATCH 03/19] convert ATM drivers " Stephen Hemminger
2009-09-01  5:50 ` [PATCH 04/19] convert hamradio drivers to netdev_txreturnt_t Stephen Hemminger
2009-09-01 15:30   ` Thomas Sailer
2009-09-01  5:50 ` [PATCH 05/19] isdn: convert to netdev_tx_t Stephen Hemminger
2009-09-01  5:50 ` Stephen Hemminger [this message]
2009-09-01  5:50 ` [PATCH 07/19] tokenring: " Stephen Hemminger
2009-09-01  5:50 ` [PATCH 08/19] wan: convert drivers " Stephen Hemminger
2009-09-01  5:50 ` [PATCH 09/19] hdlc: convert " Stephen Hemminger
2009-09-01  5:50 ` [PATCH 10/19] netdev: convert pcmcia drivers " Stephen Hemminger
2009-09-01  5:50 ` [PATCH 11/19] irda: convert " Stephen Hemminger
2009-09-01  5:50 ` [PATCH 12/19] netdev: convert pseudo drivers " Stephen Hemminger
2009-09-01  5:50 ` [PATCH 13/19] uwb: convert " Stephen Hemminger
     [not found]   ` <20090901055129.729527950-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
2009-09-14 10:47     ` David Vrabel
2009-09-01  5:50 ` [PATCH 14/19] tulip: convert drivers " Stephen Hemminger
2009-09-02  5:48   ` Grant Grundler
2009-09-02  6:04     ` Stephen Hemminger
2009-09-02  6:08     ` Grant Grundler
2009-09-01  5:50 ` [PATCH 15/19] 3com: " Stephen Hemminger
2009-09-01  5:50 ` [PATCH 16/19] intel: " Stephen Hemminger
2009-09-02  1:03   ` Jeff Kirsher
2009-09-01  5:50 ` [PATCH 17/19] appletalk: " Stephen Hemminger
2009-09-01  5:50 ` [PATCH 18/19] wireless: " Stephen Hemminger
     [not found]   ` <20090901055130.266010870-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
2009-09-01 13:18     ` John W. Linville
2009-09-01  5:50 ` [PATCH 19/19] netdev: convert bulk of " Stephen Hemminger
2009-09-01 16:21   ` David Dillow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090901055128.980638707@vyatta.com \
    --to=shemminger@vyatta.com \
    --cc=davem@davemloft.net \
    --cc=dbrownell@users.sourceforge.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).