1. 25 1月, 2017 21 次提交
  2. 20 1月, 2017 1 次提交
  3. 19 1月, 2017 11 次提交
    • C
      usb: xhci-mtk: add reference clock · 9c4afd42
      Chunfeng Yun 提交于
      usually, the reference clock comes from 26M oscillator directly,
      but some SoCs are not, add it for compatibility.
      Signed-off-by: NChunfeng Yun <chunfeng.yun@mediatek.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9c4afd42
    • C
      usb: mtu3: add reference clock · 4d70d0c6
      Chunfeng Yun 提交于
      usually, the reference clock comes from 26M oscillator directly,
      but some SoCs are not, add it for compatibility.
      Signed-off-by: NChunfeng Yun <chunfeng.yun@mediatek.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4d70d0c6
    • C
      usb: mtu3: get resources that cause deferred probe earlier · 5cbf2d69
      Chunfeng Yun 提交于
      Some resources such as regulator, clock usually cause deferred
      probe, get them earlier to avoid more ineffective processing.
      Signed-off-by: NChunfeng Yun <chunfeng.yun@mediatek.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5cbf2d69
    • W
      usb: host: xhci: plat: check hcc_params after add hcd · 5de4e1ea
      William wu 提交于
      The commit 4ac53087 ("usb: xhci: plat: Create both
      HCDs before adding them") move add hcd to the end of
      probe, this cause hcc_params uninitiated, because xHCI
      driver sets hcc_params in xhci_gen_setup() called from
      usb_add_hcd().
      
      This patch checks the Maximum Primary Stream Array Size
      in the hcc_params register after add primary hcd.
      Signed-off-by: NWilliam wu <william.wu@rock-chips.com>
      Acked-by: NRoger Quadros <rogerq@ti.com>
      Cc: stable <stable@vger.kernel.org> # 4.2+
      Fixes: 4ac53087 ("usb: xhci: plat: Create both HCDs before adding them")
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5de4e1ea
    • B
      usb: host: constify dev_pm_ops structures · fd7723e2
      Bhumika Goyal 提交于
      Declare dev_pm_ops structures as const as they are only stored in the pm
      field of a device_driver structure. This field is of type const, so
      dev_pm_ops structures having similar properties can be declared const
      too.
      
      Size details after cross compiling the .o file for powerpc
      architecture.
      
      File size before:
         text	   data	    bss	    dec	    hex	filename
         3183	    372	      0	   3555	    de3	drivers/usb/host/ehci-fsl.o
      
      File size after:
         text	   data	    bss	    dec	    hex	filename
         3275	    280	      0	   3555	    de3	drivers/usb/host/ehci-fsl.o
      Signed-off-by: NBhumika Goyal <bhumirks@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      fd7723e2
    • B
      usb: isp1760: constify usb_gadget_ops structures · 3774e02c
      Bhumika Goyal 提交于
      Declare usb_gadget_ops structures as const as they are only stored in
      the ops field of a usb_gadget structure. This field is of type const, so
      usb_gadget_ops structures having this property can be declared const
      too.
      Done using Coccinelle:
      
      @r1 disable optional_qualifier@
      identifier i;
      position p;
      @@
      static struct usb_gadget_ops i@p={...};
      
      @ok1@
      identifier r1.i;
      position p;
      struct isp1760_udc udc;
      @@
      udc.gadget.ops=&i@p
      
      @bad@
      position p!={r1.p,ok1.p};
      identifier r1.i;
      @@
      i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r1.i;
      @@
      +const
      struct usb_gadget_ops i;
      
      File size before: drivers/usb/isp1760/isp1760-udc.o
         text	   data	    bss	    dec	    hex	filename
        12434	   4136	     16	  16586	   40ca	usb/isp1760/isp1760-udc.o
      
      File size after: drivers/usb/isp1760/isp1760-udc.o
         text	   data	    bss	    dec	    hex	filename
        12530	   4048	     16	  16594	   40d2	usb/isp1760/isp1760-udc.o
      Signed-off-by: NBhumika Goyal <bhumirks@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3774e02c
    • B
      usb: gadget: constify usb_gadget_ops structures · 5954a504
      Bhumika Goyal 提交于
      Declare usb_gadget_ops structures as const as they are only stored in
      the ops field of a usb_gadget structure. This field is of type const, so
      usb_gadget_ops structures having this property can be declared const
      too.
      Done using Coccinelle:
      
      @r1 disable optional_qualifier@
      identifier i;
      position p;
      @@
      static struct usb_gadget_ops i@p={...};
      
      @ok1@
      identifier r1.i;
      position p;
      struct fotg210_udc fotg210;
      @@
      fotg210.gadget.ops=&i@p
      
      @bad@
      position p!={r1.p,ok1.p};
      identifier r1.i;
      @@
      i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r1.i;
      @@
      +const
      struct usb_gadget_ops i;
      
      File size before:
         text	   data	    bss	    dec	    hex	filename
         7559	    384	      8	   7951	   1f0f	usb/gadget/udc/fotg210-udc.o
      
      File size after:
         text	   data	    bss	    dec	    hex	filename
         7655	    288	      8	   7951	   1f0f	usb/gadget/udc/fotg210-udc.o
      Signed-off-by: NBhumika Goyal <bhumirks@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5954a504
    • W
      usb: hcd: initialize hcd->flags to 0 when rm hcd · 76b8db0d
      William wu 提交于
      On some platforms(e.g. rk3399 board), we can call hcd_add/remove
      consecutively without calling usb_put_hcd/usb_create_hcd in between,
      so hcd->flags can be stale.
      
      If the HC dies due to whatever reason then without this patch we get
      the below error on next hcd_add.
      
      [173.296154] xhci-hcd xhci-hcd.2.auto: HC died; cleaning up
      [173.296209] xhci-hcd xhci-hcd.2.auto: xHCI Host Controller
      [173.296762] xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 6
      [173.296931] usb usb6: We don't know the algorithms for LPM for this host, disabling LPM.
      [173.297179] usb usb6: New USB device found, idVendor=1d6b, idProduct=0003
      [173.297203] usb usb6: New USB device strings: Mfr=3, Product=2, SerialNumber=1
      [173.297222] usb usb6: Product: xHCI Host Controller
      [173.297240] usb usb6: Manufacturer: Linux 4.4.21 xhci-hcd
      [173.297257] usb usb6: SerialNumber: xhci-hcd.2.auto
      [173.298680] hub 6-0:1.0: USB hub found
      [173.298749] hub 6-0:1.0: 1 port detected
      [173.299382] rockchip-dwc3 usb@fe800000: USB HOST connected
      [173.395418] hub 5-0:1.0: activate --> -19
      [173.603447] irq 228: nobody cared (try booting with the "irqpoll" option)
      [173.603493] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.4.21 #9
      [173.603513] Hardware name: Google Kevin (DT)
      [173.603531] Call trace:
      [173.603568] [<ffffffc0002087dc>] dump_backtrace+0x0/0x160
      [173.603596] [<ffffffc00020895c>] show_stack+0x20/0x28
      [173.603623] [<ffffffc0004b28a8>] dump_stack+0x90/0xb0
      [173.603650] [<ffffffc00027347c>] __report_bad_irq+0x48/0xe8
      [173.603674] [<ffffffc0002737cc>] note_interrupt+0x1e8/0x28c
      [173.603698] [<ffffffc000270a38>] handle_irq_event_percpu+0x1d4/0x25c
      [173.603722] [<ffffffc000270b0c>] handle_irq_event+0x4c/0x7c
      [173.603748] [<ffffffc00027456c>] handle_fasteoi_irq+0xb4/0x124
      [173.603777] [<ffffffc00026fe3c>] generic_handle_irq+0x30/0x44
      [173.603804] [<ffffffc0002701a8>] __handle_domain_irq+0x90/0xbc
      [173.603827] [<ffffffc0002006f4>] gic_handle_irq+0xcc/0x188
      ...
      [173.604500] [<ffffffc000203700>] el1_irq+0x80/0xf8
      [173.604530] [<ffffffc000261388>] cpu_startup_entry+0x38/0x3cc
      [173.604558] [<ffffffc00090f7d8>] rest_init+0x8c/0x94
      [173.604585] [<ffffffc000e009ac>] start_kernel+0x3d0/0x3fc
      [173.604607] [<0000000000b16000>] 0xb16000
      [173.604622] handlers:
      [173.604648] [<ffffffc000642084>] usb_hcd_irq
      [173.604673] Disabling IRQ #228
      Signed-off-by: NWilliam wu <wulf@rock-chips.com>
      Acked-by: NRoger Quadros <rogerq@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      76b8db0d
    • S
      usb: storage: ene_ub6250: remove unused variable · 58268de5
      Sudip Mukherjee 提交于
      The variable Newblk was only being assigned some value but was never
      used after that.
      Signed-off-by: NSudip Mukherjee <sudip.mukherjee@codethink.co.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      58268de5
    • S
      usb: host: oxu210hp-hcd: remove unused variable · 51c7629e
      Sudip Mukherjee 提交于
      The variable live was assigned the host controller running status but
      it was never used or checked after that.
      Signed-off-by: NSudip Mukherjee <sudip.mukherjee@codethink.co.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      51c7629e
    • J
      usb: core: update comments for send message functions · 123b7b30
      Jaejoong Kim 提交于
      The commonly use of bottom halves are tasklet and workqueue. The big
      difference between tasklet and workqueue is that the tasklet runs in
      an interrupt context and the workqueue runs in a process context,
      which means it can sleep if need be.
      
      The comment for usb_control/interrupt/bulk_msg() functions note that do
      not use this function within an interrupt context, like a 'bottom half'
      handler. With this comment, it makes confuse about usage of these
      functions.
      
      To more clarify, remove 'bottom half' comment.
      Signed-off-by: NJaejoong Kim <climbbb.kim@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      123b7b30
  4. 16 1月, 2017 2 次提交
  5. 12 1月, 2017 5 次提交