1. 10 5月, 2016 1 次提交
    • C
      target: make ->shutdown_session optional · 22d11759
      Christoph Hellwig 提交于
      Turns out the template and thus many drivers got the return value wrong:
      0 means the fabrics driver needs to put a session reference, which no
      driver except for the iSCSI target drivers did.  Fortunately none of these
      drivers supports explicit Node ACLs, so the bug was harmless.
      
      Even without that only qla2xxx and iscsi every did real work in
      shutdown_session, so get rid of the boilerplate code in all other
      drivers.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      22d11759
  2. 20 4月, 2016 1 次提交
  3. 05 4月, 2016 1 次提交
    • K
      mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros · 09cbfeaf
      Kirill A. Shutemov 提交于
      PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} macros were introduced *long* time
      ago with promise that one day it will be possible to implement page
      cache with bigger chunks than PAGE_SIZE.
      
      This promise never materialized.  And unlikely will.
      
      We have many places where PAGE_CACHE_SIZE assumed to be equal to
      PAGE_SIZE.  And it's constant source of confusion on whether
      PAGE_CACHE_* or PAGE_* constant should be used in a particular case,
      especially on the border between fs and mm.
      
      Global switching to PAGE_CACHE_SIZE != PAGE_SIZE would cause to much
      breakage to be doable.
      
      Let's stop pretending that pages in page cache are special.  They are
      not.
      
      The changes are pretty straight-forward:
      
       - <foo> << (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;
      
       - <foo> >> (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;
      
       - PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} -> PAGE_{SIZE,SHIFT,MASK,ALIGN};
      
       - page_cache_get() -> get_page();
      
       - page_cache_release() -> put_page();
      
      This patch contains automated changes generated with coccinelle using
      script below.  For some reason, coccinelle doesn't patch header files.
      I've called spatch for them manually.
      
      The only adjustment after coccinelle is revert of changes to
      PAGE_CAHCE_ALIGN definition: we are going to drop it later.
      
      There are few places in the code where coccinelle didn't reach.  I'll
      fix them manually in a separate patch.  Comments and documentation also
      will be addressed with the separate patch.
      
      virtual patch
      
      @@
      expression E;
      @@
      - E << (PAGE_CACHE_SHIFT - PAGE_SHIFT)
      + E
      
      @@
      expression E;
      @@
      - E >> (PAGE_CACHE_SHIFT - PAGE_SHIFT)
      + E
      
      @@
      @@
      - PAGE_CACHE_SHIFT
      + PAGE_SHIFT
      
      @@
      @@
      - PAGE_CACHE_SIZE
      + PAGE_SIZE
      
      @@
      @@
      - PAGE_CACHE_MASK
      + PAGE_MASK
      
      @@
      expression E;
      @@
      - PAGE_CACHE_ALIGN(E)
      + PAGE_ALIGN(E)
      
      @@
      expression E;
      @@
      - page_cache_get(E)
      + get_page(E)
      
      @@
      expression E;
      @@
      - page_cache_release(E)
      + put_page(E)
      Signed-off-by: NKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Acked-by: NMichal Hocko <mhocko@suse.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      09cbfeaf
  4. 04 4月, 2016 1 次提交
  5. 30 3月, 2016 1 次提交
  6. 29 3月, 2016 1 次提交
    • F
      usb: gadget: f_midi: added spinlock on transmit function · 9acdf4df
      Felipe F. Tonello 提交于
      Since f_midi_transmit is called by both ALSA and USB sub-systems, it can
      potentially cause a race condition between both calls because f_midi_transmit
      is not reentrant nor thread-safe. This is due to an implementation detail that
      the transmit function looks for the next available usb request from the fifo
      and only enqueues it if there is data to send, otherwise just re-uses it. So,
      if both ALSA and USB frameworks calls this function at the same time,
      kfifo_seek() will return the same usb_request, which will cause a race
      condition.
      
      To solve this problem a syncronization mechanism is necessary. In this case it
      is used a spinlock since f_midi_transmit is also called by usb_request->complete
      callback in interrupt context.
      
      Cc: <stable@vger.kernel.org> # v4.5+
      Fixes: e1e3d7ec ("usb: gadget: f_midi: pre-allocate IN requests")
      Signed-off-by: NFelipe F. Tonello <eu@felipetonello.com>
      Signed-off-by: NFelipe Balbi <balbi@kernel.org>
      9acdf4df
  7. 11 3月, 2016 3 次提交
  8. 06 3月, 2016 1 次提交
  9. 04 3月, 2016 14 次提交
  10. 04 2月, 2016 1 次提交
  11. 25 1月, 2016 1 次提交
  12. 23 1月, 2016 1 次提交
    • A
      wrappers for ->i_mutex access · 5955102c
      Al Viro 提交于
      parallel to mutex_{lock,unlock,trylock,is_locked,lock_nested},
      inode_foo(inode) being mutex_foo(&inode->i_mutex).
      
      Please, use those for access to ->i_mutex; over the coming cycle
      ->i_mutex will become rwsem, with ->lookup() done with it held
      only shared.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      5955102c
  13. 08 1月, 2016 1 次提交
  14. 23 12月, 2015 1 次提交
  15. 21 12月, 2015 6 次提交
  16. 18 12月, 2015 2 次提交
  17. 17 12月, 2015 3 次提交
    • M
      usb: gadget: ether: Allow changing the MTU · ab738ff1
      Mike Looijmans 提交于
      The gadget ethernet driver supports changing the MTU, but only allows this
      when the USB cable is removed. The comment indicates that this is because
      the "peer won't know". Even if the network link is still down and only the
      USB link is established, the driver won't allow the change.
      
      Other network interfaces allow changing the MTU any time, and don't force
      the link to be disabled. This makes perfect sense, because in order to be
      able to negotiate the MTU, the link needs to be up.
      
      Remove the restriction so that it is now actually possible to change the
      MTU (e.g. using "ifconfig usb0 mtu 15000") without having to manually pull
      the plug or change the driver's default setting.
      
      This is especially important after commit bba787a8
      ("usb: gadget: ether: Allow jumbo frames")
      Signed-off-by: NMike Looijmans <mike.looijmans@topic.nl>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      ab738ff1
    • F
      usb: gadget: f_midi: pre-allocate IN requests · e1e3d7ec
      Felipe F. Tonello 提交于
      This patch introduces pre-allocation of IN endpoint USB requests. This
      improves on latency (requires no usb request allocation on transmit) and avoid
      several potential probles on allocating too many usb requests (which involves
      DMA pool allocation problems).
      
      This implementation also handles better multiple MIDI Gadget ports, always
      processing the last processed MIDI substream if the last USB request wasn't
      enought to handle the whole stream.
      Signed-off-by: NFelipe F. Tonello <eu@felipetonello.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      e1e3d7ec
    • F
      usb: gadget: f_midi: fail if set_alt fails to allocate requests · f0f1b8ca
      Felipe F. Tonello 提交于
      This ensures that the midi function will only work if the proper number of
      IN and OUT requrests are allocated. Otherwise the function will work with less
      requests then what the user wants.
      Signed-off-by: NFelipe F. Tonello <eu@felipetonello.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      f0f1b8ca