All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@suse.de>
To: linux-usb-devel@lists.sourceforge.net
Cc: linux-kernel@vger.kernel.org, Simon Arlott <simon@fire.lp0.eu>,
	Duncan Sands <duncan.sands@math.u-psud.fr>,
	Andrew Morton <akpm@linux-foundation.org>,
	Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 7/9] USB: cxacru: ignore error trying to start ADSL in atm_start
Date: Fri,  8 Jun 2007 17:03:52 -0700	[thread overview]
Message-ID: <11813474852263-git-send-email-gregkh@suse.de> (raw)
In-Reply-To: <11813474771075-git-send-email-gregkh@suse.de>

From: Simon Arlott <simon@fire.lp0.eu>

The sysfs adsl_status attribute ignores (aside from returning -EIO to the
user) any error sending a START/STOP command to the device and there is at
least one firmware which never sends a response but appears to work
regardless.  Therefore atm_start should also continue if an error is received
so that such firmware is usable.

The official Conexant driver doesn't expect a reply either but this is for
another device (E2 router) and a commonly used firmware does respond.

Also, there is no point in changing -ECONNRESET to -ETIMEDOUT since nothing
ever checks for either of these values.

Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Cc: Duncan Sands <duncan.sands@math.u-psud.fr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/usb/atm/cxacru.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c
index 68cf582..8bcf7fe 100644
--- a/drivers/usb/atm/cxacru.c
+++ b/drivers/usb/atm/cxacru.c
@@ -476,8 +476,6 @@ static int cxacru_start_wait_urb(struct urb *urb, struct completion *done,
 	add_timer(&timer);
 	wait_for_completion(done);
 	status = urb->status;
-	if (status == -ECONNRESET)
-		status = -ETIMEDOUT;
 	del_timer_sync(&timer);
 
 	if (actual_length)
@@ -671,11 +669,8 @@ static int cxacru_atm_start(struct usbatm_data *usbatm_instance,
 	/* start ADSL */
 	mutex_lock(&instance->adsl_state_serialize);
 	ret = cxacru_cm(instance, CM_REQUEST_CHIP_ADSL_LINE_START, NULL, 0, NULL, 0);
-	if (ret < 0) {
+	if (ret < 0)
 		atm_err(usbatm_instance, "cxacru_atm_start: CHIP_ADSL_LINE_START returned %d\n", ret);
-		mutex_unlock(&instance->adsl_state_serialize);
-		return ret;
-	}
 
 	/* Start status polling */
 	mutex_lock(&instance->poll_state_serialize);
-- 
1.5.2.1


  reply	other threads:[~2007-06-09  0:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-09  0:03 [GIT PATCH] USB fixes for 2.6.22-rc4 Greg KH
2007-06-09  0:03 ` [PATCH 1/9] USB: set default y for CONFIG_USB_DEVICE_CLASS Greg Kroah-Hartman
2007-06-09  0:03   ` [PATCH 2/9] usblp: Don't let suspend to kill ->used Greg Kroah-Hartman
2007-06-09  0:03     ` [PATCH 3/9] USB: usb gadgets avoid le{16,32}_to_cpup() Greg Kroah-Hartman
2007-06-09  0:03       ` [PATCH 4/9] USB: UNUSUAL_DEV: Sync up some reported devices from Ubuntu Greg Kroah-Hartman
2007-06-09  0:03         ` [PATCH 5/9] USB: cxacru: add Documentation file Greg Kroah-Hartman
2007-06-09  0:03           ` [PATCH 6/9] USB: cxacru: create sysfs attributes in atm_start instead of bind Greg Kroah-Hartman
2007-06-09  0:03             ` Greg Kroah-Hartman [this message]
2007-06-09  0:03               ` [PATCH 8/9] USB: Fix up bogus bInterval values in endpoint descriptors Greg Kroah-Hartman
2007-06-09  0:03                 ` [PATCH 9/9] OHCI: Fix machine check in ohci_hub_status_data Greg Kroah-Hartman

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=11813474852263-git-send-email-gregkh@suse.de \
    --to=gregkh@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=duncan.sands@math.u-psud.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=simon@fire.lp0.eu \
    /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.