All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Denis Joseph Barrow <D.Barow@option.com>
Cc: Linux USB kernel mailing list <linux-usb@vger.kernel.org>,
	Linux netdev Mailing list <netdev@vger.kernel.org>
Subject: Re: [PATCH] hso for error -22 (-EINVAL) printk's
Date: Wed, 24 Sep 2008 22:10:31 -0400	[thread overview]
Message-ID: <48DAF317.4040704@garzik.org> (raw)
In-Reply-To: <48CFC7C1.6020301@option.com>

Denis Joseph Barrow wrote:
> Added check for IFF_UP in hso_resume, this should eliminate -EINVAL (-22)
> errors caused from urb's being submitted twice, once by hso_resume
> & once in hso_net_open, if suspend/resume USB power saving  mode is enabled
> Signed-off-by: Denis Joseph Barrow <D.Barow@option.com>
> ---
> Index: linux-2.6.27-rc6/drivers/net/usb/hso.c
> ===================================================================
> --- linux-2.6.27-rc6.orig/drivers/net/usb/hso.c	2008-09-16 16:17:11.000000000 +0200
> +++ linux-2.6.27-rc6/drivers/net/usb/hso.c	2008-09-16 16:32:05.000000000 +0200
> @@ -2606,18 +2606,21 @@
>  		if (network_table[i] &&
>  		    (network_table[i]->interface == iface)) {
>  			hso_net = dev2net(network_table[i]);
> -			/* First transmit any lingering data, then restart the
> -			 * device. */
> -			if (hso_net->skb_tx_buf) {
> -				dev_dbg(&iface->dev,
> -					"Transmitting lingering data\n");
> -				hso_net_start_xmit(hso_net->skb_tx_buf,
> -						   hso_net->net);
> -				hso_net->skb_tx_buf = NULL;
> +			if (hso_net->flags & IFF_UP) {
> +				/* First transmit any lingering data,
> +				   then restart the device. */
> +				if (hso_net->skb_tx_buf) {
> +					dev_dbg(&iface->dev,
> +						"Transmitting"
> +						" lingering data\n");
> +					hso_net_start_xmit(hso_net->skb_tx_buf,
> +							   hso_net->net);
> +					hso_net->skb_tx_buf = NULL;
> +				}
> +				result = hso_start_net_device(network_table[i]);
> +				if (result)
> +					goto out;

you should be checking netif_running() not IFF_UP



      reply	other threads:[~2008-09-25  2:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-16 14:50 [PATCH] hso for error -22 (-EINVAL) printk's Denis Joseph Barrow
2008-09-25  2:10 ` Jeff Garzik [this message]

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=48DAF317.4040704@garzik.org \
    --to=jeff@garzik.org \
    --cc=D.Barow@option.com \
    --cc=linux-usb@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.