1. 06 4月, 2013 5 次提交
    • G
      Merge tag 'usb-for-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next · 64dc9e2e
      Greg Kroah-Hartman 提交于
      Felipe writes:
      
      usb: patches for v3.10 merge window
      
      Here is the big Gadget & PHY pull request. Many of us have
      been really busy lately getting multiple drivers to a better
      position.
      
      Since this pull request is so large, I will divide it in sections
      so it's easier to grasp what's included.
      
      - cleanups:
      	. UDC drivers no longer touch gadget->dev, that's now udc-core
      		responsibility
      	. Many more UDC drivers converted to usb_gadget_map/unmap_request()
      	. UDC drivers no longer initialize DMA-related fields from gadget's
      		device structure
      	. UDC drivers don't touch gadget.dev.driver directly
      	. UDC drivers don't assign gadget.dev.release directly
      	. Removal of some unused DMA_ADDR_INVALID
      	. Introduction of CONFIG_USB_PHY
      	. All phy drivers have been moved to drivers/usb/phy and renamed to
      		a common naming scheme
      	. Fix PHY layer so it never returns a NULL pointer, also fix all
      		callers to avoid using IS_ERR_OR_NULL()
      	. Sparse fixes all over the place
      	. drivers/usb/otg/ has been deleted
      	. Marvel drivers (mv_udc, ehci-mv, mv_otg and mv_u3d) improved clock
      		usage
      
      - new features:
      	. UDC core now provides a generic way for tracking and reporting
      		UDC's state (not attached, resuming, suspended, addressed,
      		default, etc)
      	. twl4030-usb learned that it shouldn't be enabled during init
      	. Full DT support for DWC3 has been implemented
      	. ab8500-usb learned about pinctrl framework
      	. nop PHY learned about DeviceTree and regulators
      	. DWC3 learned about suspend/resume
      	. DWC3 can now be compiled in host-only and gadget-only (as well as
      		DRD) configurations
      	. UVC now enables streaming endpoint based on negotiated speed
      	. isp1301 now implements the PHY API properly
      	. configfs-based interface for gadget drivers which will lead to
      		the removal of all code which just combines functions together
      		to build functional gadget drivers.
      	. f_serial and f_obex were converted to new configfs interface while
      		maintaining old interface around.
      
      - non-critical fixes:
      	. UVC gadget driver got fixes for Endpoint usage and stream calculation
      	. ab8500-usb fixed unbalanced clock and regulator API usage
      	. twl4030-usb got a fix for when OMAP3 is booted with cable connected
      	. fusb300_udc got a fix for DMA usage
      	. UVC got fixes for two assertions of the USB Video Class Compliance
      		specification revision 1.1
      	. build warning issues caused by recent addition of __must_check to
      		regulator API
      
      These are all changes which deserve a mention, all other changes are related
      to these one or minor spelling fixes and other similar tasks.
      Signed-of-by: NFelipe Balbi <balbi@ti.com>
      64dc9e2e
    • D
      USB: keyspan: add a sanity test on "len" · 01a60e76
      Dan Carpenter 提交于
      "len" comes from the USB transfer and it's probably correct.  The thing
      is that we already have similar checks like:
      
              if (data[i] >= serial->num_ports) {
      
      So adding a sanity test here matches the rest of the code and is a good
      idea.
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      01a60e76
    • D
      USB: keyspan: pull in one indent level · 6a3ae841
      Dan Carpenter 提交于
      We can remove the "if (urb->actual_length) {" check because checking for
      "while (i < urb->actual_length) {" is sufficient.  This lets us pull the
      code in one indent level.
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6a3ae841
    • M
      usb: chipidea: udc: fix memory leak in _ep_nuke · 7ca2cd29
      Michael Grzeschik 提交于
      In hardware_enqueue code adds one extra td with dma_pool_alloc if
      mReq->req.zero is true. When _ep_nuke will be called for that endpoint,
      dma_pool_free will not be called to free that memory again. That patch
      fixes this.
      
      Cc: stable <stable@vger.kernel.org> # v3.5
      Signed-off-by: NMichael Grzeschik <m.grzeschik@pengutronix.de>
      Signed-off-by: NAlexander Shishkin <alexander.shishkin@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7ca2cd29
    • M
      usb: chipidea: udc: fix memory access of shared memory on armv5 machines · a9c17430
      Michael Grzeschik 提交于
      The udc uses an shared dma memory space between hard and software. This
      memory layout is described in ci13xxx_qh and ci13xxx_td which are marked
      with the attribute ((packed)).
      
      The compiler currently does not know about the alignment of the memory
      layout, and will create strb and ldrb operations.
      
      The Datasheet of the synopsys core describes, that some operations on
      the mapped memory need to be atomic double word operations. I.e. the
      next pointer addressing in the qhead, as otherwise the hardware will
      read wrong data and totally stuck.
      
      This is also possible while working with the current active td queue,
      and preparing the td->ptr.next in software while the hardware is still
      working with the current active td which is supposed to be changed:
      
      writeb(0xde, &td->ptr.next + 0x0); /* strb */
      writeb(0xad, &td->ptr.next + 0x1); /* strb */
      
      <----- hardware reads value of td->ptr.next and get stuck!
      
      writeb(0xbe, &td->ptr.next + 0x2); /* strb */
      writeb(0xef, &td->ptr.next + 0x3); /* strb */
      
      This appeares on armv5 machines where the hardware does not support
      unaligned 32bit operations.
      
      This patch adds the attribute ((aligned(4))) to the structures to tell
      the compiler to use 32bit operations. It also adds an wmb() for the
      prepared TD data before it gets enqueued into the qhead.
      
      Cc: stable <stable@vger.kernel.org> # v3.5
      Signed-off-by: NMichael Grzeschik <m.grzeschik@pengutronix.de>
      Reviewed-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NAlexander Shishkin <alexander.shishkin@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a9c17430
  2. 04 4月, 2013 5 次提交
  3. 03 4月, 2013 29 次提交
  4. 02 4月, 2013 1 次提交
    • F
      usb: gadget: pxa27x_udc: fix Section Mismatches · 50757b24
      Felipe Balbi 提交于
      Remove all section annotations to fix the
      following section mismatches:
      
      >> WARNING: drivers/usb/gadget/pxa27x_udc.o(.text+0x597c): Section mismatch in
      reference from the function .pxa_udc_probe() to the function
      .init.text:.udc_init_data.constprop.11()
         The function .pxa_udc_probe() references
         the function __init .udc_init_data.constprop.11().
         This is often because .pxa_udc_probe lacks a __init
         annotation or the annotation of .udc_init_data.constprop.11 is wrong.
      --
      >> WARNING: drivers/usb/gadget/pxa27x_udc.o(.text+0x5a04): Section mismatch in
      reference from the function .pxa_udc_probe() to the function
      .init.text:.pxa_ep_setup()
         The function .pxa_udc_probe() references
         the function __init .pxa_ep_setup().
         This is often because .pxa_udc_probe lacks a __init
         annotation or the annotation of .pxa_ep_setup is wrong.
      Reported-by: NFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      50757b24