Commit fd209e35 authored by Simon Arlott's avatar Simon Arlott Committed by Greg Kroah-Hartman

USB: cxacru: ignore error trying to start ADSL in atm_start

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: default avatarSimon Arlott <simon@fire.lp0.eu>
Cc: Duncan Sands <duncan.sands@math.u-psud.fr>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent da1f82b5
...@@ -476,8 +476,6 @@ static int cxacru_start_wait_urb(struct urb *urb, struct completion *done, ...@@ -476,8 +476,6 @@ static int cxacru_start_wait_urb(struct urb *urb, struct completion *done,
add_timer(&timer); add_timer(&timer);
wait_for_completion(done); wait_for_completion(done);
status = urb->status; status = urb->status;
if (status == -ECONNRESET)
status = -ETIMEDOUT;
del_timer_sync(&timer); del_timer_sync(&timer);
if (actual_length) if (actual_length)
...@@ -671,11 +669,8 @@ static int cxacru_atm_start(struct usbatm_data *usbatm_instance, ...@@ -671,11 +669,8 @@ static int cxacru_atm_start(struct usbatm_data *usbatm_instance,
/* start ADSL */ /* start ADSL */
mutex_lock(&instance->adsl_state_serialize); mutex_lock(&instance->adsl_state_serialize);
ret = cxacru_cm(instance, CM_REQUEST_CHIP_ADSL_LINE_START, NULL, 0, NULL, 0); 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); 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 */ /* Start status polling */
mutex_lock(&instance->poll_state_serialize); mutex_lock(&instance->poll_state_serialize);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment