1. 20 1月, 2015 3 次提交
  2. 15 1月, 2015 11 次提交
    • M
      usb: musb: debugfs: improve copy_from_user() argument · fe198e34
      Markus Pargmann 提交于
      While the code is correct and functions well, it's still
      a bit misleading to add the reference operator in from of
      the buf argument.
      
      This patch simply removes that operator in order to make
      use of buf slightly better to the eyes.
      Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      fe198e34
    • R
      usb: gadget: f_fs: add "no_disconnect" mode · 18d6b32f
      Robert Baldyga 提交于
      Since we can compose gadgets from many functions, there is the problem
      related to gadget breakage while FunctionFS daemon being closed. FFS
      function is userspace code so there is no way to know when it will close
      files (it doesn't matter what is the reason of this situation, it can
      be daemon logic, program breakage, process kill or any other). So when
      we have another function in gadget which, for example, sends some amount
      of data, does some software update or implements some real-time functionality,
      we may want to keep the gadget connected despite FFS function is no longer
      functional.
      
      We can't just remove one of functions from gadget since it has been
      enumerated, so the only way to keep entire gadget working is to make
      broken FFS function deactivated but still visible to host. For this
      purpose this patch introduces "no_disconnect" mode. It can be enabled
      by setting mount option "no_disconnect=1", and results with defering
      function disconnect to the moment of reopen ep0 file or filesystem
      unmount. After closing all endpoint files, FunctionFS is set to state
      FFS_DEACTIVATED.
      
      When ffs->state == FFS_DEACTIVATED:
      - function is still bound and visible to host,
      - setup requests are automatically stalled,
      - transfers on other endpoints are refused,
      - epfiles, except ep0, are deleted from the filesystem,
      - opening ep0 causes the function to be closed, and then FunctionFS
        is ready for descriptors and string write,
      - altsetting change causes the function to be closed - we want to keep
        function alive until another functions are potentialy used, altsetting
        change means that another configuration is being selected or USB cable
        was unplugged, which indicates that we don't need to stay longer in
        FFS_DEACTIVATED state
      - unmounting of the FunctionFS instance causes the function to be closed.
      Tested-by: NDavid Cohen <david.a.cohen@linux.intel.com>
      Acked-by: NMichal Nazarewicz <mina86@mina86.com>
      Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      18d6b32f
    • H
      usb: dwc3: pci: code cleanup · 2cd9ddf7
      Heikki Krogerus 提交于
      Removing a few items that are not needed anymore and
      adding separate function for quirks.
      Acked-by: NHuang Rui <ray.huang@amd.com>
      Signed-off-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      2cd9ddf7
    • H
      usb: dwc3: pci: rely on default PM callbacks from PCI driver utility · 3b44ed90
      Heikki Krogerus 提交于
      There is nothing specific being done in the suspend and
      resume callbacks that is not already taken care of in PCI
      driver core, so dropping the functions.
      Acked-by: NHuang Rui <ray.huang@amd.com>
      Signed-off-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      3b44ed90
    • H
      usb: dwc3: pci: remove registration of NOP PHYs · d3fdcc78
      Heikki Krogerus 提交于
      None of the PCI platforms need the NOP transceivers, and
      since we can now live without the PHYs, removing
      registration of the platform devices for them.
      Acked-by: NHuang Rui <ray.huang@amd.com>
      Signed-off-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      d3fdcc78
    • K
      usb: gadget: uvc: to_uvcg_control_header() can be static · f093a2d4
      kbuild test robot 提交于
      drivers/usb/gadget/function/uvc_configfs.c:46:28: sparse: symbol 'to_uvcg_control_header' was not declared. Should it be static?
      drivers/usb/gadget/function/uvc_configfs.c:138:25: sparse: symbol 'uvcg_control_header_type' was not declared. Should it be static?
      drivers/usb/gadget/function/uvc_configfs.c:164:6: sparse: symbol 'uvcg_control_header_drop' was not declared. Should it be static?
      drivers/usb/gadget/function/uvc_configfs.c:721:20: sparse: symbol 'to_uvcg_format' was not declared. Should it be static?
      drivers/usb/gadget/function/uvc_configfs.c:798:30: sparse: symbol 'to_uvcg_streaming_header' was not declared. Should it be static?
      drivers/usb/gadget/function/uvc_configfs.c:950:25: sparse: symbol 'uvcg_streaming_header_type' was not declared. Should it be static?
      drivers/usb/gadget/function/uvc_configfs.c:976:6: sparse: symbol 'uvcg_streaming_header_drop' was not declared. Should it be static?
      drivers/usb/gadget/function/uvc_configfs.c:1020:19: sparse: symbol 'to_uvcg_frame' was not declared. Should it be static?
      drivers/usb/gadget/function/uvc_configfs.c:1265:25: sparse: symbol 'uvcg_frame_type' was not declared. Should it be static?
      drivers/usb/gadget/function/uvc_configfs.c:1315:6: sparse: symbol 'uvcg_frame_drop' was not declared. Should it be static?
      drivers/usb/gadget/function/uvc_configfs.c:1338:26: sparse: symbol 'to_uvcg_uncompressed' was not declared. Should it be static?
      drivers/usb/gadget/function/uvc_configfs.c:1548:25: sparse: symbol 'uvcg_uncompressed_type' was not declared. Should it be static?
      drivers/usb/gadget/function/uvc_configfs.c:1586:6: sparse: symbol 'uvcg_uncompressed_drop' was not declared. Should it be static?
      drivers/usb/gadget/function/uvc_configfs.c:1610:19: sparse: symbol 'to_uvcg_mjpeg' was not declared. Should it be static?
      drivers/usb/gadget/function/uvc_configfs.c:1761:25: sparse: symbol 'uvcg_mjpeg_type' was not declared. Should it be static?
      drivers/usb/gadget/function/uvc_configfs.c:1793:6: sparse: symbol 'uvcg_mjpeg_drop' was not declared. Should it be static?
      Signed-off-by: NFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      f093a2d4
    • R
      usb: gadget: net2280: Dont use 0 as NULL pointer · fc12c68b
      Ricardo Ribalda Delgado 提交于
      Fix sparse warning
      
      Fixes: cb442ee1 (usb: gadget: udc: net2280: Re-enable dynamic debug messages)
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: NRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      fc12c68b
    • P
      usb: gadget: u_uac1: fix one code style problem · c76abecc
      Peter Chen 提交于
      Fix one code style problem.
      Signed-off-by: NPeter Chen <peter.chen@freescale.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      c76abecc
    • P
      usb: gadget: uac1: struct gaudio is useless for struct f_uac1_opts · 3703cfe7
      Peter Chen 提交于
      Since we call gaudio_cleanup at f_audio_free, the f_uac1_opts
      doesn't need to use gaudio any more.
      Signed-off-by: NPeter Chen <peter.chen@freescale.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      3703cfe7
    • A
      usb: dwc3: gadget: Stop TRB preparation after limit is reached · 39e60635
      Amit Virdi 提交于
      DWC3 gadget sets up a pool of 32 TRBs for each EP during initialization. This
      means, the max TRBs that can be submitted for an EP is fixed to 32. Since the
      request queue for an EP is a linked list, any number of requests can be queued
      to it by the gadget layer.  However, the dwc3 driver must not submit TRBs more
      than the pool it has created for. This limit wasn't respected when SG was used
      resulting in submitting more than the max TRBs, eventually leading to
      non-transfer of the TRBs submitted over the max limit.
      
      Root cause:
      When SG is used, there are two loops iterating to prepare TRBs:
       - Outer loop over the request_list
       - Inner loop over the SG list
      The code was missing break to get out of the outer loop.
      
      Fixes: eeb720fb (usb: dwc3: gadget: add support for SG lists)
      Cc: <stable@vger.kernel.org> # v3.9+
      Signed-off-by: NAmit Virdi <amit.virdi@st.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      39e60635
    • A
      usb: dwc3: gadget: Fix TRB preparation during SG · ec512fb8
      Amit Virdi 提交于
      When scatter gather (SG) is used, multiple TRBs are prepared from one DWC3
      request (dwc3_request). So while preparing TRBs, the 'last' flag should be set
      only when it is the last TRB being prepared from the last dwc3_request entry.
      
      The current implementation uses list_is_last to check if the dwc3_request is the
      last entry from the request_list. However, list_is_last returns false for the
      last entry too. This is because, while preparing the first TRB from a request,
      the function dwc3_prepare_one_trb modifies the request's next and prev pointers
      while moving the URB to req_queued. Hence, list_is_last always returns false no
      matter what.
      
      The correct way is not to access the modified pointers of dwc3_request but to
      use list_empty macro instead.
      
      Fixes: e5ba5ec8 (usb: dwc3: gadget: fix scatter gather implementation)
      Signed-off-by: NAmit Virdi <amit.virdi@st.com>
      Cc: <stable@vger.kernel.org> # v3.9+
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      ec512fb8
  3. 13 1月, 2015 26 次提交