GitHub/MotorolaMobilityLLC/kernel-slsi.git
14 years agoarm: msm: smd: remove Kconfig menu option
Daniel Walker [Thu, 22 Apr 2010 21:16:46 +0000 (14:16 -0700)]
arm: msm: smd: remove Kconfig menu option

This removes the Kconfig menu option. SMD can still be selected
but it's done inside the Kconfig file and not via the menu.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
14 years agoarm: msm: smd: fix SMD modem processor sync condition
Daniel Walker [Thu, 18 Mar 2010 19:31:08 +0000 (12:31 -0700)]
arm: msm: smd: fix SMD modem processor sync condition

When booting up we need to wait for the modem processor to
partially boot. This is because the modem processor does
resource allocation for us. If we don't wait the modem won't
honor our requests and we end up crashing or in an unknown
state. This change just formalizes the waiting process.

Signed-off-by: Daniel Walker <c_dwalke@quicinc.com>
14 years agoarm: msm: smd: ifdef dsp irq handler
Daniel Walker [Thu, 18 Mar 2010 17:10:30 +0000 (10:10 -0700)]
arm: msm: smd: ifdef dsp irq handler

This irq handler isn't used in all cases, so add the proper ifdef. This
eliminates a compiler warning due to the function not getting used.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
14 years agoarm: msm: smd: remove unneeded predefines
Daniel Walker [Wed, 17 Mar 2010 18:10:40 +0000 (11:10 -0700)]
arm: msm: smd: remove unneeded predefines

This just removed some unneeded predefines. One needed a whole
function moved down further. The others could just be deleted.

No functional changes.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
14 years agoarm: msm: smd: msm7x30 a2m clean up
Daniel Walker [Wed, 17 Mar 2010 17:51:10 +0000 (10:51 -0700)]
arm: msm: smd: msm7x30 a2m clean up

This moves the msm_a2m_int() function into the header, and
does a small macro clean up to be more inline with Linux
norms. No functional changes.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
14 years agoarm: msm: smd: convert unsigned addr to unsigned long
Daniel Walker [Wed, 17 Mar 2010 16:58:29 +0000 (09:58 -0700)]
arm: msm: smd: convert unsigned addr to unsigned long

"unsigned" translates to "unsigned int", but this value holds an
address. We always want to use unsigned long for addresses since
it will change size to fit the machine.

This just convert the one address holder to unsigned long.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
14 years agoarm: msm: smd: use either package v3 or v4 not both
Daniel Walker [Tue, 16 Mar 2010 23:29:44 +0000 (16:29 -0700)]
arm: msm: smd: use either package v3 or v4 not both

This modifies SMD to use either the package v3 or package v4,
but not both. The current code tries to allocate as v4 on all
system which can produce a scary looking error message on boot up,

smem_find(16, 40): wrong size 16424
smd_alloc_channel() cid=02 size=08192 'SMD_RPCCALL'

With this error the code then falls back on the package v3 allocation
method. This method is inefficient because it causes a slow down
on some systems even when the allocation method can be determined
at compile time. It also causes a kernel size increase that effects
all system and is not needed.

This change corrects the allocation to use one method or the other
and not both.

Signed-off-by: Daniel Walker <c_dwalke@quicinc.com>
14 years agoarm: msm: smd: checkpatch clean up of smd/proc_comm
Daniel Walker [Tue, 16 Mar 2010 22:20:07 +0000 (15:20 -0700)]
arm: msm: smd: checkpatch clean up of smd/proc_comm

This cleans up coding style. There are no run time changes.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
14 years ago[ARM] msm: smd: Force the half_channel struct aligmnent to 4
Dima Zavin [Sat, 9 Jan 2010 02:30:03 +0000 (18:30 -0800)]
[ARM] msm: smd: Force the half_channel struct aligmnent to 4

Forcing the alignment prevents gcc from generating byte reads for word
member variables. Lack of this caused issues when the app processor
modified struct members and the modem saw a partial word write.

Signed-off-by: Dima Zavin <dima@android.com>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
14 years agoarm: msm: correctly signal the apps-to-modem irq in smd/proc_comm
Dima Zavin [Fri, 29 Jan 2010 19:43:42 +0000 (11:43 -0800)]
arm: msm: correctly signal the apps-to-modem irq in smd/proc_comm

Signed-off-by: Dima Zavin <dima@android.com>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
14 years agomsm: smd: provide atomic channel writes
Brian Swetland [Mon, 7 Dec 2009 23:28:08 +0000 (15:28 -0800)]
msm: smd: provide atomic channel writes

Some smd clients may write from multiple threads, in which case it's
not safe to call smd_write without holding a lock.  smd_write_atomic()
provides the same functionality as smd_write() but obtains the smd
lock first.

Signed-off-by: Brian Swetland <swetland@google.com>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
14 years ago[ARM] msm: add /proc/last_radio_log when supported by the modem.
Iliyan Malchev [Mon, 16 Nov 2009 02:16:43 +0000 (18:16 -0800)]
[ARM] msm: add /proc/last_radio_log when supported by the modem.

Signed-off-by: Iliyan Malchev <malchev@google.com>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
14 years agomsm/qsd: smd: avoid race condition in smd channel allocation
Brian Swetland [Fri, 30 Oct 2009 23:22:05 +0000 (16:22 -0700)]
msm/qsd: smd: avoid race condition in smd channel allocation

Don't mark a channel as allocated if we failed to allocate it
(perhaps the modem updated one table but not the other, etc)

Signed-off-by: Brian Swetland <swetland@google.com>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
14 years ago[ARM] msm: smd: Update the correct fTAIL pointer after reading from fifo
Haley Teng [Mon, 12 Oct 2009 17:38:10 +0000 (10:38 -0700)]
[ARM] msm: smd: Update the correct fTAIL pointer after reading from fifo

When we read data out of the sender's fifo, we need to advance the sender's
tail pointer, not the receiver's.

Signed-off-by: Haley Teng <Haley_Teng@htc.com>
Acked-by: Dima Zavin <dima@android.com>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
14 years ago[ARM] msm: smd: add support for DSP SMD channels
Brian Swetland [Thu, 2 Jul 2009 01:30:47 +0000 (18:30 -0700)]
[ARM] msm: smd: add support for DSP SMD channels

- QSD8250 has a DSP that speaks SMD, in addition to the modem
- handle a separate list of modem vs dsp channels
- install dsp smd irq handler as necessary

Signed-off-by: Brian Swetland <swetland@google.com>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
14 years ago[ARM] msm: cleanup smd, separate debugfs support
Brian Swetland [Thu, 2 Jul 2009 00:58:37 +0000 (17:58 -0700)]
[ARM] msm: cleanup smd, separate debugfs support

- pull debug code into smd_debug.c
- move necessary structures and defines into smd_private.h
- fix some comment formatting, etc

Signed-off-by: Brian Swetland <swetland@google.com>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
14 years ago[ARM] msm: Add 8k power collapse support to smd
Arve Hjønnevåg [Tue, 16 Jun 2009 21:48:21 +0000 (14:48 -0700)]
[ARM] msm: Add 8k power collapse support to smd

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
14 years ago[ARM] msm: Add item argument to smsm_change_state and smsm_get_state
Arve Hjønnevåg [Wed, 20 May 2009 23:52:36 +0000 (16:52 -0700)]
[ARM] msm: Add item argument to smsm_change_state and smsm_get_state

The new protocol require writing to two state fields, and reading
several fields.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
14 years agomsm: smd: initial support for smd v2
Brian Swetland [Mon, 27 Apr 2009 01:38:49 +0000 (18:38 -0700)]
msm: smd: initial support for smd v2

- support both v2 and v1 style smd channels
- support both v2 and v1 smsm shared state
- update smsm state defines and smem item enum
- prep work for dealing with smd to qdsp6
- simplify some smem access to minimize use of smem_alloc() at runtime

Signed-off-by: Brian Swetland <swetland@google.com>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
14 years ago[ARM] msm: smd: don't crash if the smd channel table doesn't exist
Brian Swetland [Thu, 29 Jan 2009 04:25:40 +0000 (20:25 -0800)]
[ARM] msm: smd: don't crash if the smd channel table doesn't exist

Signed-off-by: Brian Swetland <swetland@google.com>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
14 years ago[ARM] msm: shared memory interface for baseband processor ipc
Brian Swetland [Mon, 29 Sep 2008 23:00:48 +0000 (16:00 -0700)]
[ARM] msm: shared memory interface for baseband processor ipc

This code provides the low level interface to the "shared memory
state machine" (smsm), and the virtual serial channels (smd), used
to communicate with the baseband processor.  Higher level transports
(rpc, ethernet, AT command channel, etc) ride on top of this.

Signed-off-by: Brian Swetland <swetland@google.com>
14 years ago[ARM] msm: sdcc: Make slot status irq be a resource
Dima Zavin [Sat, 23 May 2009 03:21:50 +0000 (20:21 -0700)]
[ARM] msm: sdcc: Make slot status irq be a resource

Also, convert all SDCC IRQ resources to be named. No longer pass status_irq
in the platform_data

Signed-off-by: Dima Zavin <dima@android.com>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
14 years ago[ARM] msm: common: Add SDC device runtime registration
San Mehat [Tue, 11 Nov 2008 00:30:27 +0000 (16:30 -0800)]
[ARM] msm: common: Add SDC device runtime registration

Signed-off-by: San Mehat <san@google.com>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
14 years agoMAINTAINERS: add MSM mailing list
Daniel Walker [Mon, 8 Mar 2010 18:37:25 +0000 (10:37 -0800)]
MAINTAINERS: add MSM mailing list

Just adds a mailing list to the MSM maintainer entry.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
14 years agoarm: msm: add board file for Nexus One (ie. mahimahi)
Daniel Walker [Thu, 4 Mar 2010 23:13:47 +0000 (15:13 -0800)]
arm: msm: add board file for Nexus One (ie. mahimahi)

This adds a basic board file without Kconfig changes.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
14 years ago[ARM] msm: add new vreg IDs for MSM7X30
Willie Ruan [Sat, 25 Jul 2009 00:21:21 +0000 (17:21 -0700)]
[ARM] msm: add new vreg IDs for MSM7X30

Signed-off-by: Willie Ruan <wruan@quicinc.com>
14 years agoarm: msm: add vreg reference count
Matt Wilson [Mon, 29 Jun 2009 19:13:04 +0000 (14:13 -0500)]
arm: msm: add vreg reference count

Support independent enable and disable by clients for common
vreg. First enable switches on and last disable switches off.

This change has no check for voltage level so clients
must agree on level for common vreg.

Signed-off-by: Matthew Wilson <mtwilson@quicinc.com>
14 years agoarm: msm: warning fix in acpuclock.c
Daniel Walker [Thu, 4 Mar 2010 22:06:56 +0000 (14:06 -0800)]
arm: msm: warning fix in acpuclock.c

Fixes the following warning,

arch/arm/mach-msm/acpuclock-arm11.c:138: warning: 'freq_table' defined but not used

when CONFIG_CPU_FREQ_TABLE is not enabled.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
14 years agoarm: msm: status for vreg
Steve Muckle [Sat, 13 Dec 2008 00:33:55 +0000 (19:33 -0500)]
arm: msm: status for vreg

Keep track of the success/failure of the last vreg proc comm
command, and return that on debugfs reads.

Signed-off-by: Steve Muckle <smuckle@quicinc.com>
14 years agoarm: msm: return error pointer in vreg_get if vreg not found
Steve Muckle [Thu, 4 Mar 2010 20:38:05 +0000 (12:38 -0800)]
arm: msm: return error pointer in vreg_get if vreg not found

Signed-off-by: Steve Muckle <smuckle@quicinc.com>
14 years agoarm: msm: move board-dream.c to board-trout.c
Daniel Walker [Wed, 3 Mar 2010 17:34:27 +0000 (09:34 -0800)]
arm: msm: move board-dream.c to board-trout.c

Move the naming of this board file back to the original Google naming.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
14 years agoarm: msm: add cpu frequency controls
Daniel Walker [Wed, 3 Mar 2010 16:54:11 +0000 (08:54 -0800)]
arm: msm: add cpu frequency controls

This adds acpuclock-arm11.c from Google. This provides control
over the cpu frequency for arm11 cpu's.

This has shared authorship between Google, and Qualcomm. Most
of it was written by Mike Chan at Google.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
14 years agomsm: add dsb() syncronization to datamover driver
Brian Swetland [Thu, 20 Aug 2009 01:49:45 +0000 (18:49 -0700)]
msm: add dsb() syncronization to datamover driver

Avoids problems on the scorpion core.

Signed-off-by: Brian Swetland <swetland@google.com>
14 years ago[ARM] msm: dma: Enable dma clock while dma is active
Arve Hjønnevåg [Fri, 26 Jun 2009 00:03:14 +0000 (17:03 -0700)]
[ARM] msm: dma: Enable dma clock while dma is active

Signed-off-by: Arve Hjønnevåg <arve@android.com>
14 years ago[ARM] msm: dma: disable_irq -> disable_irq_nosync
Arve Hjønnevåg [Sat, 18 Apr 2009 01:21:34 +0000 (18:21 -0700)]
[ARM] msm: dma: disable_irq -> disable_irq_nosync

Signed-off-by: Arve Hjønnevåg <arve@android.com>
14 years ago[ARM] msm: Update list of proc_comm enums.
Dima Zavin [Wed, 9 Sep 2009 03:15:37 +0000 (20:15 -0700)]
[ARM] msm: Update list of proc_comm enums.

Signed-off-by: Dima Zavin <dima@android.com>
14 years ago[ARM] msm: irq: fix lockdep issues
Arve Hjønnevåg [Sun, 2 Dec 2007 02:05:26 +0000 (18:05 -0800)]
[ARM] msm: irq: fix lockdep issues

Signed-off-by: Brian Swetland <swetland@google.com>
14 years ago[ARM] msm: Add MSM_DEBUG_UART option.
Arve Hjønnevåg [Tue, 18 Nov 2008 22:58:08 +0000 (14:58 -0800)]
[ARM] msm: Add MSM_DEBUG_UART option.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
14 years ago[ARM] msm: halibut: Add memory configuration.
Arve Hjønnevåg [Thu, 30 Oct 2008 04:45:46 +0000 (21:45 -0700)]
[ARM] msm: halibut: Add memory configuration.

14 years agoarm: msm: add board file for QSD8x50 SURF and FFA
Daniel Walker [Thu, 25 Feb 2010 19:38:39 +0000 (11:38 -0800)]
arm: msm: add board file for QSD8x50 SURF and FFA

This adds a basic board file without Kconfig changes.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
14 years agoarm: msm: add board file for MSM7x30 SURF and FFA
Daniel Walker [Thu, 25 Feb 2010 19:37:43 +0000 (11:37 -0800)]
arm: msm: add board file for MSM7x30 SURF and FFA

This adds a basic board file without Kconfig changes.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
14 years agoarm: msm: add board file for MSM7x25/MSM7x27 SURF and FFA
Daniel Walker [Wed, 24 Feb 2010 23:47:58 +0000 (15:47 -0800)]
arm: msm: add board file for MSM7x25/MSM7x27 SURF and FFA

This adds a basic board file without Kconfig changes.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
14 years agoarm: msm: add board file for the HTC Sapphire device
Daniel Walker [Wed, 24 Feb 2010 23:44:51 +0000 (15:44 -0800)]
arm: msm: add board file for the HTC Sapphire device

This adds a basic board file without Kconfig changes.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
14 years agoRevert "arm: msm: add oprofile pmu support"
Daniel Walker [Fri, 7 May 2010 19:09:52 +0000 (12:09 -0700)]
Revert "arm: msm: add oprofile pmu support"

This reverts commit ee3c454b8da04815c1884ed85fe89d2d131c0e51.

As request by Russell King.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
14 years agoarm: mm: qsd8x50: Fix incorrect permission faults
Dave Estes [Tue, 11 Aug 2009 21:58:49 +0000 (17:58 -0400)]
arm: mm: qsd8x50: Fix incorrect permission faults

Handle incorrectly reported permission faults for qsd8650.  On
permission faults, retry MVA to PA conversion.  If retry detects
translation fault.  Report as translation fault.

Cc: Jamie Lokier <jamie@shareable.org>
Signed-off-by: Dave Estes <cestes@quicinc.com>
14 years agoarm: msm: add oprofile pmu support
Daniel Walker [Fri, 1 Jan 2010 22:52:30 +0000 (14:52 -0800)]
arm: msm: add oprofile pmu support

add oprofile pmu support for msm.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
14 years agoarm: msm: define HAVE_CLK for ARCH_MSM
Steve Muckle [Mon, 29 Dec 2008 21:17:22 +0000 (16:17 -0500)]
arm: msm: define HAVE_CLK for ARCH_MSM

MSM supports the <linux/clk.h> interface.

Acked-by: David Brown <davidb@quicinc.com>
Signed-off-by: Steve Muckle <smuckle@quicinc.com>
14 years agoarm: msm: allow ARCH_MSM to have v7 cpus
Daniel Walker [Fri, 1 Jan 2010 23:11:43 +0000 (15:11 -0800)]
arm: msm: allow ARCH_MSM to have v7 cpus

ARCH_MSM supports armv7 cpus, so we're pushed the CPU_V6/CPU_V7 selection
down into the arch/arm/mach-msm/Kconfig.

Also update the description to be a bit more accurate.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
Linus Torvalds [Fri, 30 Apr 2010 17:16:55 +0000 (10:16 -0700)]
Merge git://git./linux/kernel/git/gregkh/staging-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
  Staging: vme: Re-introduce necessary brackets
  Staging: iio: fix up the iio_get_new_idr_val comment
  Staging: add Add Sitecom WL-349 to rtl8192su
  Staging: rt2860: add Belkin F5D8055 Wireless-N USB Dongle device id
  staging: rtl8192su: add Support for Belkin F5D8053 v6
  Staging: dt3155: fix 50Hz configuration
  staging: usbip: Fix deadlock
  Staging: rtl8192su: add USB ID for 0bda:8171
  Staging: hv: name network device ethX rather than sethX
  Staging: hv: Fix up memory leak on HvCleanup
  Staging: hv: Fix a bug affecting IPv6
  staging: iio: ring_sw: Fix incorrect test on successful read of last value, causes infinite loop
  staging: iio: Function iio_get_new_idr_val() return negative value if fails.
  Staging: iio: adc: fix dangling pointers
  Staging: iio: light: fix dangling pointers
  Staging: iio: test for failed allocation
  staging: iio: lis3l02dq - incorrect ws used in container of call.

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
Linus Torvalds [Fri, 30 Apr 2010 17:16:42 +0000 (10:16 -0700)]
Merge git://git./linux/kernel/git/gregkh/tty-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6:
  serial: drivers/serial/pmac_zilog.c: add missing unlock
  serial: 8250_pnp - add Fujitsu Wacom device
  tty: Fix regressions in the char driver conversion

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Fri, 30 Apr 2010 17:16:11 +0000 (10:16 -0700)]
Merge git://git./linux/kernel/git/gregkh/usb-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (29 commits)
  USB: sl811-hcd: Fix device disconnect
  USB: ohci-at91: fix power management hanging
  USB: rename usb_buffer_alloc() and usb_buffer_free()
  USB: ti_usb: fix printk format warning
  USB: gadget: s3c-hsotg: Add missing unlock
  USB: fix build on OMAPs if CONFIG_PM_RUNTIME is not set
  USB: oxu210hp: release spinlock on error path
  USB: serial: option: add cinterion device id
  USB: serial: option: ZTEAC8710 Support with Device ID 0xffff
  USB: serial: pl2303: Hybrid reader Uniform HCR331
  USB: option: add ID for ZTE MF 330
  USB: xhci: properly set endpoint context fields for periodic eps.
  USB: xhci: properly set the "Mult" field of the endpoint context.
  USB: OHCI: don't look at the root hub to get the number of ports
  USB: don't choose configs with no interfaces
  USB: cdc-acm: add another device quirk
  USB: fix testing the wrong variable in fs_create_by_name()
  usb: Fix tusb6010 for DMA API
  musb_core: fix musb_init_controller() error cleanup path
  MUSB: fix DaVinci glue layer dependency
  ...

14 years agoedac, mce: Fix wrong mask and macro usage
Borislav Petkov [Fri, 30 Apr 2010 13:19:02 +0000 (15:19 +0200)]
edac, mce: Fix wrong mask and macro usage

Correct two mishaps which prevented reporting error type (CECC vs UECC)
and extended error description.

Cc: <stable@kernel.org> # 32.x, 33.x
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoInotify: Fix build failure in inotify user support
Ralf Baechle [Mon, 8 Mar 2010 19:51:03 +0000 (20:51 +0100)]
Inotify: Fix build failure in inotify user support

CONFIG_INOTIFY_USER defined but CONFIG_ANON_INODES undefined will result
in the following build failure:

    LD      vmlinux
  fs/built-in.o: In function 'sys_inotify_init1':
  (.text.sys_inotify_init1+0x22c): undefined reference to 'anon_inode_getfd'
  fs/built-in.o: In function `sys_inotify_init1':
  (.text.sys_inotify_init1+0x22c): relocation truncated to fit: R_MIPS_26 against 'anon_inode_getfd'
  make[2]: *** [vmlinux] Error 1
  make[1]: *** [sub-make] Error 2
  make: *** [all] Error 2

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'merge' of git://git.secretlab.ca/git/linux-2.6
Linus Torvalds [Fri, 30 Apr 2010 16:57:55 +0000 (09:57 -0700)]
Merge branch 'merge' of git://git.secretlab.ca/git/linux-2.6

* 'merge' of git://git.secretlab.ca/git/linux-2.6:
  spi: spidev_test gives error upon 1-byte transfer
  omap2_mcspi: small fixes of output data format
  omap2_mcspi: Flush posted writes
  spi: spi_device memory should be released instead of device.
  spi: release device claimed by bus_find_device_by_name
  of: check for IS_ERR()
  serial/mpc52xx_uart: Drop outdated comments
  gpio: potential null dereference

14 years agoStaging: vme: Re-introduce necessary brackets
Martyn Welch [Mon, 22 Mar 2010 14:58:43 +0000 (14:58 +0000)]
Staging: vme: Re-introduce necessary brackets

Somehow I managed to remove a set of rather necessary brackets in commit
29848ac9f3b33bf171439ae2d66d40e6a71446c4. Put them back.

Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: iio: fix up the iio_get_new_idr_val comment
Andrew Morton [Tue, 27 Apr 2010 18:29:54 +0000 (11:29 -0700)]
Staging: iio: fix up the iio_get_new_idr_val comment

improve the comment a bit

Cc: Greg KH <greg@kroah.com>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Cc: Sonic Zhang <sonic.adi@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: add Add Sitecom WL-349 to rtl8192su
Rodrigo Linfati [Wed, 28 Apr 2010 20:32:13 +0000 (22:32 +0200)]
Staging: add Add Sitecom WL-349 to rtl8192su

Add usb id of Sitecom WL-349 to rtl8192su

Signed-off-by: Rodrigo Linfati <rodrigo@linfati.cl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: rt2860: add Belkin F5D8055 Wireless-N USB Dongle device id
Chris Largret [Wed, 3 Mar 2010 11:24:26 +0000 (05:24 -0600)]
Staging: rt2860: add Belkin F5D8055 Wireless-N USB Dongle device id

Add Belkin F5D8055 Wireless-N USB support to the rt2870
staging driver.

Signed-off-by: Chris Largret <largret@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agostaging: rtl8192su: add Support for Belkin F5D8053 v6
Richard Airlie [Mon, 5 Apr 2010 21:22:46 +0000 (22:22 +0100)]
staging: rtl8192su: add Support for Belkin F5D8053 v6

Please find attached a patch which adds the device ID for the Belkin
F5D8053 v6 to the rtl8192su driver. I've tested this in 2.6.34-rc3
(Ubuntu 9.10 amd64) and the network adapter is working flawlessly.

Signed-off-by: Richard Airlie <richard@backtrace.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: dt3155: fix 50Hz configuration
H Hartley Sweeten [Wed, 14 Apr 2010 23:29:17 +0000 (18:29 -0500)]
Staging: dt3155: fix 50Hz configuration

According to the header file, dt3155_io.h, the 50/60 Hz configuration
is controlled by a bit in the I2C CSR2 register (bit 2).  The function
dt3155_init_isr actually reads the I2C CONFIG register into the global
I2C_CSR union variable then modifies the bit.  It then does a write
to the I2C CONFIG register with the global I2C_CONFIG union variable
which is not even set with a value anywhere in the driver.

My guess is 50Hz operation doesn't even work as-is.

Fix this by actually reading and writing the correct register with
the correct value.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agostaging: usbip: Fix deadlock
Eric Lescouet [Sat, 24 Apr 2010 00:55:24 +0000 (02:55 +0200)]
staging: usbip: Fix deadlock

When detaching a port from the client side (usbip --detach 0),
the event thread, on the server side, is going to deadlock.
The "eh" server thread is getting USBIP_EH_RESET event and calls:
  -> stub_device_reset() -> usb_reset_device()
the USB framework is then calling back _in the same "eh" thread_ :
  -> stub_disconnect() -> usbip_stop_eh() -> wait_for_completion()
the "eh" thread is being asleep forever, waiting for its own completion.
This patch checks if "eh" is the current thread, in usbip_stop_eh().

Signed-off-by: Eric Lescouet <eric@lescouet.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: rtl8192su: add USB ID for 0bda:8171
Pavel Roskin [Wed, 10 Mar 2010 04:11:07 +0000 (23:11 -0500)]
Staging: rtl8192su: add USB ID for 0bda:8171

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: hv: name network device ethX rather than sethX
Stephen Hemminger [Thu, 11 Mar 2010 17:11:37 +0000 (09:11 -0800)]
Staging: hv: name network device ethX rather than sethX

This patch makes the HyperV network device use the same naming scheme as
other virtual drivers (Xen, KVM). In an ideal world, userspace tools
would not care what the name is, but some users and applications do
care. Vyatta CLI is one of the tools that does depend on what the name
is.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: hv: Fix up memory leak on HvCleanup
Cyrill Gorcunov [Mon, 5 Apr 2010 16:56:57 +0000 (20:56 +0400)]
Staging: hv: Fix up memory leak on HvCleanup

Don't assign NULL too early

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: hv: Fix a bug affecting IPv6
Haiyang Zhang [Mon, 19 Apr 2010 15:32:11 +0000 (15:32 +0000)]
Staging: hv: Fix a bug affecting IPv6

Fix a bug affecting IPv6
Added the multicast flag for proper IPv6 function.

Reported-by: Toshikazu Sakai <toshikas@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agostaging: iio: ring_sw: Fix incorrect test on successful read of last value, causes...
Jonathan Cameron [Tue, 30 Mar 2010 16:45:04 +0000 (17:45 +0100)]
staging: iio: ring_sw: Fix incorrect test on successful read of last value, causes infinite loop

This is a bad one. The test means that almost no reads of the last
value ever succeed!  Result is an infinite loop.

Another one for the 'oops' category.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agostaging: iio: Function iio_get_new_idr_val() return negative value if fails.
Sonic Zhang [Mon, 22 Mar 2010 12:27:05 +0000 (12:27 +0000)]
staging: iio: Function iio_get_new_idr_val() return negative value if fails.

Function iio_get_new_idr_val() return negative value if fails.
So, only error when ret < 0 in iio_device_register_eventset().

Signed-off-by: Sonic Zhang <sonic.adi@gmail.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: iio: adc: fix dangling pointers
Wolfram Sang [Sat, 20 Mar 2010 14:13:02 +0000 (15:13 +0100)]
Staging: iio: adc: fix dangling pointers

Fix I2C-drivers which missed setting clientdata to NULL before freeing the
structure it points to. Also fix drivers which do this _after_ the structure
was freed already.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: iio: light: fix dangling pointers
Wolfram Sang [Sat, 20 Mar 2010 14:13:03 +0000 (15:13 +0100)]
Staging: iio: light: fix dangling pointers

Fix I2C-drivers which missed setting clientdata to NULL before freeing the
structure it points to. Also fix drivers which do this _after_ the structure
was freed already.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: iio: test for failed allocation
Dan Carpenter [Tue, 16 Mar 2010 10:03:49 +0000 (13:03 +0300)]
Staging: iio: test for failed allocation

We should return test to see if iio_allocate_trigger() fails and return -ENOMEM.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agostaging: iio: lis3l02dq - incorrect ws used in container of call.
Jonathan Cameron [Thu, 11 Mar 2010 17:29:48 +0000 (17:29 +0000)]
staging: iio: lis3l02dq - incorrect ws used in container of call.

The word oops comes to mind.  Original patch to merge the two work queues
in here (prior to Greg taking them into staging) changed the top half to
only use one of them and the bottom half to assume it was the other.

Currently causes a NULL pointer dereference if you enable any of the events
on an lis3l02dq. Just goes to show I need a few more regression tests.

Signed-of-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: sl811-hcd: Fix device disconnect
Michael Hennerich [Wed, 28 Apr 2010 21:31:36 +0000 (17:31 -0400)]
USB: sl811-hcd: Fix device disconnect

A while ago I provided a patch that fixed device detection after device
removal (USB: sl811-hcd: Fix device disconnect).
Chris Brissette pointed out that the detection/removal counter method
to distinguish insert or remove my fail under certain conditions.
Latest SL811HS datasheet (Document 38-08008 Rev. *D) indicates that
bit 6 (SL11H_INTMASK_RD) of the Interrupt Status Register together with
bit 5 (SL11H_INTMASK_INSRMV) can be used to determine whether a device
has been inserted or removed.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ohci-at91: fix power management hanging
Patrice Vilchez [Wed, 28 Apr 2010 11:45:40 +0000 (13:45 +0200)]
USB: ohci-at91: fix power management hanging

A hanging has been detected in ohci-at91 while going in suspend to ram. This is
due to asynchronous operations between ohci reset and ohci clocks shutdown.
This patch adds the reading of the control register between the reset of the
ohci and clocks stop. This "flush the writes" idea was taken from ohci-hcd.c
file (ohci_shutdown() function).

Signed-off-by: Patrice Vilchez <patrice.vilchez@atmel.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: rename usb_buffer_alloc() and usb_buffer_free()
Daniel Mack [Mon, 12 Apr 2010 11:17:25 +0000 (13:17 +0200)]
USB: rename usb_buffer_alloc() and usb_buffer_free()

For more clearance what the functions actually do,

  usb_buffer_alloc() is renamed to usb_alloc_coherent()
  usb_buffer_free()  is renamed to usb_free_coherent()

They should only be used in code which really needs DMA coherency.

[added compatibility macros so we can convert things easier - gregkh]

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Pedro Ribeiro <pedrib@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ti_usb: fix printk format warning
Randy Dunlap [Thu, 15 Apr 2010 18:38:56 +0000 (11:38 -0700)]
USB: ti_usb: fix printk format warning

Fix printk format warning in usbserial/ti_usb:

drivers/usb/serial/ti_usb_3410_5052.c:1738: warning: format '%d' expects type 'int', but argument 5 has type 'size_t'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: gadget: s3c-hsotg: Add missing unlock
Julia Lawall [Mon, 29 Mar 2010 15:36:44 +0000 (17:36 +0200)]
USB: gadget: s3c-hsotg: Add missing unlock

In an error handling case the lock is not unlocked.  The return is
converted to a goto, to share the unlock at the end of the function.

A simplified version of the semantic patch that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
expression E1;
identifier f;
@@

f (...) { <+...
* spin_lock_irqsave (E1,...);
... when != E1
* return ...;
...+> }
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: fix build on OMAPs if CONFIG_PM_RUNTIME is not set
Anand Gadiyar [Mon, 29 Mar 2010 11:24:51 +0000 (16:54 +0530)]
USB: fix build on OMAPs if CONFIG_PM_RUNTIME is not set

With patch as1329 (USB: convert to the runtime PM framework),
we make USB_SUSPEND depend on PM_RUNTIME instead of CONFIG_PM.

Also, CONFIG_USB_OTG selects CONFIG_USB_SUSPEND.

If PM_RUNTIME is not enabled, and we try to enable USB_OTG,
we will end up with CONFIG_USB_SUSPEND selected. This is
due to a known bug with the select statement.

This makes the build break on various OMAP configs (which
have CONFIG_USB_OTG set by default, but do not yet have
CONFIG_PM_RUNTIME enabled).

Avoid this by changing the logic for CONFIG_USB_OTG from
"select USB_SUSPEND" to "depends on USB_SUSPEND"

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
CC: Michal Marek <mmarek@suse.cz>
CC: Tony Lindgren <tony@atomide.com>
CC: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: oxu210hp: release spinlock on error path
Dan Carpenter [Mon, 29 Mar 2010 09:01:27 +0000 (12:01 +0300)]
USB: oxu210hp: release spinlock on error path

Smatch complained about this missing spinlock.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: option: add cinterion device id
Greg Kroah-Hartman [Tue, 27 Apr 2010 16:38:51 +0000 (09:38 -0700)]
USB: serial: option: add cinterion device id

This adds a device id for a Cinterion device.

Reported-by: John Race <John.Race@roscom.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: option: ZTEAC8710 Support with Device ID 0xffff
Mahesh Kuruganti [Mon, 12 Apr 2010 17:07:02 +0000 (22:37 +0530)]
USB: serial: option: ZTEAC8710 Support with Device ID 0xffff

PATCH TO EXTEND SUPPORT TO AC8710 WITH 0xFFFF Product ID.

Signed-off-by: Mahesh Kuruganti <maheshkuruganti@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: pl2303: Hybrid reader Uniform HCR331
Simone Contini [Mon, 12 Apr 2010 21:25:10 +0000 (23:25 +0200)]
USB: serial: pl2303: Hybrid reader Uniform HCR331

I tried a magnetic stripe reader
(http://www.kimaldi.com/kimaldi_eng/productos/lectores_de_tarjetas/lectores_tarjeta_chip_y_dni/lector_hibrido_uniform_hcr_331)
and I see that it is interfaced with a PL2303. I wrote a patch to use
your driver which simply adds the product ID for the device and it
seems working fine.

From: Simone Contini <s.contini@oltrelinux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: option: add ID for ZTE MF 330
Dominik Brodowski [Wed, 14 Apr 2010 19:36:42 +0000 (21:36 +0200)]
USB: option: add ID for ZTE MF 330

Based on the information provided for by Paweł Drobek, add
a second vendor ID and the correct product ID for ZTE MF 330.

Reported-by: Paweł Drobek <pawel.drobek@gmail.com>
Signed-off: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: xhci: properly set endpoint context fields for periodic eps.
Sarah Sharp [Fri, 16 Apr 2010 15:07:27 +0000 (08:07 -0700)]
USB: xhci: properly set endpoint context fields for periodic eps.

For periodic endpoints, we must let the xHCI hardware know the maximum
payload an endpoint can transfer in one service interval.  The xHCI
specification refers to this as the Maximum Endpoint Service Interval Time
Payload (Max ESIT Payload).  This is used by the hardware for bandwidth
management and scheduling of packets.

For SuperSpeed endpoints, the maximum is calculated by multiplying the max
packet size by the number of bursts and the number of opportunities to
transfer within a service interval (the Mult field of the SuperSpeed
Endpoint companion descriptor).  Devices advertise this in the
wBytesPerInterval field of their SuperSpeed Endpoint Companion Descriptor.

For high speed devices, this is taken by multiplying the max packet size by the
"number of additional transaction opportunities per microframe" (the high
bits of the wMaxPacketSize field in the endpoint descriptor).

For FS/LS devices, this is just the max packet size.

The other thing we must set in the endpoint context is the Average TRB
Length.  This is supposed to be the average of the total bytes in the
transfer descriptor (TD), divided by the number of transfer request blocks
(TRBs) it takes to describe the TD.  This gives the host controller an
indication of whether the driver will be enqueuing a scatter gather list
with many entries comprised of small buffers, or one contiguous buffer.

It also takes into account the number of extra TRBs you need for every TD.
This includes No-op TRBs and Link TRBs used to link ring segments
together.  Some drivers may choose to chain an Event Data TRB on the end
of every TD, thus increasing the average number of TRBs per TD.  The Linux
xHCI driver does not use Event Data TRBs.

In theory, if there was an API to allow drivers to state what their
bandwidth requirements are, we could set this field accurately.  For now,
we set it to the same number as the Max ESIT payload.

The Average TRB Length should also be set for bulk and control endpoints,
but I have no idea how to guess what it should be.

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: properly set the "Mult" field of the endpoint context.
Sarah Sharp [Fri, 16 Apr 2010 15:07:04 +0000 (08:07 -0700)]
USB: xhci: properly set the "Mult" field of the endpoint context.

A SuperSpeed interrupt or isochronous endpoint can define the number of
"burst transactions" it can handle in a service interval.  This is
indicated by the "Mult" bits in the bmAttributes of the SuperSpeed
Endpoint Companion Descriptor.  For example, if it has a max packet size
of 1024, a max burst of 11, and a mult of 3, the host may send 33
1024-byte packets in one service interval.

We must tell the xHCI host controller the number of multiple service
opportunities (mults) the device can handle when the endpoint is
installed.  We do that by setting the Mult field of the Endpoint Context
before a configure endpoint command is sent down.  The Mult field is
invalid for control or bulk SuperSpeed endpoints.

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: OHCI: don't look at the root hub to get the number of ports
Alan Stern [Tue, 20 Apr 2010 14:37:57 +0000 (10:37 -0400)]
USB: OHCI: don't look at the root hub to get the number of ports

This patch (as1371) fixes a small bug in ohci-hcd.  The HCD already
knows how many ports the controller has; there's no need to go looking
at the root hub's usb_device structure to find out.  Especially since
the root hub's maxchild value is set correctly only while the root hub
is bound to the hub driver.

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 agoUSB: don't choose configs with no interfaces
Alan Stern [Tue, 20 Apr 2010 14:40:59 +0000 (10:40 -0400)]
USB: don't choose configs with no interfaces

This patch (as1372) fixes a bug in the routine that chooses the
default configuration to install when a new USB device is detected.
The algorithm is supposed to look for a config whose first interface
is for a non-vendor-specific class.  But the way it's currently
written, it will also accept a config with no interfaces at all, which
is not very useful.  (Believe it or not, such things do exist.)

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Andrew Victor <avictor.za@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: cdc-acm: add another device quirk
Russ Nelson [Thu, 22 Apr 2010 03:07:03 +0000 (23:07 -0400)]
USB: cdc-acm: add another device quirk

The Maretron USB100 needs this quirk in order to work properly.

Signed-off-by: Russ Nelson <nelson@crynwr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: fix testing the wrong variable in fs_create_by_name()
Dan Carpenter [Thu, 22 Apr 2010 10:00:52 +0000 (12:00 +0200)]
USB: fix testing the wrong variable in fs_create_by_name()

There is a typo here.  We should be testing "*dentry" which was just
assigned instead of "dentry".  This could result in dereferencing an
ERR_PTR inside either usbfs_mkdir() or usbfs_create().

Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agousb: Fix tusb6010 for DMA API
Tony Lindgren [Sat, 24 Apr 2010 00:41:15 +0000 (17:41 -0700)]
usb: Fix tusb6010 for DMA API

Commit 18eabe2347ae7a11b3db768695913724166dfb0e introduced
DMA buffer ownership. Fix tusb6010 accordingly. To compile,
also dummy musb_platform_save and restore functions need to
be added.

Also change the order of musb_read_fifo() to happen after
dma_cache_maint to have the DMA operations completed before
moving the remaining unaligned bytes with PIO. The DMA
access and PIO touch different areas of the FIFO, so this
change only makes the code a bit easier to follow.

Tested on n810 and g_ether with variable size ping test.
The test seems to fail for some ping sizes, but that seems to
be a different problem.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agomusb_core: fix musb_init_controller() error cleanup path
Sergei Shtylyov [Thu, 25 Mar 2010 11:14:33 +0000 (13:14 +0200)]
musb_core: fix musb_init_controller() error cleanup path

This function forgets to call usb_remove_hcd() or musb_gadget_cleanup() iff
sysfs_create_group() fails.

[ felipe.balbi@nokia.com : review the entire error path
not only when we fail hcd or gadget ]

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoMUSB: fix DaVinci glue layer dependency
Sergei Shtylyov [Thu, 25 Mar 2010 11:14:24 +0000 (13:14 +0200)]
MUSB: fix DaVinci glue layer dependency

CONFIG_ARCH_DAVINCI now embraces both the "real" DaVinci and DA8xx/OMAP-L1x --
on which the DaVinci glue layer won't work. Change the Makefile dependency to
CONFIG_ARCH_DAVINCI_DMx which corresponds to "real" DaVinci.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agomusb_core: don't call musb_platform_exit() twice
Sergei Shtylyov [Thu, 25 Mar 2010 11:14:32 +0000 (13:14 +0200)]
musb_core: don't call musb_platform_exit() twice

musb_platform_exit() is called twice from musb_init_controller() iff controller
initialization fails. Move the call (and the DevCtl register writes surrounding
it) from musb_free() to musb_remove().

Fix mispalced and now incorrect 'goto's in musb_init_controller().

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoMUSB: OMAP: don't call clk_put()
Sergei Shtylyov [Thu, 25 Mar 2010 11:14:31 +0000 (13:14 +0200)]
MUSB: OMAP: don't call clk_put()

Remove duplicate/unbalanced call to clk_put() from musb_platform_exit() --
clk_put() gets called from musb_core.c anyway...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoMUSB: DaVinci: fix musb_platform_init() error cleanup path
Sergei Shtylyov [Thu, 25 Mar 2010 11:14:30 +0000 (13:14 +0200)]
MUSB: DaVinci: fix musb_platform_init() error cleanup path

This function forgets to call clk_disable() iff reading the USB module version
register returns 0.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agomusb_core: don't prevent disabling clock on driver unload
Sergei Shtylyov [Thu, 25 Mar 2010 11:14:29 +0000 (13:14 +0200)]
musb_core: don't prevent disabling clock on driver unload

Resetting 'musb->clock' to NULL in musb_shutdown() prevents musb_platform_exit()
from properly disabling the clock when unloading the driver -- don't do it.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agomusb_core: don't touch 'musb->clock' in musb_free()
Sergei Shtylyov [Thu, 25 Mar 2010 11:14:28 +0000 (13:14 +0200)]
musb_core: don't touch 'musb->clock' in musb_free()

Remove duplicate/unbalanced calls to clk_disable()/clk_put() in musb_free():

- clk_disable() is called by musb_platform_exit() just prior to this call;
- clk_put() is called by the callers of musb_free() prior to calling it...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agomusb: potential use after free
Dan Carpenter [Thu, 25 Mar 2010 11:14:27 +0000 (13:14 +0200)]
musb: potential use after free

We assign "urb->hcpriv = qh;" a few lines down.  I'm pretty sure we
want it "urb->hcpriv" to be NULL not a freed value.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agomusb: save and restore missing bus control register
Ajay Kumar Gupta [Thu, 25 Mar 2010 11:14:26 +0000 (13:14 +0200)]
musb: save and restore missing bus control register

Added the missing BUS_CONTROL register in musb
save/restore routines.

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoMUSB: Blackfin: don't fake blackfin_interrupt() result
Sergei Shtylyov [Thu, 25 Mar 2010 11:14:25 +0000 (13:14 +0200)]
MUSB: Blackfin: don't fake blackfin_interrupt() result

Commit a5073b52833e4df8e16c93dc4cbb7e0c558c74a2 (musb_gadget: fix unhandled
endpoint 0 IRQs) misses this change to blackfin.c: stop faking successful
result of blackfin_interrupt() and emitting a debug message on an unhandled
interrupt.

Signed-off-by: Sergei Shtylyov <sshtylyov@mvista.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agomusb: fix power field to hold all possible values
Ajay Kumar Gupta [Thu, 25 Mar 2010 11:14:23 +0000 (13:14 +0200)]
musb: fix power field to hold all possible values

MUSB can supply upto 500mA such as, AM3517 and OMAP3EVM Rev >=E and thus
the 'power' field has to hold values above 255.

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>