1. 18 Jan, 2013 12 commits
    • Pratyush Anand's avatar
      usb: dwc3: gadget: fix scatter gather implementation · e5ba5ec8
      Pratyush Anand authored
      To work with scatter gather properly, fixes have been done in number of
      functions. I will explain requirement of each fixes one by one.
      
      start_slot: used to retrieve all request of SG during cleanup
      
      dwc3_gadget_giveback: We need to skip link TRB if it was one of the
      intermediate TRB of SG.
      
      dwc3_prepare_one_trb: We need to track all submitted TRBs during
      cleanup. Since, all TRBs would be serially allocated, so we can just
      keep starting slot info and we can always find rest of them. We need to
      pass sg node number, so that we cab appropriately program ISOC_FIRST/ISOC,
      Chain etc.
      
      dwc3_prepare_trbs: last_one should be set when it is last node
      of SG as well as last node of request_list.
      
      __dwc3_cleanup_done_trbs: It has been prepared after re-factorization of
      dwc3_cleanup_done_reqs. It is called for each TRB of SG.
      Signed-off-by: default avatarPratyush Anand <pratyush.anand@st.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      e5ba5ec8
    • Pratyush Anand's avatar
      usb: dwc3: gadget: no need to pass params in case of UPDATE_TRANSFER · 1877d6c9
      Pratyush Anand authored
      UPDATE_TRANSFER does not need any parameters. So, no need to prepare it.
      Signed-off-by: default avatarPratyush Anand <pratyush.anand@st.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      1877d6c9
    • Pratyush Anand's avatar
      usb: dwc3: gadget: fix skip LINK_TRB on ISOC · 915e202a
      Pratyush Anand authored
      When we reach to link trb, we just need to increase free_slot and then
      calculate TRB. Return is not correct, as it will cause wrong TRB DMA
      address to fetch in case of update transfer.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarPratyush Anand <pratyush.anand@st.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      915e202a
    • Pratyush Anand's avatar
      usb: dwc3: gadget: fix isoc END TRANSFER Condition · cdc359dd
      Pratyush Anand authored
      There were still some corner cases where isoc transfer was not able to
      restart, specially when missed isoc does not happen , and in fact gadget does
      not queue any new request during giveback.
      
      Cleanup function calls giveback first, which provides a way to queue
      another request to gadget. But gadget did not had any data. So , it did
      not call ep_queue. To twist it further, gadget did not queue till
      cleanup for last queued TRB is called. If we ever reach this scenario,
      we must call END TRANSFER, so that we receive a new  xfernotready with
      information about current microframe number.
      
      Also insure that there is no request submitted to core when issuing END
      TRANSFER.
      
      Cc: <stable@vger.kernel.org> # v3.8
      Signed-off-by: default avatarPratyush Anand <pratyush.anand@st.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      cdc359dd
    • Pratyush Anand's avatar
      usb: dwc3: gadget: correct return from ep_queue · 15f86bde
      Pratyush Anand authored
      Its better to return from each if condition as they are mutually
      exclusive.
      Signed-off-by: default avatarPratyush Anand <pratyush.anand@st.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      15f86bde
    • Pratyush Anand's avatar
      usb: dwc3: gadget: fix missed isoc · 7efea86c
      Pratyush Anand authored
      There are two reasons to generate missed isoc.
      
      1. when the host does not poll for all the data.
      2. because of application-side delays that prevent all the data from
      being transferred in programmed microframe.
      
      Current code was able to handle first case only.  This patch handles
      scenario 2 as well.Scenario 2 sometime may occur with complex gadget
      application, however it can be easily reproduced for testing purpose as
      follows:
      
      a. use isoc binterval as 1 in f_sourcesink.
      b. use pattern=0
      c. introduce a delay of 150us deliberately in source_sink_complete, so
      that after few frames it lands into scenario 2.
      d. now run testusb 16 (isoc in  test). You will notice that if this
      patch is not applied then isoc transfer is not able to recover after
      first missed.
      
      Current patch's approach is as under:
      
      If missed isoc occurs and there is no request queued then issue END
      TRANSFER, so that core generates next xfernotready and we will issue a
      fresh START TRANSFER.
      If there are still queued request then wait, do not issue either END or
      UPDATE TRANSFER, just attach next request in request_list during giveback.
      If any future queued request is successfully transferred then we will issue
      UPDATE TRANSFER for all request in the request_list.
      
      Cc: <stable@vger.kernel.org> # v3.6 v3.7 v3.8
      Signed-off-by: default avatarPratyush Anand <pratyush.anand@st.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      7efea86c
    • Pratyush Anand's avatar
      usb: dwc3: Enable usb2 LPM only when connected as usb2.0 · 2b758350
      Pratyush Anand authored
      Synopsys says:
      The HIRD Threshold field must be set to ‘0’ when the device core is
      operating in super speed mode.
      
      This patch implements above statement.
      
      Cc: <stable@vger.kernel.org> # v3.6 v3.7 v3.8
      Acked-by: default avatarPaul Zimmerman <paulz@synopsys.com>
      Signed-off-by: default avatarPratyush Anand <pratyush.anand@st.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      2b758350
    • Felipe Balbi's avatar
      usb: dwc3: debugfs: convert our regdump to use regsets · d7668024
      Felipe Balbi authored
      regset is a generic implementation of regdump
      utility through debugfs.
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      d7668024
    • Felipe Balbi's avatar
      usb: dwc3: gadget: don't redefine 'ret' · 7dbdf4e4
      Felipe Balbi authored
      we have an extra 'ret' variable shadowing a previous
      definition. Remove it.
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      7dbdf4e4
    • Jingoo Han's avatar
      usb: dwc3: exynos: use devm_ functions · 20b97dc1
      Jingoo Han authored
      The devm_ functions allocate memory that is released when a driver
      detaches. This makes the code smaller and a bit simpler.
      Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      20b97dc1
    • Felipe Balbi's avatar
      usb: dwc3: decrease event buffer size · 5da93478
      Felipe Balbi authored
      Currently we're allocating an entire page to
      serve as our event buffer. Provided our events
      are 4 bytes long, it's very unlikely we will
      even trigger 1k events at once.
      
      Even in the worst case scenario where every
      endpoint triggers one event and we still have
      a couple of error events, that would still
      be less than 40 events.
      
      In order to cope with future versions of the
      IP which could (or could not) increase the
      amount of possible events to trigger
      simultaneously, we're using an arbitrary size
      of 64 events for our event buffer.
      
      We're saving 3840 bytes by doing so.
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      5da93478
    • Linus Torvalds's avatar
      Linux 3.8-rc4 · 7d1f9aef
      Linus Torvalds authored
      7d1f9aef
  2. 17 Jan, 2013 2 commits
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 72ffaa48
      Linus Torvalds authored
      Pull more s390 patches from Martin Schwidefsky:
       "A couple of bug fixes: one of the transparent huge page primitives is
        broken, the sched_clock function overflows after 417 days, the XFS
        module has grown too large for -fpic and the new pci code has broken
        normal channel subsystem notifications."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/chsc: fix SEI usage
        s390/time: fix sched_clock() overflow
        s390: use -fPIC for module compile
        s390/mm: fix pmd_pfn() for thp
      72ffaa48
    • Linus Torvalds's avatar
      Merge tag 'for-linus-v3.8-rc4' of git://oss.sgi.com/xfs/xfs · dfdebc24
      Linus Torvalds authored
      Pull xfs bugfixes from Ben Myers:
      
       - fix(es) for compound buffers
      
       - fix for dquot soft timer asserts due to overflow of d_blk_softlimit
      
       - fix for regression in dir v2 code introduced in commit 20f7e9f3
         ("xfs: factor dir2 block read operations")
      
      * tag 'for-linus-v3.8-rc4' of git://oss.sgi.com/xfs/xfs:
        xfs: recalculate leaf entry pointer after compacting a dir2 block
        xfs: remove int casts from debug dquot soft limit timer asserts
        xfs: fix the multi-segment log buffer format
        xfs: fix segment in xfs_buf_item_format_segment
        xfs: rename bli_format to avoid confusion with bli_formats
        xfs: use b_maps[] for discontiguous buffers
      dfdebc24
  3. 16 Jan, 2013 24 commits
  4. 15 Jan, 2013 2 commits
    • Will Deacon's avatar
      arm64: compat: add syscall table entries for new syscalls · 72d0ac04
      Will Deacon authored
      There have been a number of new syscalls introduced to arch/arm/ since
      the compat layer was implemented for arm64, so add pointers to the
      relevant functions to the compat syscall table.
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      72d0ac04
    • Takashi Iwai's avatar
      ALSA: hda/hdmi - Work around "alsactl restore" errors · 6f54c361
      Takashi Iwai authored
      When "alsactl restore" is performed on HDMI codecs, it tries to
      restore the channel map value since the channel map controls are
      writable.  But hdmi_chmap_ctl_put() returns -EBADFD when no PCM stream
      is assigned yet, and this results in an error message from alsactl.
      Although the error is harmless, it's certainly ugly and can be
      regarded as a regression.
      
      As a workaround, this patch changes the return code in such a case to
      be zero for making others happy.  (A slight excuse is: when the chmap
      is changed through the proper alsa-lib API, the PCM status is checked
      there anyway, so we don't have to be too strict in the kernel side.)
      
      Cc: <stable@vger.kernel.org> [v3.7+]
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      6f54c361