1. 14 8月, 2013 14 次提交
    • 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
    • X
      xhci: add xhci_address_ctx trace event · 1d27fabe
      Xenia Ragiadakou 提交于
      This patch defines a new event class, called xhci_log_ctx,
      that records in the ring buffer the context data, the
      context type (input or output), the context dma and virtual
      addresses, the context endpoint entries, the slot ID and
      whether the xHC uses 64 byte context data structures.
      
      This information can be used, later, to parse and display
      the context data fields with the appropriate plugin using
      the trace-cmd tool.
      
      Also, this patch defines a trace event, called xhci_address_ctx,
      to trace the contexts related to the Address Device command and
      adds the associated tracepoints in xhci_address_device().
      Signed-off-by: NXenia Ragiadakou <burzalodowa@gmail.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      1d27fabe
    • X
      xhci: add trace for debug messages related to endpoint reset · a0254324
      Xenia Ragiadakou 提交于
      This patch defines a new trace event, which is called xhci_dbg_reset_ep
      and belongs in the event class xhci_log_msg, and adds tracepoints that
      trace the debug messages associated with resetting an endpoint after
      the reception of a STALL packet.
      Signed-off-by: NXenia Ragiadakou <burzalodowa@gmail.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      a0254324
    • X
      xhci: add trace for debug messages related to quirks · 4bdfe4c3
      Xenia Ragiadakou 提交于
      This patch defines a new trace event, which is called xhci_dbg_quirks
      and belongs in the event class xhci_log_msg, and adds tracepoints that
      trace the debug messages associated with xHCs' quirks.
      Signed-off-by: NXenia Ragiadakou <burzalodowa@gmail.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      4bdfe4c3
    • X
      xhci: add trace for debug messages related to changing contexts · 3a7fa5be
      Xenia Ragiadakou 提交于
      This patch defines a new trace event, which is called xhci_dbg_context_change
      and belongs in the event class xhci_log_msg, and adds tracepoints for tracing
      the debug messages related to context updates performed with Configure Endpoint
      and Evaluate Context commands.
      Signed-off-by: NXenia Ragiadakou <burzalodowa@gmail.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      3a7fa5be
    • X
      xhci: add traces for debug messages in xhci_address_device() · 84a99f6f
      Xenia Ragiadakou 提交于
      This patch declares an event class for trace events that
      trace messages with variadic arguments, called xhci_log_msg,
      and defines a trace event for tracing the debug messages in
      xhci_address_device() function, called xhci_dbg_address.
      
      In order to implement this type of trace events, a wrapper function,
      called xhci_dbg_trace(), was created that records the format string
      and variadic arguments into a va_format structure which is passed as
      argument to the tracepoints of the class xhci_log_msg.
      
      All the xhci_dbg() calls in xhci_address_device() are replaced
      with calls to xhci_dbg_trace(). The functionality of xhci_dbg()
      log messages was not removed though, but it is placed inside
      xhci_dbg_trace().
      
      This trace event aims to give the ability to the user or the
      developper to isolate and trace the debug messages generated
      when an Address Device Command is issued to xHC.
      Signed-off-by: NXenia Ragiadakou <burzalodowa@gmail.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      84a99f6f
    • X
      xhci: remove CONFIG_USB_XHCI_HCD_DEBUGGING and unused code · b2497509
      Xenia Ragiadakou 提交于
      CONFIG_USB_XHCI_HCD_DEBUGGING option is used to enable
      verbose debugging output for the xHCI host controller
      driver.
      
      In the current version of the xhci-hcd driver, this
      option must be turned on, in order for the debugging
      log messages to be displayed, and users may need to
      recompile the linux kernel to obtain debugging
      information that will help them track down problems.
      
      This patch removes the above debug option to enable
      debugging log messages at all times.
      The aim of this is to rely on the debugfs and the
      dynamic debugging feature for fine-grained management
      of debugging messages and to not force users to set
      the debug config option and compile the linux kernel
      in order to have access in that information.
      
      This patch, also, removes the XHCI_DEBUG symbol and the
      functions dma_to_stream_ring(), xhci_test_radix_tree()
      and xhci_event_ring_work() that are not useful anymore.
      Signed-off-by: NXenia Ragiadakou <burzalodowa@gmail.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      b2497509
    • X
      xhci: replace printk(KERN_DEBUG ...) · 5c1127d3
      Xenia Ragiadakou 提交于
      This patch replaces the calls to printk(KERN_DEBUG ...)
      with either calls to xhci_dbg() or calls to pr_debug(),
      depending on whether the xhci_hcd structure is available
      at callsite, so that the correspoding debugging messages
      are not enabled by default when CONFIG_DYNAMIC_DEBUG option
      is set but rather can be enabled dynamically taking advantage
      of the dynamic debugging feature.
      
      Also, it adds a newline at the end of debugging messages in
      case there is not, so that messages don't appear broken
      when printed.
      Signed-off-by: NXenia Ragiadakou <burzalodowa@gmail.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      5c1127d3
    • X
      xhci: replace xhci_info() with xhci_dbg() · 38a532a6
      Xenia Ragiadakou 提交于
      This patch replaces the calls to xhci_info() with calls to
      xhci_dbg() and removes the unused xhci_info() definition
      from xhci-hcd.
      
      By replacing the xhci_info() with xhci_dbg(), the calls to
      dev_info() are replaced with calls to dev_dbg() so that
      their output can be dynamically controlled via the dynamic
      debugging mechanism.
      Signed-off-by: NXenia Ragiadakou <burzalodowa@gmail.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      38a532a6
    • A
      usb: Add Device Tree support to XHCI Platform driver · 1fe6c452
      Al Cooper 提交于
      Add Device Tree match table to xhci-plat.c. Add DT bindings document.
      Signed-off-by: NAl Cooper <alcooperx@gmail.com>
      Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Cc: Felipe Balbi <balbi@ti.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      1fe6c452
  2. 05 8月, 2013 6 次提交
  3. 04 8月, 2013 14 次提交
  4. 03 8月, 2013 6 次提交