1. 13 Jun, 2017 8 commits
  2. 02 Jun, 2017 15 commits
  3. 17 May, 2017 10 commits
  4. 16 May, 2017 2 commits
    • Alan Stern's avatar
      USB: f_mass_storage: improve memory barriers and synchronization · 225785ae
      Alan Stern authored
      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: 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>
      225785ae
    • 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
  5. 13 May, 2017 5 commits
    • Linus Torvalds's avatar
      Linux 4.12-rc1 · 2ea659a9
      Linus Torvalds authored
      2ea659a9
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · cd636458
      Linus Torvalds authored
      Pull some more input subsystem updates from Dmitry Torokhov:
       "An updated xpad driver with a few more recognized device IDs, and a
        new psxpad-spi driver, allowing connecting Playstation 1 and 2 joypads
        via SPI bus"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: cros_ec_keyb - remove extraneous 'const'
        Input: add support for PlayStation 1/2 joypads connected via SPI
        Input: xpad - add USB IDs for Mad Catz Brawlstick and Razer Sabertooth
        Input: xpad - sync supported devices with xboxdrv
        Input: xpad - sort supported devices by USB ID
      cd636458
    • Linus Torvalds's avatar
      Merge tag 'upstream-4.12-rc1' of git://git.infradead.org/linux-ubifs · b53c4d5e
      Linus Torvalds authored
      Pull UBI/UBIFS updates from Richard Weinberger:
      
       - new config option CONFIG_UBIFS_FS_SECURITY
      
       - minor improvements
      
       - random fixes
      
      * tag 'upstream-4.12-rc1' of git://git.infradead.org/linux-ubifs:
        ubi: Add debugfs file for tracking PEB state
        ubifs: Fix a typo in comment of ioctl2ubifs & ubifs2ioctl
        ubifs: Remove unnecessary assignment
        ubifs: Fix cut and paste error on sb type comparisons
        ubi: fastmap: Fix slab corruption
        ubifs: Add CONFIG_UBIFS_FS_SECURITY to disable/enable security labels
        ubi: Make mtd parameter readable
        ubi: Fix section mismatch
      b53c4d5e
    • Linus Torvalds's avatar
      Merge branch 'for-linus-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml · ec059019
      Linus Torvalds authored
      Pull UML fixes from Richard Weinberger:
       "No new stuff, just fixes"
      
      * 'for-linus-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
        um: Add missing NR_CPUS include
        um: Fix to call read_initrd after init_bootmem
        um: Include kbuild.h instead of duplicating its macros
        um: Fix PTRACE_POKEUSER on x86_64
        um: Set number of CPUs
        um: Fix _print_addr()
      ec059019
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · 1251704a
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton:
       "15 fixes"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        mm, docs: update memory.stat description with workingset* entries
        mm: vmscan: scan until it finds eligible pages
        mm, thp: copying user pages must schedule on collapse
        dax: fix PMD data corruption when fault races with write
        dax: fix data corruption when fault races with write
        ext4: return to starting transaction in ext4_dax_huge_fault()
        mm: fix data corruption due to stale mmap reads
        dax: prevent invalidation of mapped DAX entries
        Tigran has moved
        mm, vmalloc: fix vmalloc users tracking properly
        mm/khugepaged: add missed tracepoint for collapse_huge_page_swapin
        gcov: support GCC 7.1
        mm, vmstat: Remove spurious WARN() during zoneinfo print
        time: delete current_fs_time()
        hwpoison, memcg: forcibly uncharge LRU pages
      1251704a