Commit Graph

1384 Commits (044a38134a1536536cc4e542ec31a86ef8e294c9)

Author SHA1 Message Date
Eric Dumazet 21dcda6083 f_phonet: fix skb truesize underestimation
Now skb_add_rx_frag() has a truesize parameter, we can fix f_phonet to
properly account truesize of each fragment : a full page.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-27 22:50:54 -04:00
Linus Torvalds de8856d2c1 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller:
 1) Name string overrun fix in gianfar driver from Joe Perches.

 2) VHOST bug fixes from Michael S. Tsirkin and Nadav Har'El

 3) Fix dependencies on xt_LOG netfilter module, from Pablo Neira Ayuso.

 4) Fix RCU locking in xt_CT, also from Pablo Neira Ayuso.

 5) Add a parameter to skb_add_rx_frag() so we can fix the truesize
    adjustments in the drivers that use it.  The individual drivers
    aren't fixed by this commit, but will be dealt with using follow-on
    commits.  From Eric Dumazet.

 6) Add some device IDs to qmi_wwan driver, from Andrew Bird.

 7) Fix a potential rcu_read_lock() imbalancein rt6_fill_node().  From
    Eric Dumazet.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
  net: fix a potential rcu_read_lock() imbalance in rt6_fill_node()
  net: add a truesize parameter to skb_add_rx_frag()
  gianfar: Fix possible overrun and simplify interrupt name field creation
  USB: qmi_wwan: Add ZTE (Vodafone) K3570-Z and K3571-Z net interfaces
  USB: option: Ignore ZTE (Vodafone) K3570/71 net interfaces
  USB: qmi_wwan: Add ZTE (Vodafone) K3565-Z and K4505-Z net interfaces
  qlcnic: Bug fix for LRO
  netfilter: nf_conntrack: permanently attach timeout policy to conntrack
  netfilter: xt_CT: fix assignation of the generic protocol tracker
  netfilter: xt_CT: missing rcu_read_lock section in timeout assignment
  netfilter: cttimeout: fix dependency with l4protocol conntrack module
  netfilter: xt_LOG: use CONFIG_IP6_NF_IPTABLES instead of CONFIG_IPV6
  vhost: fix release path lockdep checks
  vhost: don't forget to schedule()
  tools/virtio: stub out strong barriers
  tools/virtio: add linux/hrtimer.h stub
  tools/virtio: add linux/module.h stub
2012-03-27 16:52:32 -07:00
Linus Torvalds 66f03c614c ARM: device tree work
Most of these patches convert code from using static platform data to
 describing the hardware in the device tree. This is only the first
 half of the changes for v3.4 because a lot of patches for this topic
 came in the last week before the merge window.
 
 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIVAwUAT24/a2CrR//JCVInAQKYdxAAn+fs7yv+P4OWG/nIhGdnPw8MQ2u9fvqA
 pmNL3Jy0eVowbENDcRRZgfhZ3ZlWBGUYym7J1uiFSrmHyJPoMtMvVg0miPYxLlpE
 vr8bzuSfGOUOa7+Fk6kFVGxS3ZHZTsDvuhMQUIt/2jHgOaesqPvZ1FYFAj1bZ1fm
 2CnQoF3OfnWAngHtoBXtgJxp/1r7+pHlGVbPYpmtHtikl45NmhqWza58aSQBilr+
 S90cVeZs91gyveoxz5N+YrO8+Dx05te3mF+dwWuKC6aDC6d76fjLak54AvYv2Pzr
 I6iaQPV8GIsXi5R4wptmVQAc5mbk5oktxJ7hCIHrmaBiAXygoVAYoqcuumoO3QDb
 QKz10ga1yBYcKYrKvBzKxQrChw53IPU6po+Dd66ALJvLlc3KONksiJs5T/5Wma7P
 v3VPcmZwPrJQbz+fQu6FysHeYQY+wfiR5E9Yz2OXs+PtkSy9OYsFFirdhJeWUPgA
 ASjNLs1y5rxqrJBt7cjyQiBbIf1awGWyzF0yUNrlYHxmhJ6vcxHfrGoW38VRRCTM
 8+JcxOHPRYrPfY7we6zsOn7ZeTWJduoUEeTxDnVS3w3zUIKCvkvkpHaJDvHvYcui
 T/yJnXdUD2O3E5+5k/5cCyde8RbSB9gKsNpIMNkK5BLSmbux3C72dE0sMQFysahI
 hS8aDCDUQUU=
 =fMC+
 -----END PGP SIGNATURE-----

Merge tag 'dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull "ARM: device tree work" from Arnd Bergmann:
 "Most of these patches convert code from using static platform data to
  describing the hardware in the device tree.  This is only the first
  half of the changes for v3.4 because a lot of patches for this topic
  came in the last week before the merge window.

  Signed-off-by: Arnd Bergmann <arnd@arndb.de>"

Fix up trivial conflicts in arch/arm/mach-vexpress/{Kconfig,core.h}

* tag 'dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (86 commits)
  Document: devicetree: add OF documents for arch-mmp
  ARM: dts: append DTS file of pxa168
  ARM: mmp: append OF support on pxa168
  ARM: mmp: enable rtc clk in pxa168
  i2c: pxa: add OF support
  serial: pxa: add OF support
  arm/dts: mt_ventoux: very basic support for TeeJet Mt.Ventoux board
  ARM: OMAP2+: Remove extra ifdefs for board-generic
  ARM: OMAP2+: Fix build error when only ARCH_OMAP2/3 or 4 is selected
  ASoC: DT: Add digital microphone binding to PAZ00 board.
  ARM: dt: Add ARM PMU to tegra*.dtsi
  ARM: at91: at91sam9x5cm/dt: add leds support
  ARM: at91: usb_a9g20/dt: add gpio-keys support
  ARM: at91: at91sam9m10g45ek/dt: add gpio-keys support
  ARM: at91: at91sam9m10g45ek/dt: add leds support
  ARM: at91: usb_a9g20/dt: add leds support
  ARM: at91/pio: add new PIO3 features
  ARM: at91: add sam9_smc.o to at91sam9x5 build
  ARM: at91/tc/clocksource: Add 32 bit variant to Timer Counter
  ARM: at91/tc: add device tree support to atmel_tclib
  ...
2012-03-27 16:47:35 -07:00
Linus Torvalds d61b7a572b ARM: global cleanups
Quite a bit of code gets removed, and some stuff moved around, mostly
 the old samsung s3c24xx stuff. There should be no functional changes
 in this series otherwise. Some cleanups have dependencies on other
 arm-soc branches and will be sent in the second round.
 
 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIVAwUAT2pCjGCrR//JCVInAQLd8RAAqCxhzSc4ewTUP/974gVhujj3TrpiEQcS
 FKvYWF76yP38Lbf3CJZBZaONRtrQNOhYpVQ0jb3WCV4F8mEH9PCes2q9RObeBYiY
 TNX8VdcuVjX2U9HaH0+RQtBUdujNLHpEOqtO57un7T5UDNssR5JOive1tNAooRv1
 pL0Hgx3AVqUbNOPpqQqHzy/MDdd67S6dX80yysANjFGMX87Nvp/ztYAdNnIdta+Z
 pDJt+DPlmK8LvjoSL3SEUN0p3Thk75621cCuauGq88PLIB2w62tzF0NFFbvIAgJT
 3aMlHM2flOiTJAWkUvA8zJiUzwv/0vYvH3xPoTo84abve3lVfZcY+fHNcfxE/Gge
 ri2MmkHyimVP3rNeyM0GbN1RTej1TN1MezeQW3nq2wP6nvS2k0/t32ObLLtWU7XA
 6iA0hKVMSnhqj4ln6jPAmyaDkaWHyYz97urhgetHqGadvLTiGPXCSBPalSiFmyMo
 11tvuqwUNz9tw4nsvGboFQwS2ZoVquC5inoHp5seqZETkGCB67JyeRGxtAM4gbP/
 wIRa3OBLY99yo1on6QovWNnSOMC6X4cOvBI/qHIjSEY/T9JVkslY87gRg3LkxCBR
 XpXfZ6iuLHoSRUGcIjE8D6KHjMgWIDPRnLkIliK4H+3Jn08g0R1MxCplevFCRtis
 egswZ8C24Xw=
 =o5Xl
 -----END PGP SIGNATURE-----

Merge tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull "ARM: global cleanups" from Arnd Bergmann:
 "Quite a bit of code gets removed, and some stuff moved around, mostly
  the old samsung s3c24xx stuff.  There should be no functional changes
  in this series otherwise.  Some cleanups have dependencies on other
  arm-soc branches and will be sent in the second round.

  Signed-off-by: Arnd Bergmann <arnd@arndb.de>"

Fixed up trivial conflicts mainly due to #include's being changes on
both sides.

* tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (121 commits)
  ep93xx: Remove unnecessary includes of ep93xx-regs.h
  ep93xx: Move EP93XX_SYSCON defines to SoC private header
  ep93xx: Move crunch code to mach-ep93xx directory
  ep93xx: Make syscon access functions private to SoC
  ep93xx: Configure GPIO ports in core code
  ep93xx: Move peripheral defines to local SoC header
  ep93xx: Convert the watchdog driver into a platform device.
  ep93xx: Use ioremap for backlight driver
  ep93xx: Move GPIO defines to gpio-ep93xx.h
  ep93xx: Don't use system controller defines in audio drivers
  ep93xx: Move PHYS_BASE defines to local SoC header file
  ARM: EXYNOS: Add clock register addresses for EXYNOS4X12 bus devfreq driver
  ARM: EXYNOS: add clock registers for exynos4x12-cpufreq
  PM / devfreq: update the name of EXYNOS clock registers that were omitted
  PM / devfreq: update the name of EXYNOS clock register
  ARM: EXYNOS: change the prefix S5P_ to EXYNOS4_ for clock
  ARM: EXYNOS: use static declaration on regarding clock
  ARM: EXYNOS: replace clock.c for other new EXYNOS SoCs
  ARM: OMAP2+: Fix build error after merge
  ARM: S3C24XX: remove call to s3c24xx_setup_clocks
  ...
2012-03-27 16:03:32 -07:00
Eric Dumazet 50269e19ad net: add a truesize parameter to skb_add_rx_frag()
skb_add_rx_frag() API is misleading.

Network skbs built with this helper can use uncharged kernel memory and
eventually stress/crash machine in OOM.

Add a 'truesize' parameter and then fix drivers in followup patches.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-25 13:29:58 -04:00
Linus Torvalds e2a0883e40 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs pile 1 from Al Viro:
 "This is _not_ all; in particular, Miklos' and Jan's stuff is not there
  yet."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (64 commits)
  ext4: initialization of ext4_li_mtx needs to be done earlier
  debugfs-related mode_t whack-a-mole
  hfsplus: add an ioctl to bless files
  hfsplus: change finder_info to u32
  hfsplus: initialise userflags
  qnx4: new helper - try_extent()
  qnx4: get rid of qnx4_bread/qnx4_getblk
  take removal of PF_FORKNOEXEC to flush_old_exec()
  trim includes in inode.c
  um: uml_dup_mmap() relies on ->mmap_sem being held, but activate_mm() doesn't hold it
  um: embed ->stub_pages[] into mmu_context
  gadgetfs: list_for_each_safe() misuse
  ocfs2: fix leaks on failure exits in module_init
  ecryptfs: make register_filesystem() the last potential failure exit
  ntfs: forgets to unregister sysctls on register_filesystem() failure
  logfs: missing cleanup on register_filesystem() failure
  jfs: mising cleanup on register_filesystem() failure
  make configfs_pin_fs() return root dentry on success
  configfs: configfs_create_dir() has parent dentry in dentry->d_parent
  configfs: sanitize configfs_create()
  ...
2012-03-21 13:36:41 -07:00
Al Viro 104bb37d3e gadgetfs: list_for_each_safe() misuse
really weirdly spelled "while the list is non-empty, pick its
first element, remove it from the list and free it" kind of loop...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-03-20 21:29:50 -04:00
Al Viro 48fde701af switch open-coded instances of d_make_root() to new helper
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-03-20 21:29:35 -04:00
Linus Torvalds ed378a52da USB merge for 3.4-rc1
Here's the big USB merge for the 3.4-rc1 merge window.
 
 Lots of gadget driver reworks here, driver updates, xhci changes, some
 new drivers added, usb-serial core reworking to fix some bugs, and other
 various minor things.
 
 There are some patches touching arch code, but they have all been acked
 by the various arch maintainers.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iEYEABECAAYFAk9njL8ACgkQMUfUDdst+ylQ9wCfbBOnIT01lGOorkaE9pom0hhk
 HfMAoKq1xzCR2B+OS3UMyUQffk+Ri9Ri
 =KIQ2
 -----END PGP SIGNATURE-----

Merge tag 'usb-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB merge for 3.4-rc1 from Greg KH:
 "Here's the big USB merge for the 3.4-rc1 merge window.

  Lots of gadget driver reworks here, driver updates, xhci changes, some
  new drivers added, usb-serial core reworking to fix some bugs, and
  other various minor things.

  There are some patches touching arch code, but they have all been
  acked by the various arch maintainers."

* tag 'usb-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (302 commits)
  net: qmi_wwan: add support for ZTE MF820D
  USB: option: add ZTE MF820D
  usb: gadget: f_fs: Remove lock is held before freeing checks
  USB: option: make interface blacklist work again
  usb/ub: deprecate & schedule for removal the "Low Performance USB Block" driver
  USB: ohci-pxa27x: add clk_prepare/clk_unprepare calls
  USB: use generic platform driver on ath79
  USB: EHCI: Add a generic platform device driver
  USB: OHCI: Add a generic platform device driver
  USB: ftdi_sio: new PID: LUMEL PD12
  USB: ftdi_sio: add support for FT-X series devices
  USB: serial: mos7840: Fixed MCS7820 device attach problem
  usb: Don't make USB_ARCH_HAS_{XHCI,OHCI,EHCI} depend on USB_SUPPORT.
  usb gadget: fix a section mismatch when compiling g_ffs with CONFIG_USB_FUNCTIONFS_ETH
  USB: ohci-nxp: Remove i2c_write(), use smbus
  USB: ohci-nxp: Support for LPC32xx
  USB: ohci-nxp: Rename symbols from pnx4008 to nxp
  USB: OHCI-HCD: Rename ohci-pnx4008 to ohci-nxp
  usb: gadget: Kconfig: fix typo for 'different'
  usb: dwc3: pci: fix another failure path in dwc3_pci_probe()
  ...
2012-03-20 11:26:30 -07:00
Andi Kleen 647d558023 usb: gadget: f_fs: Remove lock is held before freeing checks
lock debugging already supports this, no need to do it explicitely.

Cc: balbi@ti.com
Cc: gregkh@linuxfoundation.org
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-16 13:30:10 -07:00
Lothar Waßmann 8d06984288 usb gadget: fix a section mismatch when compiling g_ffs with CONFIG_USB_FUNCTIONFS_ETH
commit 28824b18ac4705e876a282a15ea0de8fc957551f:
 |Author: Michal Nazarewicz <m.nazarewicz@samsung.com>
 |Date:   Wed May 5 12:53:13 2010 +0200
 |
 |    USB: gadget: __init and __exit tags removed
 |
 |    __init, __initdata and __exit tags have have been removed from
 |    various files to make it possible for gadgets that do not use
 |    the __init/__exit tags to use those.
 obviously missed (at least) this case leading to a section mismatch in
 g_ffs.c when compiling with CONFIG_USB_FUNCTIONFS_ETH enabled.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-13 14:29:33 -07:00
Fabio Baltieri b55dd320f3 usb: gadget: Kconfig: fix typo for 'different'
Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
Reviewed-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-13 14:24:08 -07:00
Orjan Friberg 33d2832ab0 USB: gadget: Make g_hid device class conform to spec.
HID devices should specify this in their interface descriptors, not in the
device descriptor. This fixes a "missing hardware id" bug under Windows 7 with
a VIA VL800 (3.0) controller.

Signed-off-by: Orjan Friberg <of@flatfrog.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 13:11:34 -08:00
Jiri Slaby 410235fd4d TTY: remove unneeded tty->index checks
Checking if tty->index is in bounds is not needed. The tty has the
index set in the initial open. This is done in get_tty_driver. And it
can be only in interval <0,driver->num).

So remove the tests which check exactly this interval. Some are
left untouched as they check against the current backing device count.
(Leaving apart that the check is racy in most of the cases.)

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 11:42:21 -08:00
Jiri Slaby 2f16669d32 TTY: remove re-assignments to tty_driver members
All num, magic and owner are set by alloc_tty_driver. No need to
re-set them on each allocation site.

pti driver sets something different to what it passes to
alloc_tty_driver. It is not a bug, since we don't use the lines
parameter in any way. Anyway this is fixed, and now we do the right
thing.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 11:37:58 -08:00
Olof Johansson d60d506e6b Merge branch 'next/cleanup-s3c24xx' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/cleanup
* 'next/cleanup-s3c24xx' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: (24 commits)
  ARM: S3C24XX: remove call to s3c24xx_setup_clocks
  ARM: S3C24XX: add get_rate for clk_p on S3C2416/2443
  ARM: S3C24XX: add get_rate for clk_h on S3C2416/2443
  ARM: S3C24XX: remove XXX_setup_clocks method from S3C2443
  ARM: S3C24XX: remove obsolete S3C2416_DMA option
  ARM: S3C24XX: Reuse S3C2443 dma for S3C2416
  ARM: S3C24XX: Fix indentation of dma-s3c2443
  ARM: S3C24XX: Move device setup files to mach directory
  ARM: S3C24XX: Consolidate Simtec extensions
  ARM: S3C24XX: move simtec-specific code to mach directory
  ARM: S3C24XX: Move common-smdk code to mach directory
  ARM: S3C24XX: Move s3c2443-clock.c to mach-s3c24xx
  ARM: s3c2410_defconfig: update s3c2410_defconfig
  ARM: S3C2443: move mach-s3c2443/* into mach-s3c24xx/
  ARM: S3C2440: move mach-s3c2440/* into mach-s3c24xx/
  ARM: S3C2416: move mach-s3c2416/* into mach-s3c24xx/
  ARM: S3C2412: move mach-s3c2412/* into mach-s3c24xx/
  ARM: S3C2410: move mach-s3c2410/* into mach-s3c24xx/
  ARM: S3C24XX: change the ARCH_S3C2410 to ARCH_S3C24XX
  ARM: S3C2410: move s3c2410_baseclk_add to clock.h
  ...
2012-03-08 08:53:14 -08:00
Kukjin Kim 880bcd4a83 Merge branch 'topic/cleanup-s3c24xx' into next/cleanup-s3c24xx
Conflicts:
	arch/arm/mach-s3c24xx/include/mach/system.h
2012-03-07 01:36:33 -08:00
Tomoya MORINAGA 30e9eb190f usb/gadget/pch_udc: Fix compile error
Greg's e-mail address was old. So, I resend it.

Though I've tested this patch,
http://marc.info/?l=linux-usb&m=132825305710285&w=2,
I've received the following reports.
http://kisskb.ellerman.id.au/kisskb/buildresult/5771890/
http://kisskb.ellerman.id.au/kisskb/buildresult/5771905/

So, I added header file for these symbols.
Using this patch, this compile error must be disappeared.

Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-06 07:00:14 -08:00
Thomas Faber 85b4b3c8c1 usb: gadgetfs: return number of bytes on ep0 read request
A read from GadgetFS endpoint 0 during the data stage of a control
request would always return 0 on success (as returned by
wait_event_interruptible) despite having written data into the user
buffer.
This patch makes it correctly set the return value to the number of
bytes read.

Signed-off-by: Thomas Faber <thfabba@gmx.de>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-02 16:22:11 -08:00
Jesper Juhl 2a5be8783e Allocate correct size (portably) in drivers/usb/gadget/f_midi.c::f_midi_bind()
As the coverity checker puts it:

"Passing argument "sizeof (midi_function) /*8*/" to function "kcalloc"
and then casting the return value to "struct usb_descriptor_header **"
is suspicious. ... In this particular case sizeof(struct
usb_descriptor_header **) happens to be equal to sizeof(struct
usb_descriptor_header *), but this is not a portable assumption."

I believe we really do intend to use 'sizeof(*midi_function)' here, so
this patch makes that change.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-02 16:22:11 -08:00
Dan Carpenter b1443ac0e4 usb: gadget: dummy_hcd: signedness bug in transfer()
"len" is unsigned so it's never less than zero.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-02 16:22:11 -08:00
Kukjin Kim b130d5c295 ARM: S3C24XX: change the ARCH_S3C2410 to ARCH_S3C24XX
This patch changes the ARCH name to "ARCH_S3C24XX" for Samsung
S3C2410, S3C2412, S3C2413, S3C2416, S3C2440, S3C2442, S3C2443,
and S3C2450 SoCs so that we can merge the mach-xxx directories
and plat-s3c24xx dir. to just one mach-s3c24xx for them.

I think this should be sent to upstream via samsung tree because
this touches many samsung stuff.

Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Chris Ball <cjb@laptop.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
[for the gadget part:]
Acked-by: Felipe Balbi <balbi@ti.com>
[for the framebuffer (video) part:]
Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
[For the watchdog-part:]
Acked-by: Wim Van Sebroeck <wim@iguana.be>
Cc: Sangbeom Kim <sbkim73@samsung.com>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-03 07:44:51 +09:00
Arnd Bergmann 6e1d521b9d Merge branches 'depends/irqdomain' and 'at91/base2+cleanup' into next/dt
These two branches are a dependency for the at91 device tree changes,
so we pull them in here. at91/base2+cleanup will get merged through
the arm-soc cleanup2 branch, while the irqdomain tree will be sent
by Grant before this one gets integrated.

Conflicts:
	drivers/rtc/rtc-at91sam9.c

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-03-02 13:22:19 +00:00
Greg Kroah-Hartman f9b0f51709 This merge is rather big. Here's what it contains:
For am5536udc we have just simple coding style fixes. Nothing that has any
 potential to cause any issues going forward.
 
 With mv_udc, there's only one single change removing an unneeded NULL check.
 
 at91_udc also only saw a single change this merge window, and that's only
 removing a duplicated header.
 
 The Renesas controller has a few more involved changes. Support for SUDMAC was
 added, there's now a special handling of IRQ resources for when the IRQ line is
 shared between Renesas controller and SUDMAC, we also had a bug fix where
 Renesas controller would sleep in atomic context while doing DMA transfers from
 a tasklet. There were also a set of minor cleanups.
 
 The FSL UDC also had a scheduling in atomic context bug fix, but that's all.
 
 Thanks to Sebastian, the dummy_hcd now works better than ever with support for
 scatterlists and streams. Sebastian also added SuperSpeed descriptors to the
 serial gadgets.
 
 The highlight on this merge is the addition of a generic API for mapping and
 unmapping usb_requests. This will avoid code duplication on all UDC controllers
 and also kills all the defines for DMA_ADDR_INVALID which UDC controllers
 sprinkled around. A few of the UDC controllers were already converted to use
 this new API.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPTeaWAAoJEIaOsuA1yqREdT8QAK8ob6RqnZs9en7NdaBTq18G
 qPtdheAZ9TkWxv+JE69Nqq1DuLO93+ZqLt88kaIVp/jTg+MxZ4qeANe9Nga0Qr+U
 Qc4d9HOkKsLGC+E45TApAMCQkPZ3DxbObJRUeJI7DBefPJ+MzQYAeeQtzjEeKKf8
 hGY5kh5FdXds/TlTePwWuyVoe09grgoy7cvptIVJRZiWx8+n9PZeMiKe+vAmQDEc
 +V0FfOMZLcSY9Oi14faYDrOFIV5cjBxnwnBpinOYx5TArxep35HSynt/mJtW2a7/
 lcdpbS4Hn35LJQWcYl0onx0GNgvI/YDYg9V6vrSjoBVU7vZ/7slZ896yjiovmAsc
 KQXxKoqss80sd+rYUe/si/Ues+koN9HztucG//+9cuS2ZCnDydHMJHonMBXUZguv
 o2gzQwjRCUOcGLj+vnSAFiBAGZwAZV99rA2VgIz3dSyegDN+SverXJscOuvzzW/V
 6yERLjbmxwtIQczlUMPQgGE9gSMYKRzyDV4JlO1xtfsBwcVc0c4YE+ZnWOeEAbOa
 evrI/3RGjP12rY+eyntlN2ZpHq2ZJnS7guDjooi0mGK16LWeQh8h0zD24XoUiwnr
 nhkv+eqWJQXV2iQcyezO1TLnxhZ7LZdtfkYg5MH/VqGIuh6SNQdhew4bijUuKKsq
 +aLPREySYHdIloQjPBe/
 =RR+f
 -----END PGP SIGNATURE-----

Merge tag 'gadget-for-v3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next

USB: Gadget: changes for 3.4

This merge is rather big. Here's what it contains:

For am5536udc we have just simple coding style fixes. Nothing that has any
potential to cause any issues going forward.

With mv_udc, there's only one single change removing an unneeded NULL check.

at91_udc also only saw a single change this merge window, and that's only
removing a duplicated header.

The Renesas controller has a few more involved changes. Support for SUDMAC was
added, there's now a special handling of IRQ resources for when the IRQ line is
shared between Renesas controller and SUDMAC, we also had a bug fix where
Renesas controller would sleep in atomic context while doing DMA transfers from
a tasklet. There were also a set of minor cleanups.

The FSL UDC also had a scheduling in atomic context bug fix, but that's all.

Thanks to Sebastian, the dummy_hcd now works better than ever with support for
scatterlists and streams. Sebastian also added SuperSpeed descriptors to the
serial gadgets.

The highlight on this merge is the addition of a generic API for mapping and
unmapping usb_requests. This will avoid code duplication on all UDC controllers
and also kills all the defines for DMA_ADDR_INVALID which UDC controllers
sprinkled around. A few of the UDC controllers were already converted to use
this new API.

Conflicts:
	drivers/usb/dwc3/gadget.c
2012-03-01 09:20:28 -08:00
Greg Kroah-Hartman 8062d94a54 Here we have a big rework done by Heikki Krogerus (thanks) which
splits OTG functionality away from transceivers.
 
 We have known for quite a long time that struct otg_transceiver was
 a bad name for the structure, considering transceiver is far from
 being OTG-specific (see 4e67185).
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPTeeMAAoJEIaOsuA1yqRE6ZAP/j2G6DaDyng6vpyYQi2drXaY
 NKx3pA0sC98NACOv6sh+urcMDcDctLmOnwV18U+GNNP+qExQFnyuc7iGsXRxfUOj
 qkIbVPxzPcE0opmEMFJ5ZT85rw33DqKjFnQT4av3wwXe/qSrEkAfBoBSb6wn73rA
 v0JOhceGsFb+kJAc7U9Ji9A9xSjj+6uw08RTuuQv8KBLb5Pws+NoQ6UEjlni8umA
 lkOSelyBZN1OJU+fZKIpS4+SiwtdkZCm2wSIUiwaPosdJgw0w8fz0zNjn/4gAHB1
 oPyjjjP3/VDegp9CuYDRlnBgQa2K4V1vbjrBfhKbyar8fsOSoaPVv1fR9VKgVnT8
 RKlXKSeFEsdP4fOGYCjNKAzjeQH/qSNzdzo+s4GMqoWq7Lm3+b56zdQWvRmTT7Xg
 ++bMqFAi0noeU8aZWwSDMFiYv6O19o+Px4OTS/3aRmR1wdJpUUSk2M7Quw6A/YNj
 4Q5hDvio2eYtI1nya9yMS/j4ZiJ5fDQb5jUfBDB1MKtkZKKzVVSboK8P/rFq5+xf
 xdUfBRd7/fMk+he6RtemfjhMdYTiX6Cm6VzveZVBL4+7dERbnJDRgDhSJOYvA/eW
 Bvc7BY+/EYz7msF0gjLyWu3BBiChajk/D5ukoCIssUPGuIhmO1S7JRi1s+fLaNs3
 Bz8Haxql69YWrNL2ouQf
 =WiB6
 -----END PGP SIGNATURE-----

Merge tag 'xceiv-for-v3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next

USB: transceiver changes for 3.4

Here we have a big rework done by Heikki Krogerus (thanks) which
splits OTG functionality away from transceivers.

We have known for quite a long time that struct otg_transceiver was
a bad name for the structure, considering transceiver is far from
being OTG-specific (see 4e67185).
2012-03-01 08:45:33 -08:00
Sebastian Andrzej Siewior 775dafdcd3 usb/gadget: use common defines within the storage gadget
This replaces the remaining defines which are available in "public"
include/ directory and are re-defined by the storage gadget.
This is patch is basicaly search & replace followed by the removal of
the defines.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-28 11:08:33 -08:00
Sebastian Andrzej Siewior 7ac4704c09 usb/storage: a couple defines from drivers/usb/storage/transport.h to include/linux/usb/storage.h
This moves the BOT data structures for CBW and CSW from drivers internal
header file to global include able file in include/.
The storage gadget is using the same name for CSW but a different for
CBW so I fix it up properly. The same goes for the ub driver and keucr
driver in staging.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-28 11:05:18 -08:00
Felipe Balbi 6440093f5e usb: gadget: goku: use generic map/unmap routines
those routines have everything we need to map/unmap
USB requests and it's better to use them.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-02-28 14:49:12 +02:00
Felipe Balbi ae4d793334 usb: gadget: net2280: use generic map/unmap routines
those routines have everything we need to map/unmap
USB requests and it's better to use them.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-02-28 14:49:11 +02:00
Felipe Balbi af93f2c77a usb: gadget: net2272: use generic map/umap routines
those routines have everything we need to map/unmap
USB requests and it's better to use them.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-02-28 14:49:09 +02:00
Felipe Balbi 05d00fbe87 usb: gadget: r8a66597: use generic map/unmap routines
those routines have everything we need to map/unmap
USB requests and it's better to use them.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-02-28 14:49:08 +02:00
Felipe Balbi 220e860009 usb: gadget: amd5536: use generic map/unmap routines
those routines have everything we need to map/unmap
USB requests and it's better to use them.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-02-28 14:49:07 +02:00
Felipe Balbi ac8a138cb6 usb: gadget: langwell: use generic map/unmap functions
those routines have everything we need to map/unmap
USB requests and it's better to use them.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-02-28 14:49:05 +02:00
Felipe Balbi a698908d3b usb: gadget: add generic map/unmap request utilities
such utilities are currently duplicated on all UDC
drivers basically with the same structure. Let's group
all implementations into one generic implementation
and get rid of that duplication.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-02-28 14:48:23 +02:00
Arnd Bergmann 4d8cfec692 Merge branch 'cleanup-3.4' of git://github.com/hzhuang1/linux into next/cleanup
* 'cleanup-3.4' of git://github.com/hzhuang1/linux: (2 commits)
  rtc: sa1100: remove verification code of alarm
  rtc: sa1100: remove periodic code

(update to v3.3-rc5)
2012-02-28 12:40:01 +00:00
Cyril Roelandt c15e03e155 usb: amd5536udc: Remove old CVS markers
Git does not care about CVS markers.

Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-02-27 16:35:14 +02:00
Cyril Roelandt 34af373865 usb: amd5536udc: Fix the type of ep_string
Use "static const char *const" instead of "static const char *".

Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-02-27 16:35:06 +02:00
Cyril Roelandt 1b8860df38 usb: amd5536udc: use the DEFINE_PCI_DEVICE_TABLE macro
Use DEFINE_PCI_DEVICE_TABLE instead of "const struct pci_device_id".

Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-02-27 16:34:12 +02:00
Cyril Roelandt 1435db486c usb: amd5536udc: Fix indentation
Remove an unnecessary level of indentation.

Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-02-27 16:33:37 +02:00
Cyril Roelandt 5647a149e2 usb: amd5536udc: Fix coding style issues.
Remove unnecessary whitespaces.

Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-02-27 16:33:21 +02:00
Cyril Roelandt 170b778ffb usb: amd5536udc: Fix brace coding style issues.
Remove a bunch of unneeded braces.

Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-02-27 16:32:50 +02:00
Heikki Krogerus 6e13c6505c usb: otg: Convert all users to pass struct usb_otg for OTG functions
This changes the otg functions so that they receive struct
otg instead of struct usb_phy as parameter and
converts all users of these functions to pass the otg member
of their usb_phy.

Includes fixes to IMX code from Sascha Hauer.

[ balbi@ti.com : fixed a compile warning on ehci-mv.c ]

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Acked-by: Li Yang <leoli@freescale.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-02-27 15:41:52 +02:00
Heikki Krogerus b96d3b0836 usb: Convert all users to new usb_phy
Use the new usb_phy_* functions with transceiver
operations instead of the old otg functions.

Includes fixes from Sascha Hauer.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Acked-by: Li Yang <leoli@freescale.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-02-27 15:41:48 +02:00
Peter Chen c5cc5ed866 usb: fsl_udc_core: Fix scheduling while atomic dump message
When loading g_ether gadget, there is below message:

Backtrace:
[<80012248>] (dump_backtrace+0x0/0x10c) from [<803cb42c>] (dump_stack+0x18/0x1c)
r7:00000000 r6:80512000 r5:8052bef8 r4:80513f30
[<803cb414>] (dump_stack+0x0/0x1c) from [<8000feb4>] (show_regs+0x44/0x50)
[<8000fe70>] (show_regs+0x0/0x50) from [<8004c840>] (__schedule_bug+0x68/0x84)
r5:8052bef8 r4:80513f30
[<8004c7d8>] (__schedule_bug+0x0/0x84) from [<803cd0e4>] (__schedule+0x4b0/0x528)
r5:8052bef8 r4:809aad00
[<803ccc34>] (__schedule+0x0/0x528) from [<803cd214>] (_cond_resched+0x44/0x58)
[<803cd1d0>] (_cond_resched+0x0/0x58) from [<800a9488>] (dma_pool_alloc+0x184/0x250)
 r5:9f9b4000 r4:9fb4fb80
 [<800a9304>] (dma_pool_alloc+0x0/0x250) from [<802a8ad8>] (fsl_req_to_dtd+0xac/0x180)
[<802a8a2c>] (fsl_req_to_dtd+0x0/0x180) from [<802a8ce4>] (fsl_ep_queue+0x138/0x274)
[<802a8bac>] (fsl_ep_queue+0x0/0x274) from [<7f004328>] (composite_setup+0x2d4/0xfac [g_ether])
[<7f004054>] (composite_setup+0x0/0xfac [g_ether]) from [<802a9bb4>] (fsl_udc_irq+0x8dc/0xd38)
[<802a92d8>] (fsl_udc_irq+0x0/0xd38) from [<800704f8>] (handle_irq_event_percpu+0x54/0x188)
[<800704a4>] (handle_irq_event_percpu+0x0/0x188) from [<80070674>] (handle_irq_event+0x48/0x68)
[<8007062c>] (handle_irq_event+0x0/0x68) from [<800738ec>] (handle_level_irq+0xb4/0x138)
 r5:80514f94 r4:80514f40
 [<80073838>] (handle_level_irq+0x0/0x138) from [<8006ffa4>] (generic_handle_irq+0x38/0x44)
 r7:00000012 r6:80510b1c r5:80529860 r4:80512000
 [<8006ff6c>] (generic_handle_irq+0x0/0x44) from [<8000f4c4>] (handle_IRQ+0x54/0xb4)
[<8000f470>] (handle_IRQ+0x0/0xb4) from [<800085b8>] (tzic_handle_irq+0x64/0x94)
 r9:412fc085 r8:00000000 r7:80513f30 r6:00000001 r5:00000000
 r4:00000000
 [<80008554>] (tzic_handle_irq+0x0/0x94) from [<8000e680>] (__irq_svc+0x40/0x60)

The reason of above dump message is calling dma_poll_alloc with can-schedule
mem_flags at atomic context.

To fix this problem, below changes are made:
- fsl_req_to_dtd doesn't need to be protected by spin_lock_irqsave,
as struct usb_request can be access at process context. Move lock
to beginning of hardware visit (fsl_queue_td).
- Change the memory flag which using to allocate dTD descriptor buffer,
the memory flag can be from gadget layer.

It is tested at i.mx51 bbg board with g_mass_storage, g_ether, g_serial.

Cc: stable@vger.kernel.org
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Acked-by: Li Yang <leoli@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-02-24 12:22:45 +02:00
Ido Shayevitz f9c56cdd39 usb: gadget: Clear usb_endpoint_descriptor inside the struct usb_ep on disable
This fix a bug in f_serial, which expect the ep->desc to be NULL after
disabling an endpoint.

Cc: stable@vger.kernel.org
Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-02-24 12:22:38 +02:00
Jean-Christophe PLAGNIOL-VILLARD b55149529d ARM: at91/PMC: make register base soc independent
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Reviewed-by: Ryan Mallon <rmallon@gmail.com>
2012-02-23 14:57:57 +01:00
Danny Kukawka a003c187ca usb: at91_udc: linux/prefetch.h included twice
drivers/usb/gadget/at91_udc.c included 'linux/prefetch.h' twice,
remove the duplicate.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-02-23 12:27:18 +02:00
Jean-Christophe PLAGNIOL-VILLARD 4342d6479e ARM: at91: make matrix register base soc independent
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Reviewed-by: Ryan Mallon <rmallon@gmail.com>
Cc: linux-usb@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-23 09:24:46 +01:00
Jassi Brar 132fcb4608 usb: gadget: Add Audio Class 2.0 Driver
This is a flexible USB Audio Class 2.0 compliant gadget driver that
implements a simple topology with a virtual sound card exposed at
the function side.

The driver doesn't expect any real audio codec to be present on the
function - the audio streams are simply sinked to and sourced from a
virtual ALSA sound card created. The user-space application may choose
to do whatever it wants with the data received from the USB Host and
choose to provide whatever it wants as audio data to the USB Host.

Capture(USB-Out) and Playback(USB-In) can be run at independent
configurations specified via module parameters while loading the driver.

Make this new version as the default selection by a new Kconfig choice.

Signed-off-by: Yadi Brar <yadi.brar01@gmail.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-02-15 10:10:31 +02:00
Jassi Brar d747a91687 usb: gadget: audio: Move string IDs to audio.c
Move manufacturer and product string ids into audio.c so
as to be reusable by the new uac2 version of gadget driver.

Signed-off-by: Yadi Brar <yadi.brar01@gmail.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-02-15 10:10:25 +02:00