1. 07 1月, 2014 2 次提交
  2. 05 1月, 2014 2 次提交
  3. 18 12月, 2013 1 次提交
  4. 11 12月, 2013 3 次提交
  5. 19 6月, 2013 1 次提交
  6. 29 3月, 2013 2 次提交
  7. 05 3月, 2013 2 次提交
  8. 12 2月, 2013 1 次提交
    • F
      [media] em28xx: fix analog streaming with USB bulk transfers · 33f6984e
      Frank Schaefer 提交于
      With the conversion to videobuf2, some unnecessary calls of
      em28xx_set_alternate() have been removed. It is now called at analog streaming
      start only.
      This has unveiled a bug that causes USB bulk transfers to fail with all urbs
      having status -EVOERFLOW.
      The reason is, that for bulk transfers usb_set_interface() needs to be called
      even if the previous alt setting was the same (side note: bulk transfers seem
      to work only with alt=0).
      While it seems to be NOT necessary for isoc transfers, it's reasonable to just
      call usb_set_interface() unconditionally in em28xx_set_alternate().
      Also add a comment that explains the issue to prevent regressions in the future.
      
      Cc: stable@vger.kernel.org # for 3.8
      Signed-off-by: NFrank Schäfer <fschaefer.oss@googlemail.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      33f6984e
  9. 07 2月, 2013 1 次提交
  10. 05 1月, 2013 2 次提交
  11. 23 12月, 2012 11 次提交
  12. 16 8月, 2012 1 次提交
  13. 12 8月, 2012 1 次提交
  14. 21 6月, 2012 1 次提交
  15. 11 4月, 2012 3 次提交
  16. 08 3月, 2012 1 次提交
    • G
      [media] em28xx: pre-allocate DVB isoc transfer buffers · 86d38d1e
      Gianluca Gennari 提交于
      On MIPS/ARM set-top-boxes, as well as old x86 PCs, memory allocation failures
      in the em28xx driver are common, due to memory fragmentation over time, that
      makes impossible to allocate large chunks of coherent memory.
      A typical system with 256/512 MB of RAM fails after just 1 day of uptime (see
      the old thread for detailed reports and crashlogs).
      
      In fact, the em28xx driver allocates memory for USB isoc transfers at runtime,
      as opposite to the dvb-usb drivers that allocates the USB buffers when the
      device is initialized, and frees them when the device is disconnected.
      
      Moreover, in digital mode the USB isoc transfer buffers are freed, allocated
      and cleared every time the user selects a new channel, wasting time and
      resources.
      
      This patch solves both problems by allocating DVB isoc transfer buffers in
      em28xx_usb_probe(), and freeing them in em28xx_usb_disconnect().
      In fact, the buffers size and number depend only on the max USB packet size
      that is parsed from the USB descriptors in em28xx_usb_probe(), so it can
      never change for a given device.
      
      This approach makes no sense in analog mode (as the buffer size depends on
      the alternate mode selected at runtime), the patch creates two separate sets
      of buffers for digital and analog modes.
      
      For digital-only devices, USB buffers are created when the device is probed
      and freed when the device is disconnected.
      For analog-only devices, nothing changes: isoc buffers are created at runtime.
      For hybrid devices, two sets of buffers are maintained: the digital-mode
      buffers are created when the device is probed, and freed when the device is
      disconnected; analog-mode buffers are created/destroyed at runtime as before.
      So, in analog mode, digital and analog buffers coexists at the same time: this
      can be justified by the fact that digital mode is by far more commonly used
      nowadays, so it makes sense to optimize the driver for this use case scenario.
      
      The patch has been tested in the last few days on a x86 PC and a MIPS
      set-top-box, with the PCTV 290e (digital only) and the Terratec Hybrid XS
      (hybrid device). With the latter, I switched several times between analog and
      digital mode (Kaffeine/TvTime) with no issue at all.
      I unplugged/plugged the devices several times with no problem.
      Also, after over 3 days of normal usage in the MPIS set-top-box, the PCTV 290e
      was still up and running.
      Signed-off-by: NGianluca Gennari <gennarone@gmail.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      86d38d1e
  17. 06 1月, 2012 2 次提交
  18. 24 9月, 2011 1 次提交
    • C
      [media] em28xx: fix race on disconnect · d7222e7d
      Chris Rankin 提交于
      This patch closes the race on the device and extension lists at USB disconnect
      time. Previously, the device was removed from the device list during
      em28xx_release_resources(), and then passed to the em28xx_close_extension()
      function so that all extensions could run their fini() operations. However, this
      left a (brief, theoretical, highly unlikely ;-)) window between these two calls
      during which a new module could call em28xx_register_extension(). The result
      would have been that the em28xx_usb_disconnect() function would also have passed
      the device to the new extension's fini() function, despite never having called
      the extension's init() function.
      
      This patch also restores em28xx_close_extension()'s symmetry with
      em28xx_init_extension(), and establishes the property that every device in the
      device list must have been initialised for every extension in the extension list.
      Signed-off-by: NChris Rankin <rankincj@yahoo.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      d7222e7d
  19. 04 9月, 2011 2 次提交