1. 23 12月, 2015 7 次提交
  2. 17 12月, 2015 21 次提交
  3. 15 12月, 2015 12 次提交
    • G
      usb: phy: Remove unused Renesas R-Car (Gen1) USB PHY driver · 375da627
      Geert Uytterhoeven 提交于
      As of commit 3d7608e4 ("ARM: shmobile: bockw: remove legacy
      board file and config"), the Renesas R-Car (Gen1) USB PHY driver is no
      longer used.
      In theory it could still be used on R-Car Gen1 SoCs, but that would
      require adding DT support to the driver. Instead, a new driver using the
      generic PHY framework should be written, as was done for R-Car Gen2.
      
      Remove the driver for good.
      Acked-by: NSimon Horman <horms+renesas@verge.net.au>
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      375da627
    • V
      usb: gadget: lpc32xxx_udc: clean up and sort include directives out · 2de59c09
      Vladimir Zapolskiy 提交于
      Remove mach/irq.h from the list of included headers, there is no
      compilation dependency on this include file, and the change is needed
      to prevent a compilation failure, when mach/irq.h is removed.
      
      Additionally remove other unneeded includes and sort out their order.
      Signed-off-by: NVladimir Zapolskiy <vz@mleia.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      2de59c09
    • F
      usb: dwc3: trace: show request flags · 46a01427
      Felipe Balbi 提交于
      struct usb_request have 3 flags which might be
      important to know about during debug. This patch
      shows each of the 3 flags as a single letter:
      
      z -> for zero
      s -> short not okay
      i -> interrupt
      
      A capital letter means the feature is enabled
      while a lower case letter means it is disabled;
      
      Thus 'zsI' indicates that a ZLP is not needed,
      that we can accept a short packet and interrupt
      for this request should be enabled.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      46a01427
    • F
      usb: dwc3: gadget: handle request->zero · 04c03d10
      Felipe Balbi 提交于
      So far, dwc3 has always missed request->zero
      handling for every endpoint. Let's implement
      that so we can handle cases where transfer must
      be finished with a ZLP.
      
      Note that dwc3 is a little special. Even though
      we're dealing with a ZLP, we still need a buffer
      of wMaxPacketSize bytes; to hide that detail from
      every gadget driver, we have a preallocated buffer
      of 1024 bytes (biggest bulk size) to use (and
      share) among all endpoints.
      Reported-by: NRavi B <ravibabu@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      04c03d10
    • R
      usb: musb: convert printk to pr_* · 3ff4b573
      Rasmus Villemoes 提交于
      This file already uses pr_debug in a few places; this converts the
      remaining printks.
      Signed-off-by: NRasmus Villemoes <linux@rasmusvillemoes.dk>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      3ff4b573
    • D
      usb: dwc2: host: Clear interrupts before handling them · 29539019
      Douglas Anderson 提交于
      In general it is wise to clear interrupts before processing them.  If
      you don't do that, you can get:
       1. Interrupt happens
       2. You look at system state and process interrupt
       3. A new interrupt happens
       4. You clear interrupt without processing it.
      
      This patch was actually a first attempt to fix missing device insertions
      as described in (usb: dwc2: host: Fix missing device insertions) and it
      did solve some of the signal bouncing problems but not all of
      them (which is why I submitted the other patch).  Specifically, this
      patch itself would sometimes change:
       1. hardware sees connect
       2. hardware sees disconnect
       3. hardware sees connect
       4. dwc2_port_intr() - clears connect interrupt
       5. dwc2_handle_common_intr() - calls dwc2_hcd_disconnect()
      
      ...to:
       1. hardware sees connect
       2. hardware sees disconnect
       3. dwc2_port_intr() - clears connect interrupt
       4. hardware sees connect
       5. dwc2_handle_common_intr() - calls dwc2_hcd_disconnect()
      
      ...but with different timing then sometimes we'd still miss cable
      insertions.
      
      In any case, though this patch doesn't fix any (known) problems, it
      still seems wise as a general policy to clear interrupt before handling
      them.
      
      Note that for dwc2_handle_usb_port_intr(), instead of moving the clear
      of PRTINT to the beginning of the function we remove it completely.  The
      only way to clear PRTINT is to clear the sources that set it in the
      first place.
      Signed-off-by: NDouglas Anderson <dianders@chromium.org>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      29539019
    • D
      usb: dwc2: host: Add missing spinlock in dwc2_hcd_reset_func() · 4a065c7b
      Douglas Anderson 提交于
      The dwc2_hcd_reset_func() function is only ever called directly by a
      delayed work function.  As such no locks are already held when the
      function is called.
      
      Doing a read-modify-write of CPU registers and setting fields in the
      main hsotg data structure is a bad idea without locks.  Let's add
      locks.
      
      The bug was found by code inspection only.  It turns out that the
      dwc2_hcd_reset_func() is only ever called today if the
      "host_support_fs_ls_low_power" parameter is enabled and no code in
      mainline enables that parameter.  Thus no known issues in mainline are
      fixed by this patch, but it's still probably wise to fix the function.
      Signed-off-by: NDouglas Anderson <dianders@chromium.org>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      4a065c7b
    • B
      usb: of: add an api to get dr_mode by the phy node · 98bfb394
      Bin Liu 提交于
      Some USB phy drivers have different handling for the controller in each
      dr_mode. But the phy driver does not have visibility to the dr_mode of
      the controller.
      
      This adds an api to return the dr_mode of the controller which
      associates the given phy node.
      Signed-off-by: NBin Liu <b-liu@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      98bfb394
    • P
      usb: gadget: f_sourcesink: quit if usb_ep_queue returns error · fa4dce20
      Peter Chen 提交于
      Since now, we may have more than one request during the test, and
      it is better we just quit once the error occurs instead of try
      queueing further requests.
      Signed-off-by: NPeter Chen <peter.chen@freescale.com>
      Suggested-by: NKrzysztof Opasiak <k.opasiak@samsung.com>
      Reviewed-by: NKrzysztof Opasiak <k.opasiak@samsung.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      fa4dce20
    • I
      usb: gadget: composite: remove redundant bcdUSB setting in legacy · 0aecfc1b
      Igor Kotrasinski 提交于
      Since composite now overwrites bcdUSB for any gadget, remove
      setting it in legacy gadgets. All legacy gadgets set 0x0200, the
      same as the value additionally set by composite, so there is no
      behaviour change.
      Signed-off-by: NIgor Kotrasinski <i.kotrasinsk@samsung.com>
      
      Rebase onto current balbi/next
      Signed-off-by: NKrzysztof Opasiak <k.opasiak@samsung.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      0aecfc1b
    • D
      usb: dwc2: host: Support immediate retries for split transactions · 69b76cdf
      Douglas Anderson 提交于
      In some cases, like when you've got a "Microsoft Wireless Keyboard 2000"
      connected to dwc2 with a hub, expected that we'll get some transfer
      errors sometimes.  The controller is expected to try at least 3 times
      before giving up.  See figure "Figure A-67. Normal HS CSPLIT 3 Strikes
      Smash" in the USB spec.
      
      The dwc2 controller has a way to support this by using the "EC_MC"
      field.  The Raspberry Pi driver has logic for setting this right.  See
      fiq_fsm_queue_split_transaction() in their "dwc_otg_hcd.c".  Let's use
      the same logic.
      
      After making this change, we no longer get dropped characters from the
      above mentioned keyboard.  Other devices on the same bus as the keyboard
      also behave more properly.
      
      Thanks for Julius Werner for the expert analysis and suggestions.
      Acked-by: NJohn Youn <johnyoun@synopsys.com>
      Signed-off-by: NDouglas Anderson <dianders@chromium.org>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      69b76cdf
    • D
      usb: dwc2: host: Fix missing device insertions · 6a659531
      Douglas Anderson 提交于
      If you've got your interrupt signals bouncing a bit as you insert your
      USB device, you might end up in a state when the device is connected but
      the driver doesn't know it.
      
      Specifically, the observed order is:
       1. hardware sees connect
       2. hardware sees disconnect
       3. hardware sees connect
       4. dwc2_port_intr() - clears connect interrupt
       5. dwc2_handle_common_intr() - calls dwc2_hcd_disconnect()
      
      Now you'll be stuck with the cable plugged in and no further interrupts
      coming in but the driver will think we're disconnected.
      
      We'll fix this by checking for the missing connect interrupt and
      re-connecting after the disconnect is posted.  We don't skip the
      disconnect because if there is a transitory disconnect we really want to
      de-enumerate and re-enumerate.
      
      Notes:
      1. As part of this change we add a "force" parameter to
         dwc2_hcd_disconnect() so that when we're unloading the module we
         avoid the new behavior.  The need for this was pointed out by John
         Youn.
      2. The bit of code needed at the end of dwc2_hcd_disconnect() is
         exactly the same bit of code from dwc2_port_intr().  To avoid
         duplication, we refactor that code out into a new function
         dwc2_hcd_connect().
      Signed-off-by: NDouglas Anderson <dianders@chromium.org>
      Acked-by: NJohn Youn <johnyoun@synopsys.com>
      Tested-by: NJohn Youn <johnyoun@synopsys.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      6a659531