• Alan Stern's avatar
    USB: f_mass_storage: improve async notification handling · 78db441d
    Alan Stern authored
    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>
    78db441d
f_mass_storage.c 94.6 KB