Skip to content
Commit 78db441d authored by Alan Stern's avatar Alan Stern Committed by Felipe Balbi
Browse files

USB: f_mass_storage: improve async notification handling



This patch makes several adjustments to the way f_mass_storage.c
handles its internal state and asynchronous notifications (AKA
exceptions):

	A number of states weren't being used for anything.
	They are removed.

	The FSG_STATE_IDLE state was renamed to FSG_STATE_NORMAL,
	because it now applies whenever the gadget is operating
	normally, not just when the gadget is idle.

	The FSG_STATE_RESET state was renamed to
	FSG_STATE_PROTOCOL_RESET, indicating that it represents a
	Bulk-Only Transport protocol reset and not a general USB
	reset.

	When a signal arrives, it's silly for the signal handler to
	send itself another signal!  Now it takes care of everything
	inline.

Along with an assortment of other minor changes in the same category.

Tested-by: default avatarThinh Nguyen <thinhn@synopsys.com>
Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 2ea659a9
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