* [PATCH] ipw2200: Fix NETDEV_TX_BUSY erroneous returned
@ 2006-01-04 4:09 Zhu Yi
2006-01-04 17:58 ` Stephen Hemminger
2006-01-04 23:52 ` Francois Romieu
0 siblings, 2 replies; 3+ messages in thread
From: Zhu Yi @ 2006-01-04 4:09 UTC (permalink / raw)
To: Andrew Morton; +Cc: jketreno, jgarzik, linux-kernel
This patch fixes the warning below warning for the ipw2200 driver.
NETDEV_TX_BUSY returned; driver should report queue full via
ieee_device->is_queue_full.
Signed-off-by: Hong Liu <hong.liu@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
--
diff -urp linux.orig/drivers/net/wireless/ipw2200.c linux/drivers/net/wireless/ipw2200.c
--- linux.orig/drivers/net/wireless/ipw2200.c 2005-10-21 05:35:24.000000000 +0800
+++ linux/drivers/net/wireless/ipw2200.c 2005-10-25 13:22:38.000000000
+0800
@@ -9649,11 +9649,6 @@ static inline int ipw_tx_skb(struct ipw_
u16 remaining_bytes;
int fc;
- /* If there isn't room in the queue, we return busy and let the
- * network stack requeue the packet for us */
- if (ipw_queue_space(q) < q->high_mark)
- return NETDEV_TX_BUSY;
-
switch (priv->ieee->iw_mode) {
case IW_MODE_ADHOC:
hdr_len = IEEE80211_3ADDR_LEN;
@@ -9871,7 +9866,7 @@ static int ipw_net_hard_start_xmit(struc
fail_unlock:
spin_unlock_irqrestore(&priv->lock, flags);
- return 1;
+ return -1;
}
static struct net_device_stats *ipw_net_get_stats(struct net_device *dev)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ipw2200: Fix NETDEV_TX_BUSY erroneous returned
2006-01-04 4:09 [PATCH] ipw2200: Fix NETDEV_TX_BUSY erroneous returned Zhu Yi
@ 2006-01-04 17:58 ` Stephen Hemminger
2006-01-04 23:52 ` Francois Romieu
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2006-01-04 17:58 UTC (permalink / raw)
To: linux-kernel
On Wed, 4 Jan 2006 12:09:54 +0800
Zhu Yi <yi.zhu@intel.com> wrote:
>
> This patch fixes the warning below warning for the ipw2200 driver.
>
> NETDEV_TX_BUSY returned; driver should report queue full via
> ieee_device->is_queue_full.
>
> Signed-off-by: Hong Liu <hong.liu@intel.com>
> Signed-off-by: Zhu Yi <yi.zhu@intel.com>
> --
>
> diff -urp linux.orig/drivers/net/wireless/ipw2200.c linux/drivers/net/wireless/ipw2200.c
> --- linux.orig/drivers/net/wireless/ipw2200.c 2005-10-21 05:35:24.000000000 +0800
> +++ linux/drivers/net/wireless/ipw2200.c 2005-10-25 13:22:38.000000000
> +0800
> @@ -9649,11 +9649,6 @@ static inline int ipw_tx_skb(struct ipw_
> u16 remaining_bytes;
> int fc;
>
> - /* If there isn't room in the queue, we return busy and let the
> - * network stack requeue the packet for us */
> - if (ipw_queue_space(q) < q->high_mark)
> - return NETDEV_TX_BUSY;
> -
> switch (priv->ieee->iw_mode) {
> case IW_MODE_ADHOC:
> hdr_len = IEEE80211_3ADDR_LEN;
> @@ -9871,7 +9866,7 @@ static int ipw_net_hard_start_xmit(struc
>
> fail_unlock:
> spin_unlock_irqrestore(&priv->lock, flags);
> - return 1;
> + return -1;
That's not right... -1 is NETDEV_TX_LOCKED, which is not what you want.
Also, please use NETDEV_TX_ values for return values from transmit routine.
You should post this to netdev@vger.kernel.org and ipw2100-devel@lists.sourceforge.net
for discussion there.
--
Stephen Hemminger <shemminger@osdl.org>
OSDL http://developer.osdl.org/~shemminger
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ipw2200: Fix NETDEV_TX_BUSY erroneous returned
2006-01-04 4:09 [PATCH] ipw2200: Fix NETDEV_TX_BUSY erroneous returned Zhu Yi
2006-01-04 17:58 ` Stephen Hemminger
@ 2006-01-04 23:52 ` Francois Romieu
1 sibling, 0 replies; 3+ messages in thread
From: Francois Romieu @ 2006-01-04 23:52 UTC (permalink / raw)
To: Zhu Yi; +Cc: Andrew Morton, jketreno, jgarzik, linux-kernel, netdev
Zhu Yi <yi.zhu@intel.com> :
>
> This patch fixes the warning below warning for the ipw2200 driver.
>
> NETDEV_TX_BUSY returned; driver should report queue full via
> ieee_device->is_queue_full.
Beyond what was said by Stephen Hemminger, the driver reports a
NETDEV_TX_BUSY when !STATUS_ASSOCIATED: neither this patch nor mine
fix it.
Btw the patch that I posted earlier forgets to protect against
every undue wake-up through:
ipw_rx
-> ipw_rx_notification
-> priv->link_up (work_queue)
-> ipw_bg_link_up
-> ipw_link_up
It will need some extra care to correctly play the
netif_{stop/wake}_queue dance.
--
Ueimor
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-01-04 23:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-04 4:09 [PATCH] ipw2200: Fix NETDEV_TX_BUSY erroneous returned Zhu Yi
2006-01-04 17:58 ` Stephen Hemminger
2006-01-04 23:52 ` Francois Romieu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox