]> git.karo-electronics.de Git - mv-sheeva.git/log
mv-sheeva.git
14 years agoASoC: wm2000: remove unused #include <linux/version.h>
Huang Weiyi [Thu, 8 Apr 2010 11:50:08 +0000 (19:50 +0800)]
ASoC: wm2000: remove unused #include <linux/version.h>

Remove unused #include <linux/version.h>('s) in
  sound/soc/codecs/wm2000.c

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoALSA: ASoC: move dma_data from snd_soc_dai to snd_soc_pcm_stream
Daniel Mack [Mon, 22 Mar 2010 09:11:15 +0000 (10:11 +0100)]
ALSA: ASoC: move dma_data from snd_soc_dai to snd_soc_pcm_stream

This fixes a memory corruption when ASoC devices are used in
full-duplex mode. Specifically for pxa-ssp code, where this pointer
is dynamically allocated for each direction and destroyed upon each
stream start.

All other platforms are fixed blindly, I couldn't even compile-test
them. Sorry for any breakage I may have caused.

[Note that this is a backported version for 2.6.34.
 Upstream commit is fd23b7dee]

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Reported-by: Sven Neumann <s.neumann@raumfeld.com>
Reported-by: Michael Hirsch <m.hirsch@raumfeld.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Only do WM8994 bias off transition from standby
Mark Brown [Tue, 30 Mar 2010 13:29:14 +0000 (14:29 +0100)]
ASoC: Only do WM8994 bias off transition from standby

Otherwise we may try to power down multiple times when the using
idle bias off and the driver is removed.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoASoC: Don't use DCS_DATAPATH_BUSY for WM hubs devices
Mark Brown [Mon, 29 Mar 2010 16:18:41 +0000 (17:18 +0100)]
ASoC: Don't use DCS_DATAPATH_BUSY for WM hubs devices

The DCS_DATAPATH_BUSY bit used to monitor the completion of DC servo
operations has been deprecated and with some more recente revisions
may perform incorrectly, especially when only analogue bypass paths
are in use. Switch to using readback from the DC servo command
register instead, which is supported for all devices. Without this
unacceptably long timeouts may be observed in some circumstances.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoASoC: Don't do runtime wm_hubs DC servo updates if using offset correction
Mark Brown [Mon, 29 Mar 2010 15:34:42 +0000 (16:34 +0100)]
ASoC: Don't do runtime wm_hubs DC servo updates if using offset correction

If we need to offset correct the DC servo then don't use runtime
recalibration since that is likely to introduce further offsets
which will be evident on powerdown.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoASoC: Support second DC servo readback method for wm_hubs
Mark Brown [Mon, 29 Mar 2010 16:09:45 +0000 (17:09 +0100)]
ASoC: Support second DC servo readback method for wm_hubs

More recent Wolfson hubs devices add the ability to read back the DC
servo calibration information from the register used to write offsets,
and later still ones remove the old readback registers. Add support
for the new scheme, and use it for WM8994 device revisions that
support it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoASoC: Avoid wraparound in wm_hubs DC servo correction
Mark Brown [Mon, 29 Mar 2010 14:24:40 +0000 (15:24 +0100)]
ASoC: Avoid wraparound in wm_hubs DC servo correction

If the correction wraps around then a substantial offset would be
introduced.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoASoC: OMAP: Fix capture pointer handling for OMAP1510 to work correctly with recent...
Janusz Krzysztofik [Sun, 28 Mar 2010 20:29:29 +0000 (22:29 +0200)]
ASoC: OMAP: Fix capture pointer handling for OMAP1510 to work correctly with recent ALSA PCM code

With recent (2.6.34) chnages in PCM handling, capture stopped working on my
OMAP1510 based Amstrad Delta videophone.

Using 2.6.34-rc2, I was able to correct the problem in 3 different ways:

1. reverting commit 7b3a177b0d4f92b3431b8dca777313a07533a710,
2. enabling additional jiffies check with
echo 4 >/proc/asound/card0/pcm0c0/xrun_debug
3. applying the patch below.

Since I wasn't able to reproduce the problem on my i686 PC, I guess the
problem is probably machine specific.

The patch reuses the method for software emulation of missing hardware
pointer, already implemented for playback on OMAP1510. It's possible that
event if a hardware pointer is available for capture on this machine, its
behaviour may be not compatible with what upper layer expects.

If you think the problem may be more general and should be solved differently,
on a higher level, I can try to work more on it if you give me a hint.

If the patch gets accepted, I suggest it goes as a fix in the current release
cycle.

Created and tested against linux-2.6.34-rc2.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Fix passing platform_data to ac97 bus users and fix a leak
Graham Gower [Thu, 25 Mar 2010 00:22:12 +0000 (10:52 +1030)]
ASoC: Fix passing platform_data to ac97 bus users and fix a leak

[The issue is an attempt to write the pdata without the AC97 device
allocated when using ac97.c - also added a comment in soc-core.c for the
special case for ac97. -- broonie]

Signed-off-by: Graham Gower <graham.gower@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: wm8994: playback => capture
Dan Carpenter [Wed, 24 Mar 2010 11:58:34 +0000 (14:58 +0300)]
ASoC: wm8994: playback => capture

Sparse caught that initialize "playback" two times instead of
initializing "capture".

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Remove BROKEN from i.MX audio after dependencies merged
Mark Brown [Fri, 12 Feb 2010 14:39:36 +0000 (14:39 +0000)]
ASoC: Remove BROKEN from i.MX audio after dependencies merged

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoMerge commit 'v2.6.34-rc2' into for-2.6.34
Mark Brown [Mon, 22 Mar 2010 11:17:26 +0000 (11:17 +0000)]
Merge commit 'v2.6.34-rc2' into for-2.6.34

14 years agoLinux 2.6.34-rc2
Linus Torvalds [Sat, 20 Mar 2010 01:17:57 +0000 (18:17 -0700)]
Linux 2.6.34-rc2

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
Linus Torvalds [Sat, 20 Mar 2010 01:16:20 +0000 (18:16 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  serial: sh-sci: remove duplicated #include
  sh: Export uncached helper symbols.
  sh: Fix up NUMA build for 29-bit.
  serial: sh-sci: Fix build failure for non-sh architectures.
  sh: Fix up uncached offset for legacy 29-bit mode.
  sh: Support CPU affinity masks for INTC controllers.

14 years agoMerge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb
Linus Torvalds [Sat, 20 Mar 2010 01:14:22 +0000 (18:14 -0700)]
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb

* 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb:
  uwb: remove duplicate cpu_to_le16()
  uwb: declare MODULE_FIRMWARE() in i1480 DFU driver
  uwb: make USB device id table constant
  uwb: wlp: refactor wlp_get_<attribute>() macros

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88...
Linus Torvalds [Fri, 19 Mar 2010 20:49:29 +0000 (13:49 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha-2.6:
  alpha: fix compile errors in dma-mapping-common.h
  alpha: remove trailing spaces in messages
  alpha: use __ratelimit

14 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Fri, 19 Mar 2010 20:42:43 +0000 (13:42 -0700)]
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc: Remove IOMMU_VMERGE config option
  powerpc: Fix swiotlb to respect the boot option
  powerpc: Do not call prink when CONFIG_PRINTK is not defined
  powerpc: Use correct ccr bit for syscall error status
  powerpc/fsl-booke: Get coherent bit from PTE
  powerpc/85xx: Make sure lwarx hint isn't set on ppc32

14 years agoMerge branch 'zerolen' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/misc-2.6
Linus Torvalds [Fri, 19 Mar 2010 20:42:00 +0000 (13:42 -0700)]
Merge branch 'zerolen' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/misc-2.6

* 'zerolen' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
  Delete zero-length file drivers/mtd/maps/omap_nor.c

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
Linus Torvalds [Fri, 19 Mar 2010 20:40:03 +0000 (13:40 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6:
  tty_port,usb-console: Fix usb serial console open/close regression
  tty: cpm_uart: use resource_size()
  tty_buffer: Fix distinct type warning
  hvc_console: Fix race between hvc_close and hvc_remove
  uartlite: Fix build on sparc.
  tty: Take a 256 byte padding into account when buffering below sub-page units
  Revert "tty: Add a new VT mode which is like VT_PROCESS but doesn't require a VT_RELDISP ioctl call"

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
Linus Torvalds [Fri, 19 Mar 2010 20:39:42 +0000 (13:39 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
  driver core: numa: fix BUILD_BUG_ON for node_read_distance
  driver-core: document ERR_PTR() return values
  kobject: documentation: Update to refer to kset-example.c.
  sysdev: the cpu probe/release attributes should be sysdev_class_attributes
  kobject: documentation: Fix erroneous example in kobject doc.
  driver-core: fix missing kernel-doc in firmware_class
  Driver core: Early platform kernel-doc update
  sysfs: fix sysfs lockdep warning in mlx4 code
  sysfs: fix sysfs lockdep warning in infiniband code
  sysfs: fix sysfs lockdep warning in ipmi code
  sysfs: Initialised pci bus legacy_mem field before use
  sysfs: use sysfs_bin_attr_init in firmware class driver

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Fri, 19 Mar 2010 20:39:21 +0000 (13:39 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (45 commits)
  USB: gadget/multi: cdc_do_config: remove redundant check
  usb: r8a66597-hcd: fix removed from an attached hub
  USB: xhci: Make endpoint interval debugging clearer.
  USB: Fix usb_fill_int_urb for SuperSpeed devices
  USB: cp210x: Remove double usb_control_msg from cp210x_set_config
  USB: Remove last bit of CONFIG_USB_BERRY_CHARGE
  USB: gadget: add gadget controller number for s3c-hsotg driver
  USB: ftdi_sio: Fix locking for change_speed() function
  USB: g_mass_storage: fixed module name in Kconfig
  USB: gadget: f_mass_storage::fsg_bind(): fix error handling
  USB: g_mass_storage: fix section mismatch warnings
  USB: gadget: fix Blackfin builds after gadget cleansing
  USB: goku_udc: remove potential null dereference
  USB: option.c: Add Pirelli VID/PID and indicate Pirelli's modem interface is 0xff
  USB: serial: Fix module name typo for qcaux Kconfig entry.
  usb: cdc-wdm: Fix deadlock between write and resume
  usb: cdc-wdm: Fix order in disconnect and fix locking
  usb: cdc-wdm:Fix loss of data due to autosuspend
  usb: cdc-wdm: Fix submission of URB after suspension
  usb: cdc-wdm: Fix race between disconnect and debug messages
  ...

14 years agoDelete zero-length file drivers/mtd/maps/omap_nor.c
Jeff Garzik [Fri, 19 Mar 2010 18:25:45 +0000 (14:25 -0400)]
Delete zero-length file drivers/mtd/maps/omap_nor.c

The content was deleted in cc87edb173effdf74e680ee6d622a935ff0c1d6f,
but the file remained as a zero-length file.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
Linus Torvalds [Fri, 19 Mar 2010 16:43:06 +0000 (09:43 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (205 commits)
  ceph: update for write_inode API change
  ceph: reset osd after relevant messages timed out
  ceph: fix flush_dirty_caps race with caps migration
  ceph: include migrating caps in issued set
  ceph: fix osdmap decoding when pools include (removed) snaps
  ceph: return EBADF if waiting for caps on closed file
  ceph: set osd request message front length correctly
  ceph: reset front len on return to msgpool; BUG on mismatched front iov
  ceph: fix snaptrace decoding on cap migration between mds
  ceph: use single osd op reply msg
  ceph: reset bits on connection close
  ceph: remove bogus mds forward warning
  ceph: remove fragile __map_osds optimization
  ceph: fix connection fault STANDBY check
  ceph: invalidate_authorizer without con->mutex held
  ceph: don't clobber write return value when using O_SYNC
  ceph: fix client_request_forward decoding
  ceph: drop messages on unregistered mds sessions; cleanup
  ceph: fix comments, locking in destroy_inode
  ceph: move dereference after NULL test
  ...

Fix trivial conflicts in Documentation/ioctl/ioctl-number.txt

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Fri, 19 Mar 2010 16:36:18 +0000 (09:36 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  cifs: trivial white space
  [CIFS] checkpatch cleanup
  cifs: add cifs_revalidate_file
  cifs: add a CIFSSMBUnixQFileInfo function
  cifs: add a CIFSSMBQFileInfo function
  cifs: overhaul cifs_revalidate and rename to cifs_revalidate_dentry

14 years agoASoC: pxa-pcm-lib: initialize DMA channel to -1
Daniel Mack [Sun, 28 Feb 2010 02:42:38 +0000 (10:42 +0800)]
ASoC: pxa-pcm-lib: initialize DMA channel to -1

This fixes a warning ("pxa_free_dma: trying to free channel 0 which is
already freed") when a device was opened but the hw_params() call
failed.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoUSB: gadget/multi: cdc_do_config: remove redundant check
Peter Korsgaard [Fri, 12 Mar 2010 11:33:15 +0000 (12:33 +0100)]
USB: gadget/multi: cdc_do_config: remove redundant check

cdc_do_config() had a double ret check after fsg_add().

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agousb: r8a66597-hcd: fix removed from an attached hub
Yoshihiro Shimoda [Tue, 16 Mar 2010 03:29:35 +0000 (12:29 +0900)]
usb: r8a66597-hcd: fix removed from an attached hub

fix the problem that when a USB hub is attached to the r8a66597-hcd and
a device is removed from that hub, it's likely that a kernel panic follows.

Reported-by: Markus Pietrek <Markus.Pietrek@emtrion.de>
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: xhci: Make endpoint interval debugging clearer.
Sarah Sharp [Tue, 16 Mar 2010 19:59:24 +0000 (12:59 -0700)]
USB: xhci: Make endpoint interval debugging clearer.

The xHCI hardware can only handle polling intervals that are a power of
two.  When we add a new endpoint during a bandwidth allocation, and the
polling interval is rounded down to a power of two, print the original
polling interval in the endpoint descriptor.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: Fix usb_fill_int_urb for SuperSpeed devices
Matthew Wilcox [Tue, 16 Mar 2010 19:55:44 +0000 (12:55 -0700)]
USB: Fix usb_fill_int_urb for SuperSpeed devices

USB 3 and Wireless USB specify a logarithmic encoding of the endpoint
interval that matches the USB 2 specification.  usb_fill_int_urb() didn't
know that and was filling in the interval as if it was USB 1.1.  Fix
usb_fill_int_urb() for SuperSpeed devices, but leave the wireless case
alone, because David Vrabel wants to keep the old encoding.

Update the struct urb kernel doc to note that SuperSpeed URBs must have
urb->interval specified in microframes.

Add a missing break statement in the usb_submit_urb() interrupt URB
checking, since wireless USB and SuperSpeed USB encode urb->interval
differently.  This allows xHCI roothubs to actually register with khubd.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: cp210x: Remove double usb_control_msg from cp210x_set_config
Michael Brunner [Wed, 10 Mar 2010 22:26:37 +0000 (23:26 +0100)]
USB: cp210x: Remove double usb_control_msg from cp210x_set_config

This patch removes a double usb_control_msg that sets the cp210x
configuration registers a second time when calling cp210x_set_config.
For data sizes >2 the second write gets corrupted.
The patch has been created against 2.6.34-rc1, but all cp210x driver
revisions are affected.

Signed-off-by: Michael Brunner <mibru@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: Remove last bit of CONFIG_USB_BERRY_CHARGE
Christoph Egger [Wed, 10 Mar 2010 11:33:11 +0000 (12:33 +0100)]
USB: Remove last bit of CONFIG_USB_BERRY_CHARGE

One last bit was missed while removing the USB_BERRY_CHARGE config
option in a8d4211f33a9573f7b1bdcfd9c9c48631d1515ee which gets dropped
by this patch.

Signed-off-by: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: gadget: add gadget controller number for s3c-hsotg driver
Maurus Cuelenaere [Mon, 8 Mar 2010 17:20:59 +0000 (18:20 +0100)]
USB: gadget: add gadget controller number for s3c-hsotg driver

This prevents some drivers from complaining that no bcdDevice id was set.

Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ftdi_sio: Fix locking for change_speed() function
Alessio Igor Bogani [Sat, 13 Mar 2010 17:35:14 +0000 (18:35 +0100)]
USB: ftdi_sio: Fix locking for change_speed() function

The change_speed() function should be serialized against multiple calls.
Use the cfg_lock mutex to do this.

Signed-off-by: Alessio Igor Bogani <abogani@texware.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: g_mass_storage: fixed module name in Kconfig
Michal Nazarewicz [Mon, 15 Mar 2010 10:10:23 +0000 (11:10 +0100)]
USB: g_mass_storage: fixed module name in Kconfig

The Kconfig help message for Mass Storage Gadget claimed the
module will be named "g_file_storage" whereas it should be
"g_mass_storage".

Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: gadget: f_mass_storage::fsg_bind(): fix error handling
Peter Korsgaard [Fri, 12 Mar 2010 14:55:28 +0000 (15:55 +0100)]
USB: gadget: f_mass_storage::fsg_bind(): fix error handling

Contrary to the comment in fsg_add, fsg_bind calls fsg_unbind on errors,
which decreases refcount and frees the fsg_dev structure, causing trouble
when fsg_add does the same.

Fix it by simply leaving up cleanup to fsg_add().

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Michal Nazarewicz <m.nazarewicz@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: g_mass_storage: fix section mismatch warnings
Mike Frysinger [Sun, 7 Mar 2010 15:36:27 +0000 (10:36 -0500)]
USB: g_mass_storage: fix section mismatch warnings

The recent commit (0e530b45783f75) that moved usb_ep_autoconfig from the
__devinit section to the __init section missed the mass storage device.
Its fsg_bind() function uses the usb_ep_autoconfig() function from non
__init context leading to:
WARNING: drivers/usb/gadget/g_mass_storage.o(.text): Section mismatch in
reference from the function _fsg_bind()
            to the function .init.text:_usb_ep_autoconfig()

So move fsg_bind() into __init as well.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: gadget: fix Blackfin builds after gadget cleansing
Mike Frysinger [Tue, 9 Mar 2010 05:35:22 +0000 (00:35 -0500)]
USB: gadget: fix Blackfin builds after gadget cleansing

The recent change to clean out dead gadget drivers (90f7976880bbbf99)
missed the call to gadget_is_musbhsfc() behind CONFIG_BLACKFIN.  This
causes Blackfin gadget builds to fail since the function no longer
exists anywhere.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: goku_udc: remove potential null dereference
Dan Carpenter [Sat, 6 Mar 2010 11:08:56 +0000 (14:08 +0300)]
USB: goku_udc: remove potential null dereference

"dev" is always null here.  In the end it's only used to get the
pci_name() of "pdev" which is redundant information and so I
removed it.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: option.c: Add Pirelli VID/PID and indicate Pirelli's modem interface is 0xff
spark [Fri, 5 Mar 2010 06:18:05 +0000 (14:18 +0800)]
USB: option.c: Add Pirelli VID/PID and indicate Pirelli's modem interface is 0xff

Signed-off-by: spark <spark@bandrich.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: Fix module name typo for qcaux Kconfig entry.
Stefan Schmidt [Wed, 3 Mar 2010 18:37:12 +0000 (19:37 +0100)]
USB: serial: Fix module name typo for qcaux Kconfig entry.

The module is called qcaux and not moto_modem. Also use help instead of
---help-- to be in sync with the other Kconfig entries.

Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agousb: cdc-wdm: Fix deadlock between write and resume
Oliver Neukum [Sat, 27 Feb 2010 19:57:12 +0000 (20:57 +0100)]
usb: cdc-wdm: Fix deadlock between write and resume

The new runtime PM scheme allows resume() to have no locks.
This fixes the deadlock.

Signed-off-by: Oliver Neukum <neukum@b1-systems.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agousb: cdc-wdm: Fix order in disconnect and fix locking
Oliver Neukum [Sat, 27 Feb 2010 19:56:47 +0000 (20:56 +0100)]
usb: cdc-wdm: Fix order in disconnect and fix locking

- as the callback can schedule work, URBs must be killed first
- if the driver causes an autoresume, the caller must handle locking

Signed-off-by: Oliver Neukum <neukum@b1-systems.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agousb: cdc-wdm:Fix loss of data due to autosuspend
Oliver Neukum [Sat, 27 Feb 2010 19:56:22 +0000 (20:56 +0100)]
usb: cdc-wdm:Fix loss of data due to autosuspend

The guarding flag must be set and tested under spinlock
and cleared before the URBs are resubmitted in resume.

Signed-off-by: Oliver Neukum <neukum@b1-systems.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agousb: cdc-wdm: Fix submission of URB after suspension
Oliver Neukum [Sat, 27 Feb 2010 19:55:52 +0000 (20:55 +0100)]
usb: cdc-wdm: Fix submission of URB after suspension

There's a window under which cdc-wdm may submit
an URB to a device about to be suspended. This
introduces a flag to prevent it.

Signed-off-by: Oliver Neukum <neukum@b1-systems.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agousb: cdc-wdm: Fix race between disconnect and debug messages
Oliver Neukum [Sat, 27 Feb 2010 19:55:26 +0000 (20:55 +0100)]
usb: cdc-wdm: Fix race between disconnect and debug messages

dev_dbg() and dev_err() cannot be used to report failures
that may have been caused by a device's removal

Signed-off-by: Oliver Neukum <neukum@b1-systems.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agousb: cdc-wdm: Fix race between autosuspend and reading from the device
Oliver Neukum [Sat, 27 Feb 2010 19:54:59 +0000 (20:54 +0100)]
usb: cdc-wdm: Fix race between autosuspend and reading from the device

While an available response is read the device must not
be autosuspended. This requires a flag dedicated to that
purpose.

Signed-off-by: Oliver Neukum <neukum@b1-systems.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agousb: cdc-wdm: Fix race between write and disconnect
Oliver Neukum [Sat, 27 Feb 2010 19:54:24 +0000 (20:54 +0100)]
usb: cdc-wdm: Fix race between write and disconnect

Unify mutexes to fix a race between write and disconnect
and shift the test for disconnection to always report it.

Signed-off-by: Oliver Neukum <neukum@b1-systems.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agousb: musb: core: declare mbase only where it's used
Felipe Balbi [Fri, 12 Mar 2010 08:27:24 +0000 (10:27 +0200)]
usb: musb: core: declare mbase only where it's used

... and avoid a compilation if we disable host side
of musb.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: musb: fix warnings in Blackfin regs
Mike Frysinger [Fri, 12 Mar 2010 08:27:23 +0000 (10:27 +0200)]
USB: musb: fix warnings in Blackfin regs

The recent commit "usb: musb: Add context save and restore support" added
some stubs for the Blackfin code so things would compile, but it also
added a bunch of warnings due to missing return statements.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agousb: musb: abstract out ULPI_BUSCONTROL register reads/writes
Mike Frysinger [Fri, 12 Mar 2010 08:27:21 +0000 (10:27 +0200)]
usb: musb: abstract out ULPI_BUSCONTROL register reads/writes

The USB PHY on current Blackfin processors is a UTMI+ level 2 PHY.
However, it has no ULPI support - so there are no registers at all.
That means accesses to ULPI_BUSCONTROL have to be abstracted away
like other MUSB registers.

This fixes building for Blackfin parts again.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agousb: musb: Fix compile error for omaps for musb_hdrc
Tony Lindgren [Fri, 12 Mar 2010 08:35:20 +0000 (10:35 +0200)]
usb: musb: Fix compile error for omaps for musb_hdrc

CONFIG_ARCH_OMAP34XX is now CONFIG_ARCH_OMAP3.

But since drivers/usb/musb/omap2430.c use CONFIG_PM for these
registers and functions, do the same for the header.

Otherwise we get the following for most omap3 defconfigs:

drivers/usb/musb/omap2430.c:261: error: expected identifier or '(' before 'do'
drivers/usb/musb/omap2430.c:261: error: expected identifier or '(' before 'while'
drivers/usb/musb/omap2430.c:268: error: expected identifier or '(' before 'do'
drivers/usb/musb/omap2430.c:268: error: expected identifier or '(' before 'while'

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agousb/gadget: fix compile error on r8a66597-udc.c
Grant Likely [Thu, 11 Mar 2010 22:06:54 +0000 (15:06 -0700)]
usb/gadget: fix compile error on r8a66597-udc.c

C file uses IS_ERR and PTR_ERR, but doesn't include <linux/err.h>

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: Fix documentation for avoid_reset_quirk
Oliver Neukum [Fri, 12 Mar 2010 10:27:21 +0000 (11:27 +0100)]
USB: Fix documentation for avoid_reset_quirk

The name used in the documentation doesn't match reality.

Signed-off-by: Oliver Neukum <neukum@b1-systems.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: option: add support for a new CMOTECH device to usb/serial/option
Nathaniel McCallum [Thu, 11 Mar 2010 18:09:26 +0000 (13:09 -0500)]
USB: option: add support for a new CMOTECH device to usb/serial/option

Signed-off-by: Nathaniel McCallum <nathaniel@natemccallum.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: option: move hardcoded PID to a macro in usb/serial/option
Nathaniel McCallum [Thu, 11 Mar 2010 18:01:17 +0000 (13:01 -0500)]
USB: option: move hardcoded PID to a macro in usb/serial/option

Signed-off-by: Nathaniel McCallum <nathaniel@natemccallum.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: option: fix incorrect manufacturer name in usb/serial/option: MAXON->CMOTECH
Nathaniel McCallum [Thu, 11 Mar 2010 18:09:24 +0000 (13:09 -0500)]
USB: option: fix incorrect manufacturer name in usb/serial/option: MAXON->CMOTECH

Signed-off-by: Nathaniel McCallum <nathaniel@natemccallum.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: ftdi: add CONTEC vendor and product id
Daniel Sangorrin [Thu, 11 Mar 2010 22:10:58 +0000 (14:10 -0800)]
USB: serial: ftdi: add CONTEC vendor and product id

This is a patch to ftdi_sio_ids.h and ftdi_sio.c that adds identifiers for
CONTEC USB serial converter.  I tested it with the device COM-1(USB)H

[akpm@linux-foundation.org: keep the VIDs sorted a bit]
Signed-off-by: Daniel Sangorrin <daniel.sangorrin@gmail.com>
Cc: Andreas Mohr <andi@lisas.de>
Cc: Radek Liboska <liboska@uochb.cas.cz>
Cc: stable <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: xHCI: re-initialize cmd_completion
Andiry Xu [Fri, 12 Mar 2010 09:10:04 +0000 (17:10 +0800)]
USB: xHCI: re-initialize cmd_completion

When a signal interrupts a Configure Endpoint command, the cmd_completion used
in xhci_configure_endpoint() is not re-initialized and the
wait_for_completion_interruptible_timeout() will return failure. Initialize
cmd_completion in xhci_configure_endpoint().

Signed-off-by: Andiry Xu <andiry.xu@amd.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: xhci: rename driver to xhci_hcd
Alex Chiang [Tue, 16 Mar 2010 20:48:45 +0000 (14:48 -0600)]
USB: xhci: rename driver to xhci_hcd

Naming consistency with other USB HCDs.

Signed-off-by: Alex Chiang <achiang@hp.com>
Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: musb: fix build error introduced by isoc change
Sonic Zhang [Mon, 8 Mar 2010 16:26:01 +0000 (11:26 -0500)]
USB: musb: fix build error introduced by isoc change

The recent commit "usb: musb: Fix for isochronous IN transfer" (f82a689fa)
seems to have been against an older kernel version.  It uses the old style
naming of variables.  Unfortunately, this breaks building for most MUSB
users out there since "bDesiredMode" has been renamed to "desired_mode".

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Acked-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: qcserial: add new device ids
Bernhard Rosenkraenzer [Wed, 10 Mar 2010 11:36:43 +0000 (12:36 +0100)]
USB: qcserial: add new device ids

This patch adds various USB device IDs for Gobi 2000 devices, as found in the
drivers available at https://www.codeaurora.org/wiki/GOBI_Releases

Signed-off-by: Bernhard Rosenkraenzer <bero@arklinux.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: cdc-acm: Fix stupid NULL pointer in resume()
Oliver Neukum [Tue, 2 Mar 2010 23:37:56 +0000 (00:37 +0100)]
USB: cdc-acm: Fix stupid NULL pointer in resume()

Stupid logic bug passing a just nulled pointer

Signed-off-by: Oliver Neukum <neukum@b1-systems.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: EHCI: adjust ehci_iso_stream for changes in ehci_qh
Clemens Ladisch [Mon, 1 Mar 2010 16:18:56 +0000 (17:18 +0100)]
USB: EHCI: adjust ehci_iso_stream for changes in ehci_qh

The EHCI driver stores in usb_host_endpoint.hcpriv a pointer to either
an ehci_qh or an ehci_iso_stream structure, and uses the contents of the
hw_info1 field to distinguish the two cases.

After ehci_qh was split into hw and sw parts, ehci_iso_stream must also
be adjusted so that it again looks like an ehci_qh structure.

This fixes a NULL pointer access in ehci_endpoint_disable() when it
tries to access qh->hw->hw_info1.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Reported-by: Colin Fletcher <colin.m.fletcher@googlemail.com>
Cc: stable <stable@kernel.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: EHCI: fix ITD list order
Clemens Ladisch [Mon, 1 Mar 2010 08:12:50 +0000 (09:12 +0100)]
USB: EHCI: fix ITD list order

When isochronous URBs are shorter than one frame and when more than one
ITD in a frame has been completed before the interrupt can be handled,
scan_periodic() completes the URBs in the order in which they are found
in the descriptor list.  Therefore, the descriptor list must contain the
ITDs in the correct order, i.e., a new ITD must be linked in after any
previous ITDs of the same endpoint.

This should fix garbled capture data in the USB audio drivers.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Reported-by: Colin Fletcher <colin.m.fletcher@googlemail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: Option: Add support for a variant of DLink DWM 652 U5
Huang Ying [Sun, 28 Feb 2010 05:51:29 +0000 (13:51 +0800)]
USB: Option: Add support for a variant of DLink DWM 652 U5

I found a DLink DWM 652 U5 USB 3G modem has product ID 0xce1e instead
of orignal 0xce16. The new ID is added.

And I found there are two entries for 0xce16, one has raw number, the
other has symbol DLINK_PRODUCT_DWM_652_U5. This is fixed too.

Signed-off-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: unusual_devs.h: Fix capacity for SL11R-IDE 2.6c
Ondrej Zary [Sat, 27 Feb 2010 21:56:28 +0000 (22:56 +0100)]
USB: unusual_devs.h: Fix capacity for SL11R-IDE 2.6c

SL11R-IDE 2.6c (at least) reports wrong capacity (one sector more).
Reading that last sector causes the device not to work anymore (and looks
like HAL or something does that automatically after plugging in):
sd 5:0:0:0: [sdc] Device not ready
sd 5:0:0:0: [sdc] Result: hostbyte=0x00 driverbyte=0x08
sd 5:0:0:0: [sdc] Sense Key : 0x2 [current]
sd 5:0:0:0: [sdc] ASC=0x0 ASCQ=0x0
sd 5:0:0:0: [sdc] CDB: cdb[0]=0x28: 28 00 04 a8 b5 70 00 00 01 00

Add unusual_devs entry to fix the capacity.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: use port endpoint size to determine if ep is available
Johan Hovold [Sat, 27 Feb 2010 15:24:49 +0000 (16:24 +0100)]
USB: serial: use port endpoint size to determine if ep is available

It is possible to have a multi-port device with a port lacking an in or
out bulk endpoint. Only checking for num_bulk_in or num_bulk_out is thus not
sufficient to determine whether a specific port has an in or out bulk
endpoint.

This fixes potential null pointer dereferences in the generic open and
write routines, as well as access to uninitialised fifo in write_room
and chars_in_buffer.

Also let write fail with ENODEV (instead of 0) on missing out endpoint
(also on zero-length writes).

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: fix softint not being called on errors
Johan Hovold [Sat, 27 Feb 2010 13:06:07 +0000 (14:06 +0100)]
USB: serial: fix softint not being called on errors

Make sure usb_serial_port_softint is called on errors also when using
multi urb writes.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: fix error message on close in generic driver
Johan Hovold [Sat, 27 Feb 2010 13:05:46 +0000 (14:05 +0100)]
USB: serial: fix error message on close in generic driver

Resubmitting read urb fails with -EPERM if completion handler runs while
urb is being killed on close. This should not be reported as an error.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: fix usbfs regression
Alan Stern [Sat, 6 Mar 2010 20:04:03 +0000 (15:04 -0500)]
USB: fix usbfs regression

This patch (as1352) fixes a bug in the way isochronous input data is
returned to userspace for usbfs transfers.  The entire buffer must be
copied, not just the first actual_length bytes, because the individual
packets will be discontiguous if any of them are short.

Reported-by: Markus Rechberger <mrechberger@gmail.com>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotty_port,usb-console: Fix usb serial console open/close regression
Jason Wessel [Tue, 9 Mar 2010 03:50:11 +0000 (21:50 -0600)]
tty_port,usb-console: Fix usb serial console open/close regression

Commit e1108a63e10d344284011cccc06328b2cd3e5da3 ("usb_serial: Use the
shutdown() operation") breaks the ability to use a usb console
starting in 2.6.33.  This was observed when using
console=ttyUSB0,115200 as a boot argument with an FTDI device.  The
error is:

ftdi_sio ttyUSB0: ftdi_submit_read_urb - failed submitting read urb, error -22

The handling of the ASYNCB_INITIALIZED changed in 2.6.32 such that in
tty_port_shutdown() it always clears the flag if it is set.  The fix
is to add a variable to the tty_port struct to indicate when the tty
port is a console.

CC: Alan Cox <alan@linux.intel.com>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Oliver Neukum <oliver@neukum.org>
CC: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotty: cpm_uart: use resource_size()
Tobias Klauser [Thu, 11 Mar 2010 22:08:18 +0000 (14:08 -0800)]
tty: cpm_uart: use resource_size()

Use the resource_size function instead of manually calculating the
resource size.  This reduces the chance of introducing off-by-one errors.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Kumar Gala <galak@gate.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotty_buffer: Fix distinct type warning
Fang Wenqi [Tue, 9 Mar 2010 10:54:28 +0000 (18:54 +0800)]
tty_buffer: Fix distinct type warning

CC      drivers/char/tty_buffer.o
drivers/char/tty_buffer.c: In function ‘tty_insert_flip_string_fixed_flag’:
drivers/char/tty_buffer.c:251: warning: comparison of distinct pointer types lacks a cast
drivers/char/tty_buffer.c: In function ‘tty_insert_flip_string_flags’:
drivers/char/tty_buffer.c:288: warning: comparison of distinct pointer types lacks a cast

Fix it by replacing min() with min_t() in tty_insert_flip_string_flags and
  tty_insert_flip_string_fixed_flag().

Signed-off-by: Fang Wenqi <antonf@turbolinux.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agohvc_console: Fix race between hvc_close and hvc_remove
Amit Shah [Fri, 12 Mar 2010 06:23:15 +0000 (11:53 +0530)]
hvc_console: Fix race between hvc_close and hvc_remove

Alan pointed out a race in the code where hvc_remove is invoked. The
recent virtio_console work is the first user of hvc_remove().

Alan describes it thus:

The hvc_console assumes that a close and remove call can't occur at the
same time.

In addition tty_hangup(tty) is problematic as tty_hangup is asynchronous
itself....

So this can happen

        hvc_close                               hvc_remove
        hung up ? - no
                                                lock
                                                tty = hp->tty
                                                unlock
        lock
        hp->tty = NULL
        unlock
        notify del
        kref_put the hvc struct
        close completes
        tty is destroyed
                                                tty_hangup dead tty
                                                tty->ops will be NULL
                                                NULL->...

This patch adds some tty krefs and also converts to using tty_vhangup().

Reported-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
CC: Alan Cox <alan@lxorguk.ukuu.org.uk>
CC: linuxppc-dev@ozlabs.org
CC: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agouartlite: Fix build on sparc.
David Miller [Wed, 3 Mar 2010 10:50:26 +0000 (02:50 -0800)]
uartlite: Fix build on sparc.

We can get this driver enabled via MFD_TIMBERDALE which only
requires GPIO to be on.

But the of_address_to_resource() function is only present on
powerpc and microblaze, so we have to conditionalize the
CONFIG_OF probing bits on that.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotty: Take a 256 byte padding into account when buffering below sub-page units
Mel Gorman [Tue, 2 Mar 2010 22:24:19 +0000 (22:24 +0000)]
tty: Take a 256 byte padding into account when buffering below sub-page units

The TTY layer takes some care to ensure that only sub-page allocations
are made with interrupts disabled. It does this by setting a goal of
"TTY_BUFFER_PAGE" to allocate. Unfortunately, while TTY_BUFFER_PAGE takes the
size of tty_buffer into account, it fails to account that tty_buffer_find()
rounds the buffer size out to the next 256 byte boundary before adding on
the size of the tty_buffer.

This patch adjusts the TTY_BUFFER_PAGE calculation to take into account the
size of the tty_buffer and the padding. Once applied, tty_buffer_alloc()
should not require high-order allocations.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoRevert "tty: Add a new VT mode which is like VT_PROCESS but doesn't require a VT_RELD...
Greg Kroah-Hartman [Tue, 16 Mar 2010 00:14:15 +0000 (17:14 -0700)]
Revert "tty: Add a new VT mode which is like VT_PROCESS but doesn't require a VT_RELDISP ioctl call"

This reverts commit eec9fe7d1ab4a0dfac4cb43047a7657fffd0002f.

Ari writes as the reason this should be reverted:
The problems with this patch include:
1. There's at least one subtlety I overlooked - switching
between X servers (i.e. from one X VT to another) still requires
the cooperation of both X servers. I was assuming that KMS
eliminated this.
2. It hasn't been tested at all (no X server patch exists which
uses the new mode).

As he was the original author of the patch, I'll revert it.

Cc: Ari Entlich <atrigent@ccs.neu.edu>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agodriver core: numa: fix BUILD_BUG_ON for node_read_distance
David Rientjes [Wed, 10 Mar 2010 22:50:21 +0000 (14:50 -0800)]
driver core: numa: fix BUILD_BUG_ON for node_read_distance

node_read_distance() has a BUILD_BUG_ON() to prevent buffer overruns when
the number of nodes printed will exceed the buffer length.

Each node only needs four chars: three for distance (maximum distance is
255) and one for a seperating space or a trailing newline.

Signed-off-by: David Rientjes <rientjes@google.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agodriver-core: document ERR_PTR() return values
Jani Nikula [Thu, 11 Mar 2010 16:11:45 +0000 (18:11 +0200)]
driver-core: document ERR_PTR() return values

A number of functions in the driver core return ERR_PTR() values on
error. Document this in the kernel-doc of the functions.

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agokobject: documentation: Update to refer to kset-example.c.
Robert P. J. Day [Fri, 12 Mar 2010 12:30:35 +0000 (07:30 -0500)]
kobject: documentation: Update to refer to kset-example.c.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agosysdev: the cpu probe/release attributes should be sysdev_class_attributes
Stephen Rothwell [Mon, 15 Mar 2010 23:33:32 +0000 (10:33 +1100)]
sysdev: the cpu probe/release attributes should be sysdev_class_attributes

This fixes these warnings:

drivers/base/cpu.c:264: warning: initialization from incompatible pointer type
drivers/base/cpu.c:265: warning: initialization from incompatible pointer type

Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agokobject: documentation: Fix erroneous example in kobject doc.
Robert P. J. Day [Thu, 11 Mar 2010 12:59:09 +0000 (07:59 -0500)]
kobject: documentation: Fix erroneous example in kobject doc.

Replace uio_mem example for kobjects with uio_map, since the uio_mem
struct no longer contains a kobject.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agodriver-core: fix missing kernel-doc in firmware_class
Randy Dunlap [Wed, 10 Mar 2010 19:47:58 +0000 (11:47 -0800)]
driver-core: fix missing kernel-doc in firmware_class

Fix kernel-doc warning in firmware_class.c:

Warning(drivers/base/firmware_class.c:94): No description found for parameter 'attr'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoDriver core: Early platform kernel-doc update
Magnus Damm [Wed, 10 Mar 2010 11:50:38 +0000 (20:50 +0900)]
Driver core: Early platform kernel-doc update

This patch updates the kernel-doc notation for early
platform functions.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agosysfs: fix sysfs lockdep warning in mlx4 code
Greg Kroah-Hartman [Mon, 15 Mar 2010 21:01:55 +0000 (14:01 -0700)]
sysfs: fix sysfs lockdep warning in mlx4 code

This fixes a sysfs lockdep warning in the mlx4 code.

Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Eric Biederman <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agosysfs: fix sysfs lockdep warning in infiniband code
Greg Kroah-Hartman [Mon, 15 Mar 2010 21:01:25 +0000 (14:01 -0700)]
sysfs: fix sysfs lockdep warning in infiniband code

This fixes a sysfs lockdep warning in the infiniband code.

Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Eric Biederman <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agosysfs: fix sysfs lockdep warning in ipmi code
Greg Kroah-Hartman [Mon, 15 Mar 2010 20:59:51 +0000 (13:59 -0700)]
sysfs: fix sysfs lockdep warning in ipmi code

This fixes a sysfs lockdep warning in the ipmi code.

Thanks to Eric Biederman and Yinghai Lu for the original versions of the
patch, unfortunatly they did not submit them in a form they could be
applied in.

Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Eric Biederman <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agosysfs: Initialised pci bus legacy_mem field before use
Mel Gorman [Wed, 10 Mar 2010 22:48:34 +0000 (22:48 +0000)]
sysfs: Initialised pci bus legacy_mem field before use

PPC64 is failing to boot the latest mmotm due to an uninitialised pointer in
pci_create_legacy_files(). The surprise is that machines boot at all and it
would appear to affect current mainline as well.  This patch fixes the problem.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agosysfs: use sysfs_bin_attr_init in firmware class driver
Jiri Kosina [Tue, 9 Mar 2010 18:30:28 +0000 (19:30 +0100)]
sysfs: use sysfs_bin_attr_init in firmware class driver

Annotate dynamic sysfs attribute in fw_setup_device(). This gets
rid of the following lockdep warning:

bnx2 0000:08:00.0: firmware: requesting bnx2/bnx2-mips-06-5.0.0.j6.fw
BUG: key ffff880008293470 not in .data!
------------[ cut here ]------------
WARNING: at kernel/lockdep.c:2706 lockdep_init_map+0x562/0x620()
Modules linked in: bnx2(+) sg tpm_bios floppy rtc_lib usb_storage i2c_piix4 joydev button container shpchp i2c_core sr_mod cdrom pci_hotplug usbhid hid ohci_hcd ehci_hcd sd_mod usbcore edd ext3 mbcache jbd fan ata_generic sata_svw pata_serverworks libata scsi_mod thermal processor
Pid: 1915, comm: work_for_cpu Not tainted 2.6.34-rc1-default #81
Call Trace:
 [<ffffffff8107c1d2>] ? lockdep_init_map+0x562/0x620
 [<ffffffff81049fd8>] warn_slowpath_common+0x78/0xd0
 [<ffffffff8104a03f>] warn_slowpath_null+0xf/0x20
 [<ffffffff8107c1d2>] lockdep_init_map+0x562/0x620
 [<ffffffff8117a236>] ? sysfs_new_dirent+0x76/0x120
 [<ffffffff8126edb2>] ? put_device+0x12/0x20
 [<ffffffff811797cc>] sysfs_add_file_mode+0x6c/0xd0
 [<ffffffff8117983c>] sysfs_add_file+0xc/0x10
 [<ffffffff8117bf61>] sysfs_create_bin_file+0x21/0x30
 [<ffffffff81279c61>] _request_firmware+0x2f1/0x650
 [<ffffffff8127a04e>] request_firmware+0xe/0x10
 [<ffffffffa01ec19e>] bnx2_init_one+0x8f5/0x177e [bnx2]
 [<ffffffff81389eab>] ? _raw_spin_unlock_irq+0x2b/0x40
 [<ffffffff81040ed9>] ? finish_task_switch+0x69/0x100
 [<ffffffff81040e70>] ? finish_task_switch+0x0/0x100
 [<ffffffff81064b40>] ? do_work_for_cpu+0x0/0x30
 [<ffffffff811e6302>] local_pci_probe+0x12/0x20
 [<ffffffff81064b53>] do_work_for_cpu+0x13/0x30
 [<ffffffff81064b40>] ? do_work_for_cpu+0x0/0x30
 [<ffffffff81068c56>] kthread+0x96/0xa0
 [<ffffffff81003e64>] kernel_thread_helper+0x4/0x10
 [<ffffffff8138a350>] ? restore_args+0x0/0x30
 [<ffffffff81068bc0>] ? kthread+0x0/0xa0
 [<ffffffff81003e60>] ? kernel_thread_helper+0x0/0x10
---[ end trace a2ecee9c9602d195 ]---

Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoASoC: Bail out of wm_hubs DC servo if calibration fails
Mark Brown [Thu, 18 Mar 2010 12:25:35 +0000 (12:25 +0000)]
ASoC: Bail out of wm_hubs DC servo if calibration fails

We're keeping track of the number of times we've iterated but never
actually using this to bail out if the chip looks stuck.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoASoC: tlv320dac33: Internal clocking changes
Peter Ujfalusi [Fri, 19 Mar 2010 09:10:20 +0000 (11:10 +0200)]
ASoC: tlv320dac33: Internal clocking changes

During validation of the internal clocking setup it has
been found that the following settings were not configured
in an optimal way:

ASRC_CTRL_A: SRCLKDIV was incorrect, instad of divide ratio 3,
             ratio of 2 has to be used (as the comment stated)
DAC_CTRL_A: Fs = Fsref is the desired configuration instead of
            Fs = Fsref / 1.5

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: tlv320dac33: Fix DSP modes
Peter Ujfalusi [Fri, 19 Mar 2010 09:10:19 +0000 (11:10 +0200)]
ASoC: tlv320dac33: Fix DSP modes

To make DSP_A mode working correctly the data delay should be
configured to 0. DSP_B mode thus can not be used with DAC33,
so remove it.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agopowerpc: Remove IOMMU_VMERGE config option
FUJITA Tomonori [Tue, 2 Mar 2010 14:25:38 +0000 (14:25 +0000)]
powerpc: Remove IOMMU_VMERGE config option

The description says:

 Cause IO segments sent to a device for DMA to be merged virtually
 by the IOMMU when they happen to have been allocated contiguously.
 This doesn't add pressure to the IOMMU allocator. However, some
 drivers don't support getting large merged segments coming back
 from *_map_sg().

 Most drivers don't have this problem; it is safe to say Y here.

It's out of date. Long ago, drivers didn't have a way to tell IOMMUs
about their segment length limit (that is, the maximum segment length
that they can handle). So IOMMUs merged as many segments as possible
and gave too large segments to drivers.

dma_get_max_seg_size() was introduced to solve the above
problem. Device drives can use the API to tell IOMMU about the maximum
segment length that they can handle. In addition, the default limit
(64K) should be safe for everyone.

So this config option seems to be unnecessary.

Note that this config option just enables users to disable the virtual
merging by default. Users can still disable the virtual merging by the
boot parameter.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agopowerpc: Fix swiotlb to respect the boot option
FUJITA Tomonori [Tue, 16 Mar 2010 13:16:25 +0000 (13:16 +0000)]
powerpc: Fix swiotlb to respect the boot option

powerpc initializes swiotlb before parsing the kernel boot options so
swiotlb options (e.g. specifying the swiotlb buffer size) are ignored.

Any time before freeing bootmem works for swiotlb so this patch moves
powerpc's swiotlb initialization after parsing the kernel boot
options, mem_init (as x86 does).

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Tested-by: Becky Bruce <beckyb@kernel.crashing.org>
Tested-by: Albert Herranz <albert_herranz@yahoo.es>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agopowerpc: Do not call prink when CONFIG_PRINTK is not defined
Márton Németh [Sat, 6 Mar 2010 22:43:55 +0000 (22:43 +0000)]
powerpc: Do not call prink when CONFIG_PRINTK is not defined

When printk() is disabled (CONFIG_PRINTK) at menu item
 General setup
 -> Configure standard kernel features (for small systems)
    -> Enable support for printk
then there should be no printk() calls at all.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agopowerpc: Use correct ccr bit for syscall error status
Nathan Lynch [Fri, 12 Mar 2010 13:16:02 +0000 (13:16 +0000)]
powerpc: Use correct ccr bit for syscall error status

The powerpc implementations of syscall_get_error and
syscall_set_return_value should use CCR0:S0 (0x10000000) for testing
and setting syscall error status.  Fortunately these APIs don't seem
to be used at the moment.

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agoMerge commit 'kumar/merge' into merge
Benjamin Herrenschmidt [Fri, 19 Mar 2010 05:23:55 +0000 (16:23 +1100)]
Merge commit 'kumar/merge' into merge

14 years agoalpha: fix compile errors in dma-mapping-common.h
FUJITA Tomonori [Fri, 19 Mar 2010 02:35:28 +0000 (22:35 -0400)]
alpha: fix compile errors in dma-mapping-common.h

The commit c186caca3dbe7f44da624cb4f9d78e1b1dfb13b8 leads to the
following errors with CONFIG_ALPHA_{TSUNAMI, TITAN, RAWHIDE, MARVEL}:
/home/fujita/git/linux-2.6/include/asm-generic/dma-mapping-common.h: In
function `dma_map_sg_attrs':
/home/fujita/git/linux-2.6/include/asm-generic/dma-mapping-common.h:49:
error: implicit declaration of function `for_each_sg'
/home/fujita/git/linux-2.6/include/asm-generic/dma-mapping-common.h:50:
error: syntax error before "kmemcheck_mark_initialized"

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Reported-by: Michael Cree <mcree@orcon.net.nz>
Signed-off-by: Matt Turner <mattst88@gmail.com>
14 years agoalpha: remove trailing spaces in messages
Frans Pop [Mon, 1 Mar 2010 18:29:14 +0000 (13:29 -0500)]
alpha: remove trailing spaces in messages

Signed-off-by: Frans Pop <elendil@planet.nl>
Cc: linux-alpha@vger.kernel.org
Signed-off-by: Matt Turner <mattst88@gmail.com>
14 years agoalpha: use __ratelimit
Akinobu Mita [Mon, 1 Mar 2010 18:25:49 +0000 (13:25 -0500)]
alpha: use __ratelimit

Replace open-coded rate limiting logic with __ratelimit().

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: linux-alpha@vger.kernel.org
Signed-off-by: Matt Turner <mattst88@gmail.com>