mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Al Cho <acho@novell.com>
To: gregkh@suse.de
Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org,
	yiyingc@ene.com.tw, jlee@novell.com, acho@novell.com
Subject: [PATCH] staging/keucr: fix keucr lost disconnect in transport
Date: Fri, 24 Sep 2010 18:50:11 +0800	[thread overview]
Message-ID: <1285325411-24467-1-git-send-email-acho@novell.com> (raw)

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>
---
 drivers/staging/keucr/transport.c |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/keucr/transport.c b/drivers/staging/keucr/transport.c
index 7215429..445a62c 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;
 }
-- 
1.7.1


             reply	other threads:[~2010-09-24 10:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-24 10:50 Al Cho [this message]
2010-10-19  7:31 Joey Lee

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=1285325411-24467-1-git-send-email-acho@novell.com \
    --to=acho@novell.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@suse.de \
    --cc=jlee@novell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yiyingc@ene.com.tw \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®