summaryrefslogtreecommitdiff
path: root/drivers/staging/keucr
diff options
context:
space:
mode:
authorAl Cho <acho@novell.com>2010-09-24 14:50:11 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-09-30 15:33:26 +0400
commite10496041bd8ef75772d6adbbd7029ca023dc66e (patch)
treefce27e2d2f37d4b40a92be0fbd613c8273a4b644 /drivers/staging/keucr
parent53059aa05988761a738fa8bc082bbf3c5d4462d1 (diff)
downloadlinux-e10496041bd8ef75772d6adbbd7029ca023dc66e.tar.xz
staging: keucr: fix keucr lost disconnect in transport
The other part of keucr lost usb disconnect. Unplug SDcard after thread scan,the wrong rule in usb_stor_port_reset, so the driver still fail in stress test. Signed-off-by: Al Cho <acho@novell.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/keucr')
-rw-r--r--drivers/staging/keucr/transport.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/staging/keucr/transport.c b/drivers/staging/keucr/transport.c
index 7215429759bc..445a62ce6931 100644
--- a/drivers/staging/keucr/transport.c
+++ b/drivers/staging/keucr/transport.c
@@ -763,24 +763,19 @@ int usb_stor_port_reset(struct us_data *us)
int result, rc_lock;
//printk("transport --- usb_stor_port_reset\n");
- result = rc_lock = usb_lock_device_for_reset(us->pusb_dev, us->pusb_intf);
+ result = usb_lock_device_for_reset(us->pusb_dev, us->pusb_intf);
if (result < 0)
printk("unable to lock device for reset: %d\n", result);
- else
- {
+ else {
/* Were we disconnected while waiting for the lock? */
- if (test_bit(US_FLIDX_DISCONNECTING, &us->dflags))
- {
+ if (test_bit(US_FLIDX_DISCONNECTING, &us->dflags)) {
result = -EIO;
//printk("No reset during disconnect\n");
- }
- else
- {
+ } else {
result = usb_reset_device(us->pusb_dev);
//printk("usb_reset_composite_device returns %d\n", result);
}
- if (rc_lock)
- usb_unlock_device(us->pusb_dev);
+ usb_unlock_device(us->pusb_dev);
}
return result;
}