1. 12 12月, 2011 2 次提交
  2. 29 11月, 2011 2 次提交
    • M
      usb: udc: Fix gadget driver's speed check in various UDC drivers · bfe0658b
      Michal Nazarewicz 提交于
      Several UDC drivers had a gadget driver's speed sanity check of the
      form of:
      
      	driver->speed != USB_SPEED_HIGH
      
      or:
      
      	driver->speed != USB_SPEED_HIGH && driver->speed != USB_SPEED_FULL
      
      As more and more gadget drivers support USB SuperSpeed, driver->speed
      may be set to USB_SPEED_SUPER and UDC driver should handle such gadget
      correctly.  The above checks however fail to recognise USB_SPEED_SUPER
      as a valid speed.
      
      This commit changes the two checks to:
      
      	driver->speed < USB_SPEED_HIGH
      
      or:
      
      	driver->speed < USB_SPEED_FULL
      
      respectively.
      Signed-off-by: NMichal Nazarewicz <mina86@mina86.com>
      Reported-by: NAlan Stern <stern@rowland.harvard.edu>
      Tested-by: NHeiko Stuebner <heiko@sntech.de>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      bfe0658b
    • K
      usb: musb: PM: fix context save/restore in suspend/resume path · 5d193ce8
      Kevin Hilman 提交于
      Currently the driver tries to save context in the suspend path, but
      will cause an abort if the device is already runtime suspended.  This
      happens, for example, if MUSB loaded/compiled-in, in host mode, but no
      USB devices are attached.  MUSB will be runtime suspended, but then
      attempting a system suspend will crash due to the context save
      being attempted while the device is disabled.
      
      On OMAP, as of v3.1, the driver's ->runtime_suspend() callback will be
      called late in the suspend path (by the PM domain layer) if the driver
      is not already runtime suspended, ensuring a full shutdown.
      
      Therefore, the context save is not needed in the ->suspend() method
      since it will be called in the ->runtime_suspend() method anyways
      (similarily for resume.)
      
      NOTE: this leaves the suspend/resume methods basically empty (with
            some FIXMEs and comments, but I'll leave it to the maintainers
            to decide whether to remove them.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      5d193ce8
  3. 15 11月, 2011 4 次提交
    • F
      usb: musb: fix compilation breakage introduced by de477254 · ab570da2
      Felipe Balbi 提交于
      commit de477254 (include: replace linux/module.h
      with "struct module" wherever possible) introduced
      a compilation breaked when it removed <linux/module.h>
      from <linux/device.h> which musb glue layers were
      (mistakenly) relying on.
      
      Include that header to fix the compile error.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ab570da2
    • L
      usb: musb: hdrc: fix dependency on USB_GADGET_DUALSPEED in Kconfig · 0de174b5
      Luciano Coelho 提交于
      USB_MUSB_HDRC depends on USB_GADGET_DUALSPEED.  If HDRC is selected
      but DUALSPEED is not, the kernel oopses:
      
      [    3.132781] Unable to handle kernel NULL pointer dereference at virtual address 00000000
      [    3.141296] pgd = c0004000
      [    3.144134] [00000000] *pgd=00000000
      [    3.147918] Internal error: Oops: 5 [#1] SMP
      [    3.152404] Modules linked in:
      [    3.155609] CPU: 0    Not tainted  (3.1.0-rc9-wl+ #417)
      [    3.161132] PC is at composite_setup+0x738/0xbb4
      [    3.165985] LR is at vprintk+0x400/0x47c
      [    3.170135] pc : [<c031df90>]    lr : [<c004c150>]    psr: 60000093
      [    3.170135] sp : c065dd50  ip : dfb1f0fc  fp : c065ddbc
      [    3.182220] r10: 00000000  r9 : df8fcae8  r8 : df8fcaa0
      [    3.187713] r7 : 00000000  r6 : df8eaa20  r5 : dfae8ea0  r4 : 00000000
      [    3.194580] r3 : df8fcae8  r2 : 00010002  r1 : c065dc40  r0 : 00000047
      [    3.201446] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
      [    3.209228] Control: 10c53c7d  Table: 8000404a  DAC: 00000015
      [    3.215270] Process swapper (pid: 0, stack limit = 0xc065c2f8)
      [    3.221405] Stack: (0xc065dd50 to 0xc065e000)
      [...]
      [    3.415405] [<c031df90>] (composite_setup+0x738/0xbb4) from [<c0310d18>] (musb_g_ep0_irq+0x9d0/0xaf8)
      [    3.425109] [<c0310d18>] (musb_g_ep0_irq+0x9d0/0xaf8) from [<c030fb04>] (musb_interrupt+0xb48/0xc74)
      [    3.434722] [<c030fb04>] (musb_interrupt+0xb48/0xc74) from [<c030fc98>] (generic_interrupt+0x68/0x80)
      [    3.444458] [<c030fc98>] (generic_interrupt+0x68/0x80) from [<c0095204>] (handle_irq_event_percpu+0x9c/0x234)
      [    3.454925] [<c0095204>] (handle_irq_event_percpu+0x9c/0x234) from [<c00953e8>] (handle_irq_event+0x4c/0x6c)
      [    3.465270] [<c00953e8>] (handle_irq_event+0x4c/0x6c) from [<c0097e10>] (handle_fasteoi_irq+0xd8/0x110)
      [    3.475158] [<c0097e10>] (handle_fasteoi_irq+0xd8/0x110) from [<c0094d2c>] (generic_handle_irq+0x34/0x3c)
      [    3.485260] [<c0094d2c>] (generic_handle_irq+0x34/0x3c) from [<c0014ae4>] (handle_IRQ+0x88/0xc8)
      [    3.494537] [<c0014ae4>] (handle_IRQ+0x88/0xc8) from [<c00085b0>] (asm_do_IRQ+0x18/0x1c)
      [    3.503051] [<c00085b0>] (asm_do_IRQ+0x18/0x1c) from [<c0429e78>] (__irq_svc+0x38/0xc0)
      
      This patch changes Kconfig so that USB_GADGET_DUALSPEED is selected
      automatically by USB_MUSB_HDRC.
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      0de174b5
    • M
      usb: musb: remove incorrectly added ARCH_U5500 define · d0678594
      Mian Yousaf Kaukab 提交于
      ARCH_U8500 covers both MACH_U8500 and MACH_U5500
      Reported-by: NPaul Bolle <pebolle@tiscali.nl>
      Signed-off-by: NMian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
      Acked-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d0678594
    • F
      usb: musb: gadget: don't call ->disconnect() on exit · 3c2d636a
      Felipe Balbi 提交于
      that has already being done by udc-core.c. It's
      unnecessary and might cause issues with some gadget
      drivers.
      
      Tested: Ajay Kumar Gupta <ajay.gupta@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      3c2d636a
  4. 26 9月, 2011 1 次提交
  5. 18 9月, 2011 1 次提交
  6. 15 9月, 2011 1 次提交
  7. 10 9月, 2011 1 次提交
  8. 09 9月, 2011 1 次提交
  9. 24 8月, 2011 1 次提交
    • K
      USB: use usb_endpoint_maxp() instead of le16_to_cpu() · 29cc8897
      Kuninori Morimoto 提交于
      Now ${LINUX}/drivers/usb/* can use usb_endpoint_maxp(desc) to get maximum packet size
      instead of le16_to_cpu(desc->wMaxPacketSize).
      This patch fix it up
      
      Cc: Armin Fuerst <fuerst@in.tum.de>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Johannes Erdfelt <johannes@erdfelt.com>
      Cc: Vojtech Pavlik <vojtech@suse.cz>
      Cc: Oliver Neukum <oliver@neukum.name>
      Cc: David Kubicek <dave@awk.cz>
      Cc: Johan Hovold <jhovold@gmail.com>
      Cc: Brad Hards <bhards@bigpond.net.au>
      Acked-by: NFelipe Balbi <balbi@ti.com>
      Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
      Cc: Thomas Dahlmann <dahlmann.thomas@arcor.de>
      Cc: David Brownell <david-b@pacbell.net>
      Cc: David Lopo <dlopo@chipidea.mips.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Michal Nazarewicz <m.nazarewicz@samsung.com>
      Cc: Xie Xiaobo <X.Xie@freescale.com>
      Cc: Li Yang <leoli@freescale.com>
      Cc: Jiang Bo <tanya.jiang@freescale.com>
      Cc: Yuan-hsin Chen <yhchen@faraday-tech.com>
      Cc: Darius Augulis <augulis.darius@gmail.com>
      Cc: Xiaochen Shen <xiaochen.shen@intel.com>
      Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
      Cc: OKI SEMICONDUCTOR, <toshiharu-linux@dsn.okisemi.com>
      Cc: Robert Jarzmik <robert.jarzmik@free.fr>
      Cc: Ben Dooks <ben@simtec.co.uk>
      Cc: Thomas Abraham <thomas.ab@samsung.com>
      Cc: Herbert Pötzl <herbert@13thfloor.at>
      Cc: Arnaud Patard <arnaud.patard@rtp-net.org>
      Cc: Roman Weissgaerber <weissg@vienna.at>
      Acked-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: Tony Olech <tony.olech@elandigitalsystems.com>
      Cc: Florian Floe Echtler <echtler@fs.tum.de>
      Cc: Christian Lucht <lucht@codemercs.com>
      Cc: Juergen Stuber <starblue@sourceforge.net>
      Cc: Georges Toth <g.toth@e-biz.lu>
      Cc: Bill Ryder <bryder@sgi.com>
      Cc: Kuba Ober <kuba@mareimbrium.org>
      Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
      Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      29cc8897
  10. 12 8月, 2011 9 次提交
  11. 08 8月, 2011 1 次提交
  12. 02 8月, 2011 3 次提交
    • J
      usb: musb: fix oops on musb_gadget_pullup · 72c487df
      John Stultz 提交于
      an 'unhandled fault' is causes when a gadget driver calls
      usb_gadget_connect() while the USB cable isn't plugged into
      the OTG port.
      
      the fault is caused by an access to MUSB's memory space
      while its clock is turned off due to pm_runtime kicking
      in.
      
      in order to fix the fault, we enclose musb_gadget_pullup()
      with pm_runtime_get_sync() ... pm_runtime_put() calls to
      be sure we will always reach that path with clock turned on.
      
      [ balbi@ti.com : simplified commit log; removed few things
      	which didn't belong there ]
      
      Cc: stable@kernel.org
      Reported-by: NZach Pfeffer <zach.pfeffer@linaro.org>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      72c487df
    • R
      usb: musb: fix Kconfig · b61ae342
      Rabin Vincent 提交于
      After 62285963 (usb: musb: drop a gigantic amount of ifdeferry):
      
       - USB_GADGET_MUSB_HDRC is no longer selectable because it
         depends on the removed USB_MUSB_PERIPHERAL and USB_MUSB_OTG
         options
      
       - The Kconfig comment still says "Enable Host or Gadget support
         to see Inventra options", even though you now need to enable
         both of them to see Inventra options.
      
      Fix the dependency and drop the anyway unnecessary comment.
      Signed-off-by: NRabin Vincent <rabin@rab.in>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      b61ae342
    • S
      usb: musb: tusb6010_omap: fix build failure: error: 'musb' undeclared · 5574d5f0
      Sergei Trofimovich 提交于
        CC      drivers/usb/musb/tusb6010_omap.o
      drivers/usb/musb/tusb6010_omap.c: In function 'tusb_omap_use_shared_dmareq':
      drivers/usb/musb/tusb6010_omap.c:92: error: 'musb' undeclared (first use in this function)
      drivers/usb/musb/tusb6010_omap.c:92: error: (Each undeclared identifier is reported only once
      drivers/usb/musb/tusb6010_omap.c:92: error: for each function it appears in.)
      Signed-off-by: NSergei Trofimovich <slyfox@gentoo.org>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      5574d5f0
  13. 08 7月, 2011 1 次提交
  14. 02 7月, 2011 6 次提交
  15. 29 6月, 2011 1 次提交
    • S
      usb: gadget: convert all users to the new udc infrastructure · 0f91349b
      Sebastian Andrzej Siewior 提交于
      peripheral drivers are using usb_add_gadget()/usb_del_gadget() to
      register/unregister to the udc-core.
      
      The udc-core will take the first available gadget driver and attach
      function driver which is calling usb_gadget_register_driver(). This is
      the same behaviour we have right now.
      
      Only dummy_hcd was tested, the others were compiled tested.
      
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Anton Tikhomirov <av.tikhomirov@samsung.com>
      Cc: Ben Dooks <ben-linux@fluff.org>
      Cc: Dan Carpenter <error27@gmail.com>
      Cc: Darius Augulis <augulis.darius@gmail.com>
      Cc: Eric Miao <eric.y.miao@gmail.com>
      Cc: Jingoo Han <jg1.han@samsung.com>
      Cc: Kukjin Kim <kgene.kim@samsung.com>
      Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Cc: Li Yang <leoli@freescale.com>
      Cc: Michael Hennerich <michael.hennerich@analog.com>
      Acked-by: NMike Frysinger <vapier@gentoo.org>
      Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
      Cc: Pavankumar Kondeti <pkondeti@codeaurora.org>
      Cc: Roy Huang <roy.huang@analog.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com>
      Cc: Xiaochen Shen <xiaochen.shen@intel.com>
      Cc: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
      Cc: Yuan-Hsin Chen <yhchen@faraday-tech.com>
      Cc: cxie4 <cxie4@marvell.com>
      Cc: linux-geode@lists.infradead.org
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      0f91349b
  16. 24 6月, 2011 1 次提交
  17. 09 6月, 2011 2 次提交
    • Y
      usb: musb: gadget: clear TXPKTRDY flag when set FLUSHFIFO · 4858f06e
      Yauheni Kaliuta 提交于
      Fixes mis-use of MUSB's hardware feature where it won't
      flush FIFOs when TXPKTRDY flag was set before and we are
      flushing setting both FLUSHFIFO and TXPKTRDY.
      
      In other words, we need to ensure that when we try to
      flush FIFOs, we don't accidentaly set TXPKTRDY bit too
      due to a read-back of the register.
      
      The MUSB Programming Guide says "May be set simultaneously
      with TxPktRdy to abort the packet that is currently being
      loaded into the FIFO". This is a situation where TXPKTRDY
      hasn't been set yet, but some data already loaded into the
      fifo. It looks, that if TXPKTRDY has been set before, and
      there is no loading in progress, but we set FLUSHFIFO with
      the TXPKTRDY, controller tries to use the same logic to
      abort loading and as the result just does nothing (because
      there is no packet been loaded currently)
      Signed-off-by: NYauheni Kaliuta <yauheni.kaliuta@nokia.com>
      
      [ balbi@ti.com : fixed one whitespace git complained about
      		 improved the commit log slightly ]
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      4858f06e
    • M
      usb: musb: host: compare status for negative error values · 72887c86
      Márton Németh 提交于
      Variable d is a struct usb_iso_packet_descriptor. The status filed is usually
      negative when an error happens.
      Signed-off-by: NMárton Németh <nm127@freemail.hu>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      72887c86
  18. 07 6月, 2011 1 次提交
  19. 18 5月, 2011 1 次提交