1. 02 6月, 2017 1 次提交
  2. 17 5月, 2017 10 次提交
  3. 16 5月, 2017 2 次提交
    • A
      USB: f_mass_storage: improve memory barriers and synchronization · 225785ae
      Alan Stern 提交于
      This patch reworks the way f_mass_storage.c handles memory barriers
      and synchronization:
      
      	The driver now uses a wait_queue instead of doing its own
      	task-state manipulations (even though only one task will ever
      	use the wait_queue).
      
      	The thread_wakeup_needed variable is removed.  It was only a
      	source of trouble; although it was what the driver tested to
      	see whether it should wake up, what we really wanted to see
      	was whether a USB transfer had completed.
      
      	All the explicit memory barriers scattered throughout the
      	driver are replaced by a few calls to smp_load_acquire() and
      	smp_store_release().
      
      	The inreq_busy and outreq_busy fields are removed.  In their
      	place, the driver keeps track of the current I/O direction by
      	splitting BUF_STATE_BUSY into two states: BUF_STATE_SENDING
      	and BUF_STATE_RECEIVING.
      
      	The buffer states are no longer protected by a lock.  Mutual
      	exclusion isn't needed; the state is changed only by the
      	driver's main thread when it owns the buffer, and only by the
      	request completion routine when the gadget core owns the buffer.
      
      	The do_write() and throw_away_data() routines were reorganized
      	to make efficient use of the new sleeping mechanism.  This
      	resulted in the removal of one indentation level in those
      	routines, making the patch appear to be more more complicated
      	than it really is.
      
      	In a few places, the driver allowed itself to be frozen although
      	it really shouldn't have (in the middle of executing a SCSI
      	command).  Those places have been fixed.
      
      	The logic in the exception handler for aborting transfers and
      	waiting for them to stop has been simplified.
      Tested-by: NThinh Nguyen <thinhn@synopsys.com>
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      225785ae
    • A
      USB: f_mass_storage: improve async notification handling · 78db441d
      Alan Stern 提交于
      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: NThinh Nguyen <thinhn@synopsys.com>
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      78db441d
  4. 27 4月, 2017 1 次提交
    • A
      usb: host: xhci: remove #ifdef around PM functions · d852ed98
      Arnd Bergmann 提交于
      The #ifdef is slightly wrong as it doesn't cover the xhci_priv_resume_quirk()
      function, causing a harmless warning:
      
      drivers/usb/host/xhci-plat.c:58:12: error: 'xhci_priv_resume_quirk' defined but not used [-Werror=unused-function]
       static int xhci_priv_resume_quirk(struct usb_hcd *hcd)
      
      A simpler way to do this correctly is to use __maybe_unused annotations
      that let the compiler silently drop the functions when there is no
      reference.
      
      Fixes: b0c69b4b ("usb: host: plat: Enable xHCI plat runtime PM")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d852ed98
  5. 26 4月, 2017 4 次提交
  6. 20 4月, 2017 8 次提交
  7. 19 4月, 2017 2 次提交
  8. 18 4月, 2017 6 次提交
  9. 14 4月, 2017 1 次提交
    • P
      usb: chipidea: core: add sysfs group · a932a804
      Peter Chen 提交于
      Sometimes, the user needs to adjust some properties for controllers, eg
      the role for controller, we add sysfs group for them.
      
      The attribute 'role' is used to switch host/gadget role dynamically, the
      uewr can read the current role, and write the other role compare to
      current one to finish the switch.
      Signed-off-by: NPeter Chen <peter.chen@nxp.com>
      a932a804
  10. 12 4月, 2017 2 次提交
  11. 11 4月, 2017 3 次提交