1. 26 1月, 2013 2 次提交
    • G
      Merge tag 'dwc3-for-v3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next · a9b8676c
      Greg Kroah-Hartman 提交于
      Felipe writes:
      	usb: dwc3: patches for v3.9 merge window
      
      	We're saving some extra memory now by being a lot
      	more conservative when allocating our event buffers.
      
      	Our default HIRD threshold value was mistakenly set
      	as one of the unsupported which would cause undefined
      	behavior. Turns out that it broke OMAP5 ES2.0, so we're
      	fixing it now by setting the maximum allowed HIRD
      	threshold (12).
      
      	Quite a few fixes to Isochronous transfers and scatter/gather
      	support from Pratyush.
      
      	We're also starting to support devicetree-based probe with
      	the latest changes from Kishon.
      
      	The usual set of cleanups also available: converting debugfs
      	regdump utility to regsets, better "compatible" strings for
      	Exynos platforms and the removal of the dependency for
      	Host and Gadget; now dwc3 can be compiled host-only, device-only,
      	and/or Dual-Role.
      a9b8676c
    • G
      Merge tag 'musb-for-v3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next · 46823498
      Greg Kroah-Hartman 提交于
      Felipe writes:
      	usb: musb: patches for v3.9 merge window
      
      	Mostly fixes all over which weren't urgent enough for
      	the late -rc cycle.
      
      	There is a Double Buffering fix for Host Mode TX,
      	a dependency fix for the transceiver driver, some
      	fixes to the error path and a fix for the use of
      	omap_musb_maibox.
      
      	Other than these fixes, there a removal duplicate
      	headers from the dsps glue layer and removal of
      	redundant assignments in omap2430_probe().
      46823498
  2. 25 1月, 2013 17 次提交
  3. 24 1月, 2013 1 次提交
    • F
      usb: dwc3: gadget: change HIRD threshold to 12 · 1a947746
      Felipe Balbi 提交于
      First of all, that 28 value makes no sense as
      HIRD threshold is a 4-bit value, second of all
      it's causing issues for OMAP5.
      
      Using 12 because commit cbc725b3 (usb: dwc3:
      keep default hird threshold value as 4b1100)
      had the intention of setting the maximum allowed
      value of 0xc.
      
      Also, original code has been wrong forever, so
      this should be backported as far back as
      possible.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      1a947746
  4. 22 1月, 2013 2 次提交
    • L
      USB: Set usb port's DeviceRemovable according acpi information · d2123fd9
      Lan Tianyu 提交于
      ACPI provide "_PLD" and "_UPC" aml methods to describe usb port
      visibility and connectability. This patch is to add usb_hub_adjust_DeviceRemovable()
      to adjust usb hub port's DeviceRemovable according ACPI information and invoke it in
      the rh_call_control(). When hub descriptor request is issued at first time,
      usb port device isn't created and usb port is not bound with acpi. So first
      hub descriptor request is not changed based on ACPI information. After usb
      port devices being created, call usb_hub_adjust_DeviceRemovable in the hub_configure()
      and then set hub port's DeviceRemovable according ACPI information and this also works
      for non-root hub.
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NLan Tianyu <tianyu.lan@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d2123fd9
    • J
      drivers/usb/chipidea/core.c: adjust duplicate test · 5c6e9bf0
      Julia Lawall 提交于
      Delete successive tests to the same location.  In this case res has already
      been tested for being NULL, and calling devm_request_and_ioremap will not
      make it NULL.  On the other hand, devm_request_and_ioremap can return NULL
      on failure.
      
      A simplified version of the semantic match that finds this problem is as
      follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @s exists@
      local idexpression y;
      expression x,e;
      @@
      
      *if ( \(x == NULL\|IS_ERR(x)\|y != 0\) )
       { ... when forall
         return ...; }
      ... when != \(y = e\|y += e\|y -= e\|y |= e\|y &= e\|y++\|y--\|&y\)
          when != \(XT_GETPAGE(...,y)\|WMI_CMD_BUF(...)\)
      *if ( \(x == NULL\|IS_ERR(x)\|y != 0\) )
       { ... when forall
         return ...; }
      // </smpl>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5c6e9bf0
  5. 21 1月, 2013 4 次提交
  6. 19 1月, 2013 8 次提交
  7. 18 1月, 2013 6 次提交
    • V
      usb: dwc3: remove dwc3 dependency on host AND gadget. · 388e5c51
      Vivek Gautam 提交于
      DWC3 controller curretly depends on USB && USB_GADGET.
      Some hardware may like to use only host feature on dwc3,
      or only gadget feature.
      
      So, removing this dependency of USB_DWC3 on USB and USB_GADGET.
      Adding the mode of operaiton of DWC3 also here
      HOST/GADGET/DUAL_ROLE based on which features are enabled.
      
      [ balbi@ti.com :
      	. make sure we have default modes for all possible Kernel
      		configurations.
      	. Remove the config -> menuconfig change as it's unnecessary
      	. switch over to IS_ENABLED() ]
      
      CC: Doug Anderson <dianders@chromium.org>
      Signed-off-by: NVivek Gautam <gautam.vivek@samsung.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      388e5c51
    • P
      usb: dwc3: gadget: req->queued must be forced to false in cleanup · c9fda7d6
      Pratyush Anand 提交于
      I am not sure, why I found it during SG debugging. But, I noticed that
      even when req_queued list was empty, there were some request in
      request_list having queued flag true. If I run test second time, it
      first removes all request from request_list and hence busy_slot was
      wrongly incremented.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NPratyush Anand <pratyush.anand@st.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      c9fda7d6
    • P
      usb: dwc3: gadget: fix scatter gather implementation · e5ba5ec8
      Pratyush Anand 提交于
      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: NPratyush Anand <pratyush.anand@st.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      e5ba5ec8
    • P
      usb: dwc3: gadget: no need to pass params in case of UPDATE_TRANSFER · 1877d6c9
      Pratyush Anand 提交于
      UPDATE_TRANSFER does not need any parameters. So, no need to prepare it.
      Signed-off-by: NPratyush Anand <pratyush.anand@st.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      1877d6c9
    • P
      usb: dwc3: gadget: fix skip LINK_TRB on ISOC · 915e202a
      Pratyush Anand 提交于
      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: NPratyush Anand <pratyush.anand@st.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      915e202a
    • P
      usb: dwc3: gadget: fix isoc END TRANSFER Condition · cdc359dd
      Pratyush Anand 提交于
      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: NPratyush Anand <pratyush.anand@st.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      cdc359dd