1. 16 8月, 2013 1 次提交
    • G
      Merge tag 'for-usb-next-2013-08-15' of... · 224563b6
      Greg Kroah-Hartman 提交于
      Merge tag 'for-usb-next-2013-08-15' of git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-next
      
      Sarah writes:
      
      xhci: Platform updates, 64-bit DMA, and trace events for 3.12.
      
      Hi Greg,
      
      This pull request includes one new feature for the xhci-plat driver (device
      tree support).  Felipe was fine with the patch last I checked, but hadn't
      provided an official Acked-by line.
      
      This pull request also includes 13 patches from my FOSS Outreach Program for
      Women (OPW) intern, Xenia.  She fixed a bug in the xHCI driver so that the
      driver can allocate 64-bit consistent DMA, converted the driver to use dynamic
      debugging, and added a bunch of new trace events for the xHCI driver.  The
      python plugin for trace-cmd should be up on git hub shortly, although the trace
      events are usable without it.
      
      I'm very happy with the progress that Xenia has made, and I look forward to her
      future contributions to the Linux kernel.
      
      Sarah Sharp
      224563b6
  2. 15 8月, 2013 34 次提交
  3. 14 8月, 2013 5 次提交
    • X
      xhci: fix dma mask setup in xhci.c · c10cf118
      Xenia Ragiadakou 提交于
      The function dma_set_mask() tests internally whether the dma_mask pointer
      for the device is initialized and fails if the dma_mask pointer is NULL.
      On pci platforms, the device dma_mask pointer is initialized, when pci
      devices are enumerated, to point to the pci_dev->dma_mask which is 0xffffffff.
      However, for non-pci platforms, the dma_mask pointer may not be initialized
      and in that case dma_set_mask() will fail.
      
      This patch initializes the dma_mask and the coherent_dma_mask to 32bits
      in xhci_plat_probe(), before the call to usb_create_hcd() that sets the
      "uses_dma" flag for the usb bus and the call to usb_add_hcd() that creates
      coherent dma pools for the usb hcd.
      
      Moreover, a call to dma_set_mask() does not set the device coherent_dma_mask.
      Since the xhci-hcd driver calls dma_alloc_coherent() and dma_pool_alloc()
      to allocate consistent DMA memory blocks, the coherent DMA address mask
      has to be set explicitly.
      
      This patch sets the coherent_dma_mask to 64bits in xhci_gen_setup() when
      the xHC is capable for 64-bit DMA addressing.
      
      If dma_set_mask() succeeds, for a given bitmask, it is guaranteed that
      the given bitmask is also supported for consistent DMA mappings.
      
      Other changes introduced in this patch are:
      
      - The return value of dma_set_mask() is checked to ensure that the required
        dma bitmask conforms with the host system's addressing capabilities.
      
      - The dma_mask setup code for the non-primary hcd was removed since both
        primary and non-primary hcd refer to the same generic device whose
        dma_mask and coherent_dma_mask are already set during the setup of
        the primary hcd.
      
      - The code for reading the HCCPARAMS register to find out the addressing
        capabilities of xHC was removed since its value is already cached in
        xhci->hccparams.
      
      - hcd->self.controller was replaced with the dev variable since it is
        already available.
      Signed-off-by: NXenia Ragiadakou <burzalodowa@gmail.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      c10cf118
    • X
      xhci: trace debug statements related to ring expansion · 68ffb011
      Xenia Ragiadakou 提交于
      This patch defines a new trace event, which is called xhci_dbg_ring_expansion
      and belongs to the event class xhci_log_msg, and adds tracepoints that trace
      the debug messages associated with the expansion of endpoint ring when there
      is not enough space allocated to hold all pending TRBs.
      Signed-off-by: NXenia Ragiadakou <burzalodowa@gmail.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      68ffb011
    • X
      xhci: trace debug messages related to driver initialization and unload · d195fcff
      Xenia Ragiadakou 提交于
      This patch defines a new trace event, which is called xhci_dbg_init
      and belongs to the event class xhci_log_msg, and adds tracepoints that
      trace the debug statements in the functions used to start and stop the
      xhci-hcd driver.
      
      Also, it removes an unnecessary cast of variable val to unsigned int
      in xhci_mem_init(), since val is already declared as unsigned int.
      Signed-off-by: NXenia Ragiadakou <burzalodowa@gmail.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      d195fcff
    • X
      xhci: trace debug statements for urb cancellation · aa50b290
      Xenia Ragiadakou 提交于
      This patch defines a new trace event, which is called xhci_dbg_cancel_urb
      and belongs to the event class xhci_log_msg, and adds tracepoints that
      trace the debug messages related to the removal of a cancelled URB from
      the endpoint's transfer ring.
      Signed-off-by: NXenia Ragiadakou <burzalodowa@gmail.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      aa50b290
    • X
      xhci: add xhci_cmd_completion trace event · 63a23b9a
      Xenia Ragiadakou 提交于
      This patch creates a new event class, called xhci_log_event,
      and defines the xhci_cmd_completion trace event used for
      tracing the commands issued to xHC that generate a completion
      event in the event ring.
      
      This info can be used, later, to print, in a human readable
      way, the completion status and flags as well as the command's
      type and fields using the trace-cmd tool and the appropriate
      plugin.
      
      Also, a tracepoint is added in handle_cmd_completion().
      Signed-off-by: NXenia Ragiadakou <burzalodowa@gmail.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      63a23b9a