1. 11 Feb, 2014 1 commit
    • Greg Kroah-Hartman's avatar
      Merge tag 'for-usb-linus-2014-02-11' of... · 2991942f
      Greg Kroah-Hartman authored
      Merge tag 'for-usb-linus-2014-02-11' of git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-linus
      
      Sarah writes:
      
      xhci: Revert TD fragment hacks.
      
      Hi Greg,
      
      Recently, we found that commit "35773dac "usb: xhci: Link TRB must not
      occur within a USB payload burst" causes a userspace regression.  It will
      cause larger transfers submitted through usbfs that would have succeeded
      on older kernels to be rejected.
      
      Commit 35773dac was designed to address an issue where an ASIX USB
      ethernet device would get wedged when it was connected to a 1.0 xHCI
      host.  Only this particular ethernet device was impacted, because only the
      ax88179_178a driver implemented scatter-gather in 3.12.  The xHCI driver
      doesn't currently support TD fragment rules, and commit 35773dac was a
      quick hack that partially implemented one of the rules.
      
      This is the third regression this patch has caused.  There's yet another
      quick hack to work around the issue, but I really want to support TD
      fragments properly, rather than hacking around it.  It will take us a
      kernel release or two to get it implemented, since it is a big
      architectural change.
      
      This patchset backs out commit 35773dac, and the two bug fix patches
      for it.  The first patch limits arbitrarily aligned scatter-gather under
      xHCI 1.0 hosts.
      
      As a result of this patchset:
      
      1. usb-storage and uas will still be able to use scatter-gather, since
         they submit max packet sized aligned transfers.
      2. usbfs will behave exactly as before, no more userspace regressions.
      3. The ax88179_178a driver works fine without scatter-gather (Mark Lord
         confirms this).
      
      Users of the ASIX chipset may still see occasional packet loss on 1.0 xHCI
      hosts, if the xHCI driver needs to split a TRB across 64-KB boundaries,
      and a link TRB happens to fall between those two TRBs.  I expect this
      corner case to be infrequent.
      
      Sarah Sharp
      2991942f
  2. 07 Feb, 2014 5 commits
    • Sarah Sharp's avatar
      Revert "usb: xhci: Link TRB must not occur within a USB payload burst" · 3d4b81ed
      Sarah Sharp authored
      This reverts commit 35773dac.  It's a
      hack that caused regressions in the usb-storage and userspace USB
      drivers that use usbfs and libusb.  Commit 70cabb7d992f "xhci 1.0: Limit
      arbitrarily-aligned scatter gather." should fix the issues seen with the
      ax88179_178a driver on xHCI 1.0 hosts, without causing regressions.
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable@vger.kernel.org # 3.12
      3d4b81ed
    • Sarah Sharp's avatar
      Revert "xhci: Avoid infinite loop when sg urb requires too many trbs" · 9cf00d91
      Sarah Sharp authored
      This reverts commit d6c9ea90.
      
      We are ripping out commit 35773dac "usb:
      xhci: Link TRB must not occur within a USB payload burst" because it's a
      hack that caused regressions in the usb-storage and userspace USB
      drivers that use usbfs and libusb.  This commit attempted to fix the
      issues with that patch.
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable@vger.kernel.org # 3.12
      9cf00d91
    • Sarah Sharp's avatar
      Revert "xhci: Set scatter-gather limit to avoid failed block writes." · 1386ff75
      Sarah Sharp authored
      This reverts commit f2d9b991.
      
      We are ripping out commit 35773dac "usb:
      xhci: Link TRB must not occur within a USB payload burst" because it's a
      hack that caused regressions in the usb-storage and userspace USB
      drivers that use usbfs and libusb.  This commit attempted to fix the
      issues with that patch.
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable@vger.kernel.org #3.12
      1386ff75
    • Sarah Sharp's avatar
      xhci 1.0: Limit arbitrarily-aligned scatter gather. · 247bf557
      Sarah Sharp authored
      xHCI 1.0 hosts have a set of requirements on how to align transfer
      buffers on the endpoint rings called "TD fragment" rules.  When the
      ax88179_178a driver added support for scatter gather in 3.12, with
      commit 804fad45411b48233b48003e33a78f290d227c8 "USBNET: ax88179_178a:
      enable tso if usb host supports sg dma", it broke the device under xHCI
      1.0 hosts.  Under certain network loads, the device would see an
      unexpected short packet from the host, which would cause the device to
      stop sending ethernet packets, even through USB packets would still be
      sent.
      
      Commit 35773dac "usb: xhci: Link TRB must not occur within a USB
      payload burst" attempted to fix this.  It was a quick hack to partially
      implement the TD fragment rules.  However, it caused regressions in the
      usb-storage layer and userspace USB drivers using libusb.  The patches
      to attempt to fix this are too far reaching into the USB core, and we
      really need to implement the TD fragment rules correctly in the xHCI
      driver, instead of continuing to wallpaper over the issues.
      
      Disable arbitrarily-aligned scatter-gather in the xHCI driver for 1.0
      hosts.  Only the ax88179_178a driver checks the no_sg_constraint flag,
      so don't set it for 1.0 hosts.  This should not impact usb-storage or
      usbfs behavior, since they pass down max packet sized aligned sg-list
      entries (512 for USB 2.0 and 1024 for USB 3.0).
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Tested-by: default avatarMark Lord <mlord@pobox.com>
      Cc: David Laight <David.Laight@ACULAB.COM>
      Cc: Bjørn Mork <bjorn@mork.no>
      Cc: Freddy Xin <freddy@asix.com.tw>
      Cc: Ming Lei <ming.lei@canonical.com>
      Cc: stable@vger.kernel.org # 3.12
      247bf557
    • Jan Moskyto Matejka's avatar
      Modpost: fixed USB alias generation for ranges including 0x9 and 0xA · 03b56329
      Jan Moskyto Matejka authored
      Commit afe2dab4 ("USB: add hex/bcd detection to usb modalias generation")
      changed the routine that generates alias ranges. Before that change, only
      digits 0-9 were supported; the commit tried to fix the case when the range
      includes higher values than 0x9.
      
      Unfortunately, the commit didn't fix the case when the range includes both
      0x9 and 0xA, meaning that the final range must look like [x-9A-y] where
      x <= 0x9 and y >= 0xA -- instead the [x-9A-x] range was produced.
      
      Modprobe doesn't complain as it sees no difference between no-match and
      bad-pattern results of fnmatch().
      
      Fixing this simple bug to fix the aliases.
      Also changing the hardcoded beginning of the range to uppercase as all the
      other letters are also uppercase in the device version numbers.
      
      Fortunately, this affects only the dvb-usb-dib0700 module, AFAIK.
      Signed-off-by: default avatarJan Moskyto Matejka <mq@suse.cz>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      03b56329
  3. 05 Feb, 2014 3 commits
  4. 04 Feb, 2014 10 commits
  5. 03 Feb, 2014 4 commits
    • Linus Torvalds's avatar
      Linus 3.14-rc1 · 38dbfb59
      Linus Torvalds authored
      38dbfb59
    • Linus Torvalds's avatar
      Merge branch 'parisc-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · 69048e01
      Linus Torvalds authored
      Pull parisc updates from Helge Deller:
       "The three major changes in this patchset is a implementation for
        flexible userspace memory maps, cache-flushing fixes (again), and a
        long-discussed ABI change to make EWOULDBLOCK the same value as
        EAGAIN.
      
        parisc has been the only platform where we had EWOULDBLOCK != EAGAIN
        to keep HP-UX compatibility.  Since we will probably never implement
        full HP-UX support, we prefer to drop this compatibility to make it
        easier for us with Linux userspace programs which mostly never checked
        for both values.  We don't expect major fall-outs because of this
        change, and if we face some, we will simply rebuild the necessary
        applications in the debian archives"
      
      * 'parisc-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc: add flexible mmap memory layout support
        parisc: Make EWOULDBLOCK be equal to EAGAIN on parisc
        parisc: convert uapi/asm/stat.h to use native types only
        parisc: wire up sched_setattr and sched_getattr
        parisc: fix cache-flushing
        parisc/sti_console: prefer Linux fonts over built-in ROM fonts
      69048e01
    • Mikulas Patocka's avatar
      hpfs: optimize quad buffer loading · 1c0b8a7a
      Mikulas Patocka authored
      HPFS needs to load 4 consecutive 512-byte sectors when accessing the
      directory nodes or bitmaps.  We can't switch to 2048-byte block size
      because files are allocated in the units of 512-byte sectors.
      
      Previously, the driver would allocate a 2048-byte area using kmalloc,
      copy the data from four buffers to this area and eventually copy them
      back if they were modified.
      
      In the current implementation of the buffer cache, buffers are allocated
      in the pagecache.  That means that 4 consecutive 512-byte buffers are
      stored in consecutive areas in the kernel address space.  So, we don't
      need to allocate extra memory and copy the content of the buffers there.
      
      This patch optimizes the code to avoid copying the buffers.  It checks
      if the four buffers are stored in contiguous memory - if they are not,
      it falls back to allocating a 2048-byte area and copying data there.
      Signed-off-by: default avatarMikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1c0b8a7a
    • Mikulas Patocka's avatar
      hpfs: remember free space · 2cbe5c76
      Mikulas Patocka authored
      Previously, hpfs scanned all bitmaps each time the user asked for free
      space using statfs.  This patch changes it so that hpfs scans the
      bitmaps only once, remembes the free space and on next invocation of
      statfs it returns the value instantly.
      
      New versions of wine are hammering on the statfs syscall very heavily,
      making some games unplayable when they're stored on hpfs, with load
      times in minutes.
      
      This should be backported to the stable kernels because it fixes
      user-visible problem (excessive level load times in wine).
      Signed-off-by: default avatarMikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2cbe5c76
  6. 02 Feb, 2014 12 commits
  7. 01 Feb, 2014 5 commits