1. 03 8月, 2012 3 次提交
  2. 02 7月, 2012 2 次提交
  3. 26 6月, 2012 1 次提交
  4. 25 6月, 2012 1 次提交
  5. 04 6月, 2012 8 次提交
  6. 04 5月, 2012 1 次提交
  7. 02 5月, 2012 2 次提交
  8. 30 4月, 2012 1 次提交
  9. 11 4月, 2012 1 次提交
  10. 10 4月, 2012 2 次提交
  11. 02 3月, 2012 2 次提交
  12. 28 2月, 2012 1 次提交
    • F
      usb: dwc3: gadget: use generic map/unmap routines · 0fc9a1be
      Felipe Balbi 提交于
      those routines have everything we need to map/unmap
      USB requests and it's better to use them.
      
      In order to achieve that, we had to add a simple
      change on how we allocate and use our setup buffer;
      we cannot allocate it from coherent anymore otherwise
      the generic map/unmap routines won't be able to easily
      know that the GetStatus request already has a DMA
      address.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      0fc9a1be
  13. 13 2月, 2012 1 次提交
    • F
      usb: dwc3: convert TRBs into bitshifts · f6bafc6a
      Felipe Balbi 提交于
      this will get rid of a useless memcpy on
      IRQ handling, thus improving driver performance.
      
      Tested with OMAP5430 running g_mass_storage on
      SuperSpeed and HighSpeed.
      
      Note that we are removing the little endian access
      of the TRB and all accesses will be in System endianness,
      if there happens to be a system in BE, bit 12 of GSBUSCFG0
      should be set so that HW does byte invariant BE accesses
      when fetching TRBs.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      f6bafc6a
  14. 10 2月, 2012 1 次提交
    • G
      usb: dwc3: ep0: fix SetFeature(TEST) · 3b637367
      Gerard Cauvy 提交于
      When host requests us to enter a test mode,
      we cannot directly enter the test mode before
      Status Phase is completed, otherwise the core
      will never be able to deliver the Status ZLP
      to host, because it has already entered the
      requested Test Mode.
      
      In order to fix the error, we move the actual
      start of Test Mode right after we receive
      Transfer Complete event of the status phase.
      Signed-off-by: NGerard Cauvy <g-cauvy1@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      3b637367
  15. 06 2月, 2012 3 次提交
  16. 24 1月, 2012 2 次提交
    • F
      usb: dwc3: ep0: fix compile warning · 1a0955fe
      Felipe Balbi 提交于
      commit 34c60a7 (usb: dwc3: ep0: tidy up Pending
      Request handling) introduced a compile warning
      by leaving an unused variable.
      
      This patch fixes that warning:
      
      drivers/usb/dwc3/ep0.c: In function ‘__dwc3_gadget_ep0_queue’:
      drivers/usb/dwc3/ep0.c:129:8: warning: unused variable ‘type’
      [-Wunused-variable]
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      1a0955fe
    • F
      usb: dwc3: ep0: tidy up Pending Request handling · 68d8a781
      Felipe Balbi 提交于
      The way our code was written, we should never have
      a DWC3_EP_PENDING_REQUEST flag set out of a Data Phase
      and the code in __dwc3_gadget_ep0_queue() did not
      reflect that situation properly.
      
      Tidy up that case to avoid any possible mistakes
      when starting requests for IRQs which are long
      gone.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      68d8a781
  17. 12 12月, 2011 8 次提交
    • F
      usb: dwc3: ep0: fix for possible early delayed_status · 68d3e668
      Felipe Balbi 提交于
      There is a very small possibility (previously unimagined
      by us) that the whole Mass Storage delayed status happens
      rather early, before we even get our XferNotReady event.
      
      In that case, we will be queueing a request to ep0 while
      we're still on Setup Phase and we would be waiting for
      another usb_ep_queue() forever.
      
      Handle such cases by clearing dwc->delayed_status so that
      we start control status from the next XferNotReady like
      there was no wait for Delayed Status.
      
      Tested against Linux 3.2-rc3 and USB30CV tool from USB-IF
      (on a Windows XP with USB3 PCIe card).
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      68d3e668
    • F
      usb: dwc3: ep0: fix GetStatus handling (again) · e2617796
      Felipe Balbi 提交于
      previous commit fixed part of it but it was still
      calling usb_ep_queue() from IRQ context without
      loosing locks. That cannot be done otherwise we will
      have a recursive locking.
      
      Also, we need to assign the 'dep' pointer on
      dwc->ep0_usb_req otherwise we will have a NULL
      pointer dereference on dwc3_map_buffer_to_dma().
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      e2617796
    • S
      usb: dwc3: ep0: use dwc3_request for ep0 requsts instead of usb_request · e0ce0b0a
      Sebastian Andrzej Siewior 提交于
      Instead of special functions and shortcuts for sending our internal
      answers to the host we started doing what the gadget does and used the
      public API for this. Since we only were using a few fields the
      usb_request was enough. Later added the list handling in order to
      synchronize the host / gadget events and now we require to have the
      dwc3_request struct around our usb_request or else we touch memory that
      does not belong to us. So this patch does this.
      Reported-by: NPartha Basak <p-basak2@ti.com>
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      e0ce0b0a
    • F
      usb: dwc3: workaround: missing disconnect event · df62df56
      Felipe Balbi 提交于
      DWC3 revisions <1.88a have an issue which would
      case a missing Disconnect event if cable is
      disconnected while there's a Setup packet
      pending the FIFO.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      df62df56
    • S
      usb: dwc3: ep0: handle delayed_status again · 5bdb1dcc
      Sebastian Andrzej Siewior 提交于
      Since the re-worked ep0 handling (which uses HW's hints to recognize the ep0
      status) we lost the delayed status handling. This is used by the file and mass
      storage gadget to gain some extra time so setup its internal status before it
      can proceed further requests.
      In particular the storage gadget does nothing on USB_REQ_SET_CONFIGURATION but
      wakes up a thread which handles the request. If the udc driver continues ep0
      handling before the thread did its work then then endpoint is not yet
      configured and further requests will fail. Once the gadget is ready, it will
      enqueue an empty packet which is used for synchronization.
      In order to fix this issue, the patch does the following:
      Set ->delayed_status once the delayed_status has been notices and do not
      continue on the next XferNotReady event. We will continues ep0 processing once
      the gadget enqueued the zero packet for synchronization.
      
      A cleaner approach would be to enforce the gadget to enqueue an empty
      (zero) request even for the status phase but this would do for now.
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      5bdb1dcc
    • S
      usb: dwc3: ep0: push ep0state into xfernotready processing · f0f2b2a2
      Sebastian Andrzej Siewior 提交于
      We wait for the XferNotReady before we start the transfer and by then we
      know ep0 state in which we supposed to be.
      This is some cleanup work for the following patch in which we require to
      know the ep0 state before the transfer completes.
      While here, also change the argument to dwc3_ep0_do_control_status() so
      we don't require the complete event structure but only the required
      piece of information.
      Inspired-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      f0f2b2a2
    • F
      usb: dwc3: fix sparse errors · 8becf270
      Felipe Balbi 提交于
      sparse caught three mistakes on this driver,
      fix them:
      
      drivers/usb/dwc3/ep0.c:806:29: warning: duplicate const
      drivers/usb/dwc3/debugfs.c:481:15: warning: symbol 'dwc3_debugfs_init' \
      	was not declared. Should it be static?
      drivers/usb/dwc3/debugfs.c:518:16: warning: symbol 'dwc3_debugfs_exit' \
      	was not declared. Should it be static?
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      8becf270
    • F
      usb: dwc3: fix few coding style problems · 25b8ff68
      Felipe Balbi 提交于
      There were a few coding style issues with this driver
      which are now fixed:
      
      drivers/usb/dwc3/debugfs.c:48: WARNING: Use #include \
      	<linux/uaccess.h> instead of <asm/uaccess.h>
      drivers/usb/dwc3/debugfs.c:484: ERROR: space required \
      	before the open brace '{'
      drivers/usb/dwc3/ep0.c:261: WARNING: line over 80 characters
      drivers/usb/dwc3/ep0.c:287: WARNING: suspect code indent \
      	for conditional statements (16, 23)
      drivers/usb/dwc3/gadget.c:749: WARNING: line over 80 characters
      drivers/usb/dwc3/gadget.c:1267: WARNING: line over 80 characters
      drivers/usb/dwc3/gadget.h:116: WARNING: line over 80 characters
      drivers/usb/dwc3/io.h:42: WARNING: Use #include \
      	<linux/io.h> instead of <asm/io.h>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      25b8ff68