1. 29 5月, 2013 3 次提交
  2. 17 5月, 2013 1 次提交
    • S
      USB: set device dma_mask without reference to global data · 3b9561e9
      Stephen Warren 提交于
      Many USB host drivers contain code such as:
      
      if (!pdev->dev.dma_mask)
              pdev->dev.dma_mask = &tegra_ehci_dma_mask;
      
      ... where tegra_ehci_dma_mask is a global. I suspect this code originated
      in commit 4a53f4e6 "USB: ehci-tegra: add probing through device tree" and
      was simply copied everywhere else.
      
      This works fine when the code is built-in, but can cause a crash when the
      code is in a module. The first module load sets up the dma_mask pointer,
      but if the module is removed and re-inserted, the value is now non-NULL,
      and hence is not updated to point at the new location, and hence points
      at a stale location within the previous module load address, which in
      turn causes a crash if the pointer is de-referenced.
      
      The simplest way of solving this seems to be to copy the code from
      ehci-platform.c, which uses the coherent_dma_mask as the target for the
      dma_mask pointer.
      Suggested-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Acked-by: NTony Prisk <linux@prisktech.co.nz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3b9561e9
  3. 15 5月, 2013 1 次提交
    • V
      usb: dwc3: Fix compilation break when building with USB_DWC3_DUAL_ROLE=y · 1bc0d926
      Vivek Gautam 提交于
      The commit:
      388e5c51 usb: dwc3: remove dwc3 dependency on host AND gadget
      breaks compilation when
      USB=y, USB_GADGET=m, USB_DWC3=y and USB_DWC3_DUAL_ROLE=y.
      
      drivers/built-in.o: In function `dwc3_gadget_giveback':
      drivers/usb/dwc3/gadget.c:271: undefined reference to `usb_gadget_unmap_request'
      drivers/built-in.o: In function `__dwc3_gadget_kick_transfer':
      drivers/usb/dwc3/gadget.c:1005: undefined reference to `usb_gadget_unmap_request'
      drivers/built-in.o: In function `__dwc3_gadget_ep_queue':
      drivers/usb/dwc3/gadget.c:1073: undefined reference to `usb_gadget_map_request'
      drivers/built-in.o: In function `dwc3_gadget_reset_interrupt':
      drivers/usb/dwc3/gadget.c:2165: undefined reference to `usb_gadget_set_state'
      drivers/built-in.o: In function `dwc3_gadget_init':
      drivers/usb/dwc3/gadget.c:2647: undefined reference to `usb_add_gadget_udc'
      drivers/built-in.o: In function `dwc3_gadget_exit':
      drivers/usb/dwc3/gadget.c:2681: undefined reference to `usb_del_gadget_udc'
      drivers/built-in.o: In function `__dwc3_ep0_do_control_data':
      drivers/usb/dwc3/ep0.c:929: undefined reference to `usb_gadget_map_request'
      drivers/usb/dwc3/ep0.c:906: undefined reference to `usb_gadget_map_request'
      drivers/built-in.o: In function `dwc3_ep0_set_config':
      drivers/usb/dwc3/ep0.c:575: undefined reference to `usb_gadget_set_state'
      drivers/built-in.o: In function `dwc3_ep0_set_address':
      drivers/usb/dwc3/ep0.c:520: undefined reference to `usb_gadget_set_state'
      drivers/usb/dwc3/ep0.c:522: undefined reference to `usb_gadget_set_state'
      drivers/built-in.o: In function `dwc3_ep0_set_config':
      drivers/usb/dwc3/ep0.c:556: undefined reference to `usb_gadget_set_state'
      
      Making changes similar to patch:
      71a5e61b usb: chipidea: fix and improve dependencies if usb host or gadget support is built as module
      
      Let us limit the DWC3 mode to depend on corresponding usb-subsystem
      and USB_DWC3.
      Signed-off-by: NVivek Gautam <gautam.vivek@samsung.com>
      Cc: Felipe Balbi <balbi@ti.com>
      Cc: Fengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      1bc0d926
  4. 02 4月, 2013 1 次提交
    • J
      usb: dwc3: add CONFIG_PM_SLEEP to suspend/resume functions · 19fda7cd
      Jingoo Han 提交于
      Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following
      build warning when CONFIG_PM_SLEEP is not selected. This is because
      sleep PM callbacks defined by SET_SYSTEM_SLEEP_PM_OPS are only used
      when the CONFIG_PM_SLEEP is enabled. Unnecessary CONFIG_PM ifdefs
      are removed.
      
      drivers/usb/dwc3/core.c:682:12: warning: 'dwc3_suspend' defined but not used [-Wunused-function]
      drivers/usb/dwc3/core.c:709:12: warning: 'dwc3_resume' defined but not used [-Wunused-function]
      drivers/usb/dwc3/dwc3-omap.c:430:12: warning: 'dwc3_omap_suspend' defined but not used [-Wunused-function]
      drivers/usb/dwc3/dwc3-omap.c:440:12: warning: 'dwc3_omap_resume' defined but not used [-Wunused-function]
      drivers/usb/dwc3/dwc3-exynos.c:185:12: warning: 'dwc3_exynos_suspend' defined but not used [-Wunused-function]
      drivers/usb/dwc3/dwc3-exynos.c:194:12: warning: 'dwc3_exynos_resume' defined but not used [-Wunused-function]
      Signed-off-by: NJingoo Han <jg1.han@samsung.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      19fda7cd
  5. 18 3月, 2013 34 次提交