lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <4CBDE4170200002300022431@novprvlin0050.provo.novell.com>
Date:	Tue, 19 Oct 2010 01:31:51 -0600
From:	"Joey Lee" <jlee@...ell.com>
To:	"Al Cho" <ACho@...ell.com>
Cc:	<devel@...verdev.osuosl.org>, <yiyingc@....com.tw>,
	<gregkh@...e.de>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] staging/keucr: fix keucr lost disconnect in
 transport

Hi Al, 

於 五,2010-09-24 於 18:50 +0800,Al Cho 提到:
> 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@...ell.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;
>  }

This patch works to me on MSI netbook.

Signed-off-by: Lee, Chun-Yi <jlee@...ell.com>


Thank's
Joey Lee

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ