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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <op.vt6v2sq53l0zgt@mnazarewicz-glaptop>
Date:	Tue, 19 Apr 2011 16:33:54 +0200
From:	"Michal Nazarewicz" <mina86@...a86.com>
To:	gregkh@...e.de, "Roger Quadros" <roger.quadros@...ia.com>
Cc:	stern@...land.harvard.edu, m-sonasath@...com,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] usb: gadget: f_mass_storage: Make us pass USBCV MSC
 Compliance tests

On Tue, 19 Apr 2011 15:33:53 +0200, Roger Quadros  
<roger.quadros@...ia.com> wrote:
> @@ -2468,7 +2469,7 @@ static int fsg_set_alt(struct usb_function *f,  
> unsigned intf, unsigned alt)
>  	struct fsg_dev *fsg = fsg_from_func(f);
>  	fsg->common->new_fsg = fsg;
>  	raise_exception(fsg->common, FSG_STATE_CONFIG_CHANGE);
> -	return 0;
> +	return USB_GADGET_DELAYED_STATUS;
>  }
> static void fsg_disable(struct usb_function *f)
> @@ -2604,6 +2605,8 @@ static void handle_exception(struct fsg_common  
> *common)
> 	case FSG_STATE_CONFIG_CHANGE:
>  		do_set_interface(common, common->new_fsg);
> +		if (common->new_fsg)
> +			usb_composite_setup_continue(common->cdev);
>  		break;
> 	case FSG_STATE_EXIT:

At first I thought that it's a mismatch since USB_GADGET_DELAYED_STATUS
is returned all the time but usb_composite_setup_continue() is called
only if common->new_fsg is set but after more careful investigation
this seems to be correct.

> @@ -3083,6 +3086,7 @@ static int fsg_bind_config(struct  
> usb_composite_dev *cdev,
>  	fsg->function.disable     = fsg_disable;
> 	fsg->common               = common;
> +	fsg->common->cdev	  = cdev;
>  	/*
>  	 * Our caller holds a reference to common structure so we
>  	 * don't have to be worry about it being freed until we return

common->cdev initialisation should be moved to fsg_common_init().

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michal "mina86" Nazarewicz    (o o)
ooo +-----<email/xmpp: mnazarewicz@...gle.com>-----ooO--(_)--Ooo--
--
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