1. 19 6月, 2014 9 次提交
    • A
      usb: gadget: OS descriptors configfs cleanup · fe00b138
      Andrzej Pietrasiewicz 提交于
      A number of variables serve a generic purpose of handling
      "compatible id" and "subcompatible id", but the names suggest they
      are for rndis only. Rename to reflect variables' purpose.
      Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      fe00b138
    • M
      usb: gadget: f_fs: fix NULL pointer dereference when there are no strings · f0688c8b
      Michal Nazarewicz 提交于
      If the descriptors do not need any strings and user space sends empty
      set of strings, the ffs->stringtabs field remains NULL.  Thus
      *ffs->stringtabs in functionfs_bind leads to a NULL pointer
      dereferenece.
      
      The bug was introduced by commit [fd7c9a00: “use usb_string_ids_n()”].
      
      While at it, remove double initialisation of lang local variable in
      that function.
      
      ffs->strings_count does not need to be checked in any way since in
      the above scenario it will remain zero and usb_string_ids_n() is
      a no-operation when colled with 0 argument.
      
      Cc: <stable@vger.kernel.org>  # v2.6.36+
      Signed-off-by: NMichal Nazarewicz <mina86@mina86.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      f0688c8b
    • L
      usb: musb: ux500: don't propagate the OF node · 82363cf2
      Linus Walleij 提交于
      There is a regression in the upcoming v3.16-rc1, that is caused
      by a problem that has been around for a while but now finally
      hangs the system. The bootcrawl looks like this:
      
      pinctrl-nomadik soc:pinctrl: pin GPIO256_AF28 already
      requested by a03e0000.usb_per5; cannot claim for musb-hdrc.0.auto
      pinctrl-nomadik soc:pinctrl: pin-256 (musb-hdrc.0.auto) status -22
      pinctrl-nomadik soc:pinctrl: could not request pin 256
      (GPIO256_AF28) from group usb_a_1  on device pinctrl-nomadik
      musb-hdrc musb-hdrc.0.auto: Error applying setting, reverse
      things back
      HS USB OTG: no transceiver configured
      musb-hdrc musb-hdrc.0.auto: musb_init_controller failed
      with status -517
      platform musb-hdrc.0.auto: Driver musb-hdrc requests
      probe deferral
      (...)
      
      The ux500 MUSB driver propagates the OF node to the dynamically
      created musb-hdrc device, which is incorrect as it makes the OF
      core believe there are two devices spun from the very same
      DT node, which confuses other parts of the device core, notably
      the pin control subsystem, which will try to apply all the pin
      control settings also to the HDRC device as it gets
      instantiated. (The OMAP2430 for example, does not set the
      of_node member.)
      
      Cc: <stable@vger.kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Acked-by: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      82363cf2
    • K
      usb: renesas: gadget: fixup: complete STATUS stage after receiving · 3fe15505
      Kuninori Morimoto 提交于
      Current usbhs gadget driver didn't complete STATUS stage after receiving.
      It wasn't problem for us before, because some USB class doesn't use
      DATA OUT stage in control transfer.
      But, it is required on some device.
      Signed-off-by: NYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
      Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      3fe15505
    • J
      usb: gadget: u_ether: synchronize with transmit when stopping queue · a9232076
      Jeff Westfahl 提交于
      When disconnecting, it's possible that another thread has already made it
      into eth_start_xmit before we call netif_stop_queue. This can lead to a
      crash as eth_start_xmit tries to use resources that gether_disconnect is
      freeing. Use netif_tx_lock/unlock around netif_stop_queue to ensure no
      threads are executing during the remainder of gether_disconnect.
      Signed-off-by: NJeff Westfahl <jeff.westfahl@ni.com>
      Tested-by: NJaeden Amero <jaeden.amero@ni.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      a9232076
    • G
      usb: dwc3: dwc3-omap: Disable/Enable only wrapper interrupts in prepare/complete · 02dae36a
      George Cherian 提交于
      The dwc3 wrapper driver should not be fiddling with the core interrupts.
      Disabling the core interrupts in prepare stops xhci from proper operation.
      So remove disable/enable of core interrupts from prepare/complete.
      Signed-off-by: NGeorge Cherian <george.cherian@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      02dae36a
    • G
      usb: dwc3: dwc3-omap: Fix the crash on module removal · c5a1fbca
      George Cherian 提交于
      Following crash is seen on dwc3_omap removal
      Unable to handle kernel NULL pointer dereference at virtual address 00000018
      pgd = ec098000
      [00000018] *pgd=ad1f9831, *pte=00000000, *ppte=00000000
      Internal error: Oops: 17 [#1] SMP ARM
      Modules linked in: usb_f_ss_lb g_zero usb_f_acm u_serial usb_f_ecm u_ether libcomposite configfs snd_usb_audio snd_usbmidi_lib snd_rawmidi snd_hwdep snd_soc_omap snd_pcm_dmaengine snd_soc_core snd_compress snd_pcm snd_tim]
      CPU: 0 PID: 1296 Comm: rmmod Tainted: G        W     3.15.0-rc4-02716-g95c4e18-dirty #10
      task: ed05a080 ti: ec368000 task.ti: ec368000
      PC is at release_resource+0x14/0x7c
      LR is at release_resource+0x10/0x7c
      pc : [<c0044724>]    lr : [<c0044720>]    psr: 60000013
      sp : ec369ec0  ip : 60000013  fp : 00021008
      r10: 00000000  r9 : ec368000  r8 : c000e7a4
      r7 : 00000081  r6 : bf0062c0  r5 : ed7cd000  r4 : ed7d85c0
      r3 : 00000000  r2 : 00000000  r1 : 00000011  r0 : c086d08c
      Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
      Control: 10c5387d  Table: ac098059  DAC: 00000015
      Process rmmod (pid: 1296, stack limit = 0xec368248)
      Stack: (0xec369ec0 to 0xec36a000)
      9ec0: 00000000 00000001 ed7cd000 c034de94 ed7cd010 ed7cd000 00000000 c034e194
      9ee0: 00000000 bf0062cc ed7cd010 c03490b0 ed154cc0 ed4c2570 ed2b8410 ed156810
      ed156810 bf006d24 c034db9c c034db84 c034c518
      9f20: bf006d24 ed156810 bf006d24 c034cd2c bf006d24 bf006d68 00000800 c034c340
      9f40: 00000000 c00a9e5c 00000020 00000000 bf006d68 00000800 ec369f4c 33637764
      9f60: 616d6f5f 00000070 00000001 ec368000 ed05a080 c000e670 00000001 c0084010
      9f80: 00021088 00000800 00021088 00000081 80000010 0000e6f4 00021088 00000800
      9fa0: 00021088 c000e5e0 00021088 00000800 000210b8 00000800 e04f6d00 e04f6d00
      9fc0: 00021088 00000800 00021088 00000081 00000001 00000000 be91de08 00021008
      9fe0: 4d768880 be91dbb4 b6fc5984 4d76888c 80000010 000210b8 00000000 00000000
      [<c0044724>] (release_resource) from [<c034de94>] (platform_device_del+0x6c/0x9c)
      [<c034de94>] (platform_device_del) from [<c034e194>] (platform_device_unregister+0xc/0x18)
      [<c034e194>] (platform_device_unregister) from [<bf0062cc>] (dwc3_omap_remove_core+0xc/0x14 [dwc3_omap])
      [<bf0062cc>] (dwc3_omap_remove_core [dwc3_omap]) from [<c03490b0>] (device_for_each_child+0x34/0x74)
      [<c03490b0>] (device_for_each_child) from [<bf0062b4>] (dwc3_omap_remove+0x6c/0x78 [dwc3_omap])
      [<bf0062b4>] (dwc3_omap_remove [dwc3_omap]) from [<c034db9c>] (platform_drv_remove+0x18/0x1c)
      [<c034db9c>] (platform_drv_remove) from [<c034c518>] (__device_release_driver+0x70/0xc8)
      [<c034c518>] (__device_release_driver) from [<c034cd2c>] (driver_detach+0xb4/0xb8)
      [<c034cd2c>] (driver_detach) from [<c034c340>] (bus_remove_driver+0x4c/0x90)
      [<c034c340>] (bus_remove_driver) from [<c00a9e5c>] (SyS_delete_module+0x10c/0x198)
      [<c00a9e5c>] (SyS_delete_module) from [<c000e5e0>] (ret_fast_syscall+0x0/0x48)
      Code: e1a04000 e59f0068 eb14505e e5943010 (e5932018)
      ---[ end trace 7e2a8746ff4fc811 ]---
      Segmentation fault
      
      [ balbi@ti.com : add CONFIG_OF dependency ]
      Signed-off-by: NGeorge Cherian <george.cherian@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      c5a1fbca
    • D
      usb: gadget: f_rndis: fix an error code on allocation failure · 4683ae86
      Dan Carpenter 提交于
      This should be return -ENOMEM.  The current code returns successs.
      
      Fixes: de7a8d2d ('usb: gadget: f_rndis: OS descriptors support')
      Acked-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com>
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      4683ae86
    • Z
      usb: dwc3: gadget: check link trb after free_slot is increased · 5cd8c48d
      Zhuang Jin Can 提交于
      In ISOC transfers, when free_slot points to the last TRB (i.e. Link
      TRB), and all queued requests meet Missed Interval Isoc error, busy_slot
      points to trb0.
      	busy_slot->trb0
      		   trb1
      		   ...
      	free_slot->trb31(Link TRB)
      
      After end transfer and receiving the XferNotReady event, trb_left is
      caculated as 1 which is wrong, and no TRB will be primed to the
      endpoint.
      
      The root cause is free_slot is not increased the same way as busy_slot.
      When busy_slot is increased by one, it checks if points to a link TRB
      after increasement, but free_slot checks it before increasement.
      free_slot should behave the same as busy_slot to make the trb_left
      caculation correct.
      Reviewed-by: NPratyush Anand <pratyush.anand@st.com>
      Signed-off-by: NZhuang Jin Can <jin.can.zhuang@intel.com>
      Signed-off-by: NJiebing Li <jiebing.li@intel.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      5cd8c48d
  2. 15 6月, 2014 1 次提交
  3. 14 6月, 2014 2 次提交
  4. 13 6月, 2014 14 次提交
  5. 12 6月, 2014 14 次提交