]> git.karo-electronics.de Git - mv-sheeva.git/log
mv-sheeva.git
14 years agosh: update die() output.
Paul Mundt [Tue, 13 Oct 2009 01:57:52 +0000 (10:57 +0900)]
sh: update die() output.

This follows the ARM change, as SH had all of the same issues:

Make die() better match x86:
- add printing of the last accessed sysfs file
- ensure console_verbose() is called under the lock
- ensure we panic outside of oops_exit()

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoext3: Update documentation about ext3 quota mount options
Jan Kara [Thu, 17 Sep 2009 15:37:12 +0000 (17:37 +0200)]
ext3: Update documentation about ext3 quota mount options

Signed-off-by: Jan Kara <jack@suse.cz>
14 years agoext3: Don't update superblock write time when filesystem is read-only
Theodore Ts'o [Wed, 16 Sep 2009 15:21:13 +0000 (11:21 -0400)]
ext3: Don't update superblock write time when filesystem is read-only

This avoids updating the superblock write time when we are mounting
the root file system read/only but we need to replay the journal; at
that point, for people who are east of GMT and who make their clock
tick in localtime for Windows bug-for-bug compatibility, and this will
cause e2fsck to complain and force a full file system check.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Jan Kara <jack@suse.cz>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
Linus Torvalds [Mon, 12 Oct 2009 21:38:34 +0000 (14:38 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  PCI: Prevent AER driver from being loaded on non-root port PCIE devices
  PCI: get larger bridge ranges when space is available
  PCI: pci.c: fix kernel-doc notation
  PCI quirk: TI XIO200a erroneously reports support for fast b2b transfers
  PCI PM: Read device power state from register after updating it
  PCI: remove pci_assign_resource_fixed()
  PCI: PCIe portdrv: remove "-driver" from driver name

14 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Mon, 12 Oct 2009 21:37:49 +0000 (14:37 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm: (24 commits)
  ARM: force dcache flush if dcache_dirty bit set
  [ARM] pxa: workaround errata #37 by not using half turbo switching
  [ARM] pxamci: fix printing gpio numbers in pxamci_probe
  [ARM] pxa/csb726: adjust duplicate structure field initialization
  ARM: Add kmap_atomic type debugging
  ARM: boolean bit testing
  ARM: update die() output
  ARM: Dump code/mem oops lines with the appropriate log level
  ARM: Dump memory and backtrace as one printk per line
  ARM: 5756/1: ep93xx: introduce clk parent
  ARM: 5754/1: ep93xx: update i2c support
  ARM: 5753/1: ep93xx: remove old EP93XX_GPIO_* defines
  ARM: 5729/1: ep93xx: define EP93XX_*_PHYS_BASE with macros
  ARM: 5751/1: ep93xx/micro9: Add Micro9-Slim
  ARM: 5750/1: ep93xx/micro9: Update platform code
  ARM: 5749/1: ep93xx/micro9: Update maintainer
  ARM: 5752/1: SA1100: fix building of h3100
  ARM: 5748/1: bcmring: fix build warning messages
  ARM: 5747/1: Fix the start_pg value in free_memmap()
  ARM: 5746/1: Handle possible translation errors in ARMv6/v7 coherent_user_range
  ...

14 years agoUSB: musb: invert arch depend string
Mike Frysinger [Mon, 12 Oct 2009 13:49:56 +0000 (09:49 -0400)]
USB: musb: invert arch depend string

The MUSB code relies on platform implementations that currently only
exists for Arm and Blackfin processors, so have the MUSB Kconfig depend
upon those arches.

This should prevent other arches from building MUSB via randconfig.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile...
Ingo Molnar [Mon, 12 Oct 2009 21:26:36 +0000 (23:26 +0200)]
Merge branch 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile into core/urgent

14 years agoperf tools: Remove static debugfs path from parse-events
Ashwin Chaugule [Sun, 4 Oct 2009 22:49:34 +0000 (15:49 -0700)]
perf tools: Remove static debugfs path from parse-events

Timechart doesn't work if debugfs is not in /sys/kernel/debug/.
Fixed by using global debugfs_path which is filled in by perf.

Signed-off-by: Ashwin Chaugule <ashwinc@quicinc.com>
Cc: "Arjan van de Ven" <arjan@linux.intel.com>
LKML-Reference: <a751bdc6978478de6d10440e587a2cc7.squirrel@www.codeaurora.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agolibertas: fix build
Alan Cox [Mon, 12 Oct 2009 15:27:48 +0000 (16:27 +0100)]
libertas: fix build

drivers/net/wireless/libertas/cmdresp.c: In function ‘lbs_process_event’:
drivers/net/wireless/libertas/cmdresp.c:519: error: ‘TASK_INTERRUPTIBLE’
undeclared (first use in this function)
drivers/net/wireless/libertas/cmdresp.c:519: error: (Each undeclared
identifier is reported only once
drivers/net/wireless/libertas/cmdresp.c:519: error: for each function it
appears in.)

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: document ieee80211_rx() context requirement
Johannes Berg [Sun, 11 Oct 2009 13:10:40 +0000 (15:10 +0200)]
mac80211: document ieee80211_rx() context requirement

ieee80211_rx() must be called with softirqs disabled
since the networking stack requires this for netif_rx()
and some code in mac80211 can assume that it can not
be processing its own tasklet and this call at the same
time.

It may be possible to remove this requirement after a
careful audit of mac80211 and doing any needed locking
improvements in it along with disabling softirqs around
netif_rx(). An alternative might be to push all packet
processing to process context in mac80211, instead of
to the tasklet, and add other synchronisation.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: fix ieee80211_rx() context
Johannes Berg [Sun, 11 Oct 2009 10:19:21 +0000 (12:19 +0200)]
b43: fix ieee80211_rx() context

Due to the way it interacts with the networking
stack and other parts of mac80211, ieee80211_rx()
must be called with disabled softirqs.

[1] http://thread.gmane.org/gmane.linux.kernel.wireless.general/39440/focus=40266

Reported-by: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix ibss race
Johannes Berg [Sun, 11 Oct 2009 09:47:57 +0000 (11:47 +0200)]
mac80211: fix ibss race

When a scan completes, we call ieee80211_sta_find_ibss(),
which is also called from other places. When the scan was
done in software, there's no problem as both run from the
single-threaded mac80211 workqueue and are thus serialised
against each other, but with hardware scan the completion
can be in a different context and race against callers of
this function from the workqueue (e.g. due to beacon RX).
So instead of calling ieee80211_sta_find_ibss() directly,
just arm the timer and have it fire, scheduling the work,
which will invoke ieee80211_sta_find_ibss() (if that is
appropriate in the current state).

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix logic error ibss merge bssid check
Felix Fietkau [Sun, 11 Oct 2009 03:21:10 +0000 (05:21 +0200)]
mac80211: fix logic error ibss merge bssid check

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: change the order of freeing memory
Wey-Yi Guy [Fri, 9 Oct 2009 20:20:17 +0000 (13:20 -0700)]
iwlwifi: change the order of freeing memory

Need to free the dynamic allocated memory before ieee80211_free_hw();
once call ieee80211_free_hw(), should not reference to "priv" data
structure.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agox86: fix kernel panic on 32 bits when profiling
H. Peter Anvin [Mon, 12 Oct 2009 18:32:31 +0000 (11:32 -0700)]
x86: fix kernel panic on 32 bits when profiling

Latest kernel has a kernel panic in booting on i386 machine when
profile=2 setting in cmdline.  It is due to 'sp' being incorrect in
profile_pc().

BUG: unable to handle kernel NULL pointer dereference at 00000246
IP: [<c01288b6>] profile_pc+0x2a/0x48
*pde = 00000000
Oops: 0000 [#1] SMP

This differs from the original version by Alex Shi in that we use the
kernel_stack_pointer() inline already defined in <asm/ptrace.h> for
this purpose, instead of #ifdef.

Originally-by: Alex Shi <alex.shi@intel.com>
Cc: "Chen, Tim C" <tim.c.chen@intel.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
14 years agoNFS: suppress a build warning
Stefan Richter [Mon, 12 Oct 2009 15:26:12 +0000 (11:26 -0400)]
NFS: suppress a build warning

struct sockaddr_storage * can safely be used as struct sockaddr *.
Suppress an "incompatible pointer type" warning.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agotty, serial: Fix race and NULL check in uart_close()
Linus Torvalds [Mon, 12 Oct 2009 17:13:54 +0000 (19:13 +0200)]
tty, serial: Fix race and NULL check in uart_close()

Commit 46d57a449aa1 ("serial: use tty_port pointers in the core code")
contained two bugs that causes (rare) crashes:

 - the rename typoed one site

 - a NULL check was missed

Reported-and-tested-by: Ingo Molnar <mingo@elte.hu>
Cc: Greg KH <gregkh@suse.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoARM: force dcache flush if dcache_dirty bit set
Nitin Gupta [Mon, 12 Oct 2009 08:50:23 +0000 (14:20 +0530)]
ARM: force dcache flush if dcache_dirty bit set

On ARM, update_mmu_cache() does dcache flush for a page only if
it has a kernel mapping (page_mapping(page) != NULL). The correct
behavior would be to force the flush based on dcache_dirty bit only.

One of the cases where present logic would be a problem is when
a RAM based block device[1] is used as a swap disk. In this case,
we would have in-memory data corruption as shown in steps below:

do_swap_page()
{
    - Allocate a new page (if not already in swap cache)
    - Issue read from swap disk
        - Block driver issues flush_dcache_page()
        - flush_dcache_page() simply sets PG_dcache_dirty bit and does not
          actually issue a flush since this page has no user space mapping yet.
    - Now, if swap disk is almost full, this newly read page is removed
      from swap cache and corrsponding swap slot is freed.
    - Map this page anonymously in user space.
    - update_mmu_cache()
        - Since this page does not have kernel mapping (its not in page/swap
          cache and is mapped anonymously), it does not issue dcache flush
          even if dcache_dirty bit is set by flush_dcache_page() above.

    <user now gets stale data since dcache was never flushed>
}

Same problem exists on mips too.

[1] example:
 - brd (RAM based block device)
 - ramzswap (RAM based compressed swap device)

Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agox86: Fix Suspend to RAM freeze on Acer Aspire 1511Lmi laptop
Jan Beulich [Tue, 6 Oct 2009 15:32:43 +0000 (16:32 +0100)]
x86: Fix Suspend to RAM freeze on Acer Aspire 1511Lmi laptop

Move the trampoline and accessors back out of .cpuinit.* for the
case of 64-bits+ACPI_SLEEP.

This solves s2ram hangs reported in:

  http://bugzilla.kernel.org/show_bug.cgi?id=14279

Reported-and-bisected-by: Christian Casteyde <casteyde.christian@free.fr>
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: <bugzilla-daemon@bugzilla.kernel.org>
Cc: "Andrew Morton" <akpm@linux-foundation.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agox86: Move pci_iommu_init to rootfs_initcall()
David Woodhouse [Mon, 12 Oct 2009 11:59:29 +0000 (12:59 +0100)]
x86: Move pci_iommu_init to rootfs_initcall()

We want this to happen after the PCI quirks, which are now running at
the very end of the fs_initcalls.

This works around the BIOS problems which were originally addressed by
commit db8be50c4307dac2b37305fc59c8dc0f978d09ea ('USB: Work around BIOS
bugs by quiescing USB controllers earlier'), which was reverted in
commit d93a8f829fe1d2f3002f2c6ddb553d12db420412.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
14 years agoRun pci_apply_final_quirks() sooner.
David Woodhouse [Mon, 12 Oct 2009 11:51:22 +0000 (12:51 +0100)]
Run pci_apply_final_quirks() sooner.

Having this as a device_initcall() means that some real device drivers
can actually initialise _before_ the quirks are run, which is wrong.

We want it to run _before_ device_initcall(), but _after_ fs_initcall(),
since some arch-specific PCI initialisation like pcibios_assign_resources()
is done at fs_initcall().

We could use rootfs_initcall() but I actually want to use that for the
IOMMU initialisation, which has to come after the quirks, but still
before the real devices. So use fs_initcall_sync() instead -- since this
is entirely synchronous, it doesn't hurt that it'll escape the
synchronisation.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
14 years agoMark pci_apply_final_quirks() __init rather than __devinit
David Woodhouse [Mon, 12 Oct 2009 11:50:34 +0000 (12:50 +0100)]
Mark pci_apply_final_quirks() __init rather than __devinit

It doesn't get invoked on hotplug; it can be thrown away after init.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
14 years agoRename pci_init() to pci_apply_final_quirks(), move it to quirks.c
David Woodhouse [Mon, 12 Oct 2009 11:48:43 +0000 (12:48 +0100)]
Rename pci_init() to pci_apply_final_quirks(), move it to quirks.c

This function may have done more in the past, but all it does now is
apply the PCI_FIXUP_FINAL quirks. So name it sensibly and put it where
it belongs.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
14 years agoMerge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6
Russell King [Mon, 12 Oct 2009 13:38:08 +0000 (14:38 +0100)]
Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6

14 years agomfd: Fix twl4030 boot with twl4030 usb transceiver enabled
Roger Quadros [Wed, 30 Sep 2009 15:26:37 +0000 (18:26 +0300)]
mfd: Fix twl4030 boot with twl4030 usb transceiver enabled

The usb regulator supplies (usb1v5, usb1v8 & usb3v1) must be available
before adding the twl4030_usb child, else twl4030_usb_ldo_init() will
always fail thus causing boot lock-up.

This patch fixes boot on OMAP systems using the twl4030 usb transceiver.
CONFIG_TWL4030_USB=y

Signed-off-by: Roger Quadros <ext-roger.quadros@nokia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agoacenic: Pass up error code from ace_load_firmware()
Ben Hutchings [Mon, 12 Oct 2009 11:18:48 +0000 (04:18 -0700)]
acenic: Pass up error code from ace_load_firmware()

If ace_load_firmware() fails, ace_init() cleans up but still returns
0, leading to an oops as seen in <http://bugs.debian.org/521383>.
It should pass the error code up.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosparc64: Fix D-cache flushing on swapin from SW devices.
David S. Miller [Mon, 12 Oct 2009 10:20:57 +0000 (03:20 -0700)]
sparc64: Fix D-cache flushing on swapin from SW devices.

Thanks to tip form ARM folks and Russell King.

If flush_dcache_page() occurs on a swapin it will have a mapping
and we'll try to defer the flush by setting the dirty bit.

But when it hits update_dcache_page() we won't flush because the
page won't have a mapping any more.  So remove the mapping
requirement in flush_dcache().

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoHID: fix possible deadlock in hidraw_read
Jiri Kosina [Mon, 12 Oct 2009 09:25:56 +0000 (11:25 +0200)]
HID: fix possible deadlock in hidraw_read

If the loop in hidraw_read() loops more than once, then we might
end up trying to acquire already locked mutex, casuing a deadlock.

Reported-by: iceberg <iceberg@ispras.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
14 years agosched: Fix missing kernel-doc notation
Randy Dunlap [Mon, 12 Oct 2009 02:12:00 +0000 (19:12 -0700)]
sched: Fix missing kernel-doc notation

The following htmldocs warnings:

  Warning(kernel/sched.c:685): No description found for parameter 'cpu'
  Warning(kernel/sched.c:3676): No description found for parameter 'sd'

Trigger because new parameters were added to update_rq_clock() and
update_group_power() without updating the kernel-doc notation.

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <4AD29070.7070002@oracle.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agopercpu: fix compile warnings
Tejun Heo [Sun, 4 Oct 2009 00:31:05 +0000 (09:31 +0900)]
percpu: fix compile warnings

Fix the following two compile warnings which show up on i386.

mm/percpu.c:1873: warning: comparison of distinct pointer types lacks a cast
mm/percpu.c:1879: warning: format '%lx' expects type 'long unsigned int', but argument 2 has type 'size_t'

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
14 years agoperf tools: Fix the NO_64BIT build on pure 64-bit systems
Ingo Molnar [Mon, 12 Oct 2009 07:57:25 +0000 (09:57 +0200)]
perf tools: Fix the NO_64BIT build on pure 64-bit systems

Randy Dunlap reported that 'make NO_64BIT=1' fails to build
a pure 32-b it binary on 64-bit/64-bit x86 systems.

The reason is that we dont pass in the -m32 and GCC defaults
to -m64.

So pass it in - and also extend the warning message about libelf
dependencies - glibc-dev[el] is needed as well beyond the libelf
library.

Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: Message-Id: <20091005131729.78444bfb.randy.dunlap@oracle.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years ago[ARM] pxa: workaround errata #37 by not using half turbo switching
Dennis O'Brien [Sat, 10 Oct 2009 07:08:52 +0000 (15:08 +0800)]
[ARM] pxa: workaround errata #37 by not using half turbo switching

PXA27x Errata #37 implies system will hang when switching into or out of
half turbo (HT bit in CLKCFG) mode, workaround this by not using it.

Signed-off-by: Dennis O'Brien <dennis.obrien@eqware.net>
Cc: stable-2.6.31 <stable@kernel.org>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
14 years ago[ARM] pxamci: fix printing gpio numbers in pxamci_probe
Antonio Ospite [Fri, 2 Oct 2009 14:24:02 +0000 (16:24 +0200)]
[ARM] pxamci: fix printing gpio numbers in pxamci_probe

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
14 years ago[ARM] pxa/csb726: adjust duplicate structure field initialization
Julia Lawall [Wed, 16 Sep 2009 09:06:52 +0000 (11:06 +0200)]
[ARM] pxa/csb726: adjust duplicate structure field initialization

Currently the irq_type field of the csb726_lan_config structure is
initialized twice.  The value in the first case,
SMSC911X_IRQ_POLARITY_ACTIVE_LOW, is normally stored in the irq_polarity
field, so I have renamed the field in the first initialization to that.

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
14 years agoperf tools: Fix const char type propagation
Randy Dunlap [Mon, 5 Oct 2009 20:17:29 +0000 (13:17 -0700)]
perf tools: Fix const char type propagation

The following perf build warnings/errors in function
argument types:

  builtin-sched.c:1894: warning: passing argument 1 of 'sort_dimension__add' discards qualifiers from pointer target type
  util/trace-event-parse.c:685: warning: passing argument 2 of 'read_expected' discards qualifiers from pointer target type
  util/trace-event-parse.c:741: warning: passing argument 4 of 'test_type_token' discards qualifiers from pointer target type
  util/trace-event-parse.c:706: warning: passing argument 2 of 'read_expected_item' discards qualifiers from pointer target type

... trigger because older GCC is not able to prove that
sort_dimension__add() does not change the string.

Some goes for test_type_token().

Fix this by improving type consistency.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <20091005131729.78444bfb.randy.dunlap@oracle.com>
[ Also remove ugly type cast now unnecessary. ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoblk-settings: fix function parameter kernel-doc notation
Randy Dunlap [Mon, 12 Oct 2009 06:20:47 +0000 (08:20 +0200)]
blk-settings: fix function parameter kernel-doc notation

Fix kernel-doc notation in blk-settings.c::blk_queue_max_discard_sectors().

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agonet: Fix struct sock bitfield annotation
Eric Dumazet [Thu, 8 Oct 2009 22:50:25 +0000 (22:50 +0000)]
net: Fix struct sock bitfield annotation

Since commit a98b65a3 (net: annotate struct sock bitfield), we lost
8 bytes in struct sock on 64bit arches because of
kmemcheck_bitfield_end(flags) misplacement.

Fix this by putting together sk_shutdown, sk_no_check, sk_userlocks,
sk_protocol and sk_type in the 'flags' 32bits bitfield

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agopkt_sched: pedit use proper struct
jamal [Sun, 11 Oct 2009 04:21:38 +0000 (04:21 +0000)]
pkt_sched: pedit use proper struct

This probably deserves to go into -stable.

Pedit will reject a policy that is large because it
uses the wrong structure in the policy validation.
This fixes it.

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Add patchwork URL to MAINTAINERS
Eric Dumazet [Sat, 10 Oct 2009 21:40:54 +0000 (21:40 +0000)]
net: Add patchwork URL to MAINTAINERS

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoRevert "USB: Work around BIOS bugs by quiescing USB controllers earlier"
Linus Torvalds [Sun, 11 Oct 2009 22:57:57 +0000 (15:57 -0700)]
Revert "USB: Work around BIOS bugs by quiescing USB controllers earlier"

This reverts commit db8be50c4307dac2b37305fc59c8dc0f978d09ea, as per

http://bugzilla.kernel.org/show_bug.cgi?id=14374
http://marc.info/?l=linux-kernel&m=125446885705223&w=4

We simply can't do the USB handoff at FIXUP_HEADER time, since it will
often require us to have valid IO mappings etc.  But that in turn
requires a whole different approach, not this trivial one-liner.

Maybe we could teach all the USB quirk handoff handlers to only do the
quirk if the device has all its registers set up (since if it isn't
initialized, it's unlikely to be active), but regardless that will need
a whole lot more code than just saying "let's do it really early".

The proper fix is almost certainly to just leave the legacy IOMMU
mappings active until after all devices have been initialized.

Reported-by: Nick Piggin <npiggin@suse.de>
Cc: David Woodhouse <David.Woodhouse@intel.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoLinux 2.6.32-rc4
Linus Torvalds [Sun, 11 Oct 2009 21:43:56 +0000 (14:43 -0700)]
Linux 2.6.32-rc4

14 years agopci: increase alignment to make more space for hidden code
Yinghai Lu [Sun, 11 Oct 2009 21:17:16 +0000 (14:17 -0700)]
pci: increase alignment to make more space for hidden code

As reported in

http://bugzilla.kernel.org/show_bug.cgi?id=13940

on some system when acpi are enabled, acpi clears some BAR for some
devices without reason, and kernel will need to allocate devices for
them.  It then apparently hits some undocumented resource conflict,
resulting in non-working devices.

Try to increase alignment to get more safe range for unassigned devices.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agokbuild: revert "save ARCH & CROSS_COMPILE ..."
Sam Ravnborg [Sun, 11 Oct 2009 21:22:58 +0000 (23:22 +0200)]
kbuild: revert "save ARCH & CROSS_COMPILE ..."

Revert commit 575543347b5baed0ca927cb90ba8807396fe9cc9

It caused following issues:

- On architectures where ARCH= setting is used to select between
  32 and 64 bit this was no longer possible without "make mrproper"
- If ARCH was changed then kbuild refused to run "make mrproper"
  because ARCH had changed
- When CROSS_COMPILE was changed people were asked to run "make mrproper"
  but kbuild refused to run "make mrproper" because CROSS_COMPILE changed.
- Spaces in CROSS_COMPILE was not 'supported'
- If an non-existing ARCH= was used kbuild could get stuck

Lessons learned:
. Despite being simple and straghtforward people uses very different
  approaches when building the kernel.

. CROSS_COMPILE is sometimes used for ccache despite cache being
  only a CC frontend so one would have expected CC to be
  used for this purpose.

. And obviously this was not tested widely enough.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
14 years agowarn about use of uninstalled kernel headers
Arnd Bergmann [Mon, 21 Sep 2009 14:37:12 +0000 (16:37 +0200)]
warn about use of uninstalled kernel headers

User applications frequently hit problems when they try to use
the kernel headers directly, rather than the exported headers.

This adds an explicit warning for this case, and points to
a URL holding an explanation of why this is wrong and what
to do about it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
14 years agokbuild: mkcompile_h: trivial cleanups
Felipe Contreras [Wed, 16 Sep 2009 21:38:40 +0000 (00:38 +0300)]
kbuild: mkcompile_h: trivial cleanups

UTS_TRUNCATTE is simpler this way, and now editors idetify this as a
shell script.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
14 years agokbuild: fix warning when domainname is not available
Felipe Contreras [Wed, 16 Sep 2009 21:38:39 +0000 (00:38 +0300)]
kbuild: fix warning when domainname is not available

Otherwise we get:
"dnsdomainname: Unknown host"

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
14 years agokbuild: Fix size_append issue for bzip2/lzma kernel
Alek Du [Wed, 19 Aug 2009 09:18:39 +0000 (17:18 +0800)]
kbuild: Fix size_append issue for bzip2/lzma kernel

The Makefile.lib will call "echo -ne" to append uncompressed kernel size to
bzip2/lzma kernel image.
The "echo" here depends on the shell that /bin/sh pointing to.
On Ubuntu system, the /bin/sh is pointing to dash, which does not support
"echo -e" at all. Use /bin/echo instead of shell echo should always be safe.

Signed-off-by: Alek Du <alek.du@intel.com>
Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
14 years agokbuild,scripts: use non-builtin echo for '-e'
Amerigo Wang [Wed, 19 Aug 2009 10:19:55 +0000 (18:19 +0800)]
kbuild,scripts: use non-builtin echo for '-e'

Alek reported that on Ubuntu, where dash is used, 'echo -e'
can't work, so let's use non-builtin echo in this case.

Reported-by: Alek Du <alek.du@intel.com>
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
14 years agokbuild: fix the binrpm-pkg target to work with KBUILD_OUTPUT set
Frans Pop [Tue, 25 Aug 2009 20:15:39 +0000 (22:15 +0200)]
kbuild: fix the binrpm-pkg target to work with KBUILD_OUTPUT set

The binrpm-pkg target (binary RPM only) fails when called with
KBUILD_OUTPUT set. This patch makes it work.

For the rpm-pkg target (source + binary RPM), building with
KBUILD_OUTPUT set is not possible and also not needed as the
actual build is done in a temporary directory anyway, so check
that KBUILD_OUTPUT is not set in that case to avoid later errors.

Signed-off-by: Frans Pop <elendil@planet.nl>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
14 years agoMerge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Sun, 11 Oct 2009 18:34:50 +0000 (11:34 -0700)]
Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6

* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: (21 commits)
  [S390] dasd: fix race condition in resume code
  [S390] Add EX_TABLE for addressing exception in usercopy functions.
  [S390] 64-bit register support for 31-bit processes
  [S390] hibernate: Use correct place for CPU address in lowcore
  [S390] pm: ignore time spend in suspended state
  [S390] zcrypt: Improve some comments
  [S390] zcrypt: Fix sparse warning.
  [S390] perf_counter: fix vdso detection
  [S390] ftrace: drop nmi protection
  [S390] compat: fix truncate system call wrapper
  [S390] Provide arch specific mdelay implementation.
  [S390] Fix enabled udelay for short delays.
  [S390] cio: allow setting boxed devices offline
  [S390] cio: make not operational handling consistent
  [S390] cio: make disconnected handling consistent
  [S390] Fix memory leak in /proc/cio_ignore
  [S390] cio: channel path memory leak
  [S390] module: fix memory leak in s390 module loader
  [S390] Enable kmemleak on s390.
  [S390] 3270 console build fix
  ...

14 years agoROMFS: fix length used with romfs_dev_strnlen() function
Bernd Schmidt [Tue, 6 Oct 2009 08:55:26 +0000 (09:55 +0100)]
ROMFS: fix length used with romfs_dev_strnlen() function

An interestingly corrupted romfs file system exposed a problem with the
romfs_dev_strnlen function: it's passing the wrong value to its helpers.
Rather than limit the string to the length passed in by the callers, it
uses the size of the device as the limit.

Signed-off-by: Bernd Schmidt <bernds_cb1@t-online.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Sun, 11 Oct 2009 18:24:25 +0000 (11:24 -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: (32 commits)
  USB: serial: no unnecessary GFP_ATOMIC in oti6858
  USB: serial: fix race between unthrottle and completion handler in visor
  USB: serial: fix assumption that throttle/unthrottle cannot sleep
  USB: serial: fix race between unthrottle and completion handler in symbolserial
  USB: serial: fix race between unthrottle and completion handler in opticon
  USB: ehci: Fix isoc scheduling boundary checking.
  USB: storage: When a device returns no sense data, call it a Hardware Error
  USB: small fix in error case of suspend in generic usbserial code
  USB: visor: fix trivial accounting bug in visor driver
  USB: Fix throttling in generic usbserial driver
  USB: cp210x: Add support for the DW700 UART
  USB: ipaq: fix oops when device is plugged in
  USB: isp1362: fix build warnings on 64-bit systems
  USB: gadget: imx_udc: Use resource size
  USB: storage: iRiver P7 UNUSUAL_DEV patch
  USB: musb: make HAVE_CLK support optional
  USB: xhci: Fix dropping endpoints from the xHC schedule.
  USB: xhci: Don't wait for a disable slot cmd when HC dies.
  USB: xhci: Handle canceled URBs when HC dies.
  USB: xhci: Stop debugging polling loop when HC dies.
  ...

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
Linus Torvalds [Sun, 11 Oct 2009 18:24:05 +0000 (11:24 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
  Staging: comedi: fix build on arches that don't want comedi drivers
  Staging: comedi: pcmcia irq fixes
  Staging: comedi: ni_pcimio: Added device id for pxi-6225.
  Staging: comedi: ni_65xx.c: fix output inversion problem.
  Staging: comedi: ni_65xx.c: fix insn_bits shift calculation.
  Staging: comedi: s526: fixes for pulse generator
  Staging: comedi: s526: Take account of arch's byte order.
  Staging: comedi: s526: Get rid of global variable 'cmReg'.
  Staging: comedi: s526: Fix number of channels on DIO subdevice
  Staging: comedi: cb_pcidio: fix "section mismatch" error
  Staging: comedi: jr3_pci: Initialize transf variable fully in jr3_pci_poll_subdevice().
  Staging: comedi: Corrected type of a printk argument in resize_async_buffer().
  Staging: p9auth: a few fixes
  Staging: rtl8192e: Add #include <linux/vmalloc.h>
  Staging: iio: Don't build on s390
  Staging: winbond: implement prepare_multicast and fix API usage
  Staging: w35und: Fix ->beacon_int breakage
  Staging: remove cowloop driver
  Staging: remove agnx driver
  Staging: comedi: serial2002: fix include build issue

14 years agoMerge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelv...
Linus Torvalds [Sun, 11 Oct 2009 18:23:33 +0000 (11:23 -0700)]
Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  hwmon: (s3c-hwmon) Disable build for S3C64xx
  MAINTAINERS: Fix Riku Voipio's address
  hwmon: (asus_atk0110) Enable the EC
  hwmon: (asus_atk0110) Refactor the code
  hwmon: (sht15) Fix spurious section mismatch warning

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
Linus Torvalds [Sun, 11 Oct 2009 18:23:13 +0000 (11:23 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable

* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
  Btrfs: fix file clone ioctl for bookend extents
  Btrfs: fix uninit compiler warning in cow_file_range_nocow
  Btrfs: constify dentry_operations
  Btrfs: optimize back reference update during btrfs_drop_snapshot
  Btrfs: remove negative dentry when deleting subvolumne
  Btrfs: optimize fsync for the single writer case
  Btrfs: async delalloc flushing under space pressure
  Btrfs: release delalloc reservations on extent item insertion
  Btrfs: delay clearing EXTENT_DELALLOC for compressed extents
  Btrfs: cleanup extent_clear_unlock_delalloc flags
  Btrfs: fix possible softlockup in the allocator
  Btrfs: fix deadlock on async thread startup

14 years agoheaders: remove sched.h from interrupt.h
Alexey Dobriyan [Wed, 7 Oct 2009 13:09:06 +0000 (17:09 +0400)]
headers: remove sched.h from interrupt.h

After m68k's task_thread_info() doesn't refer to current,
it's possible to remove sched.h from interrupt.h and not break m68k!
Many thanks to Heiko Carstens for allowing this.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
Linus Torvalds [Sun, 11 Oct 2009 18:12:33 +0000 (11:12 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (34 commits)
  [SCSI] qla2xxx: Fix NULL ptr deref bug in fail path during queue create
  [SCSI] st: fix possible memory use after free after MTSETBLK ioctl
  [SCSI] be2iscsi: Moving to pci_pools v3
  [SCSI] libiscsi: iscsi_session_setup to allow for private space
  [SCSI] be2iscsi: add 10Gbps iSCSI - BladeEngine 2 driver
  [SCSI] zfcp: Fix hang when offlining device with offline chpid
  [SCSI] zfcp: Fix lockdep warning when offlining device with offline chpid
  [SCSI] zfcp: Fix oops during shutdown of offline device
  [SCSI] zfcp: Fix initial device and cfdc for delayed adapter allocation
  [SCSI] zfcp: correctly initialize unchained requests
  [SCSI] mpt2sas: Bump version 02.100.03.00
  [SCSI] mpt2sas: Support dev remove when phy status is MPI2_EVENT_SAS_TOPO_PHYSTATUS_VACANT
  [SCSI] mpt2sas: Timeout occurred within the HANDSHAKE logic while waiting on firmware to ACK.
  [SCSI] mpt2sas: Call init_completion on a per request basis.
  [SCSI] mpt2sas: Target Reset will be issued from Interrupt context.
  [SCSI] mpt2sas: Added SCSIIO, Internal and high priority memory pools to support multiple TM
  [SCSI] mpt2sas: Copyright change to 2009.
  [SCSI] mpt2sas: Added mpi2_history.txt for MPI2 headers.
  [SCSI] mpt2sas: Update driver to MPI2 REV K headers.
  [SCSI] bfa: Brocade BFA FC SCSI driver
  ...

14 years agoALSA: ice1724 - Make call to set hw params succeed on ESI Juli@
David Henningsson [Sun, 11 Oct 2009 09:37:22 +0000 (11:37 +0200)]
ALSA: ice1724 - Make call to set hw params succeed on ESI Juli@

If two streams are started immediately after one another (such as a
playback and a recording stream), the call to set hw params fails with
EBUSY. This patch makes the call succeed, so playback and recording will
work properly.

Signed-off-by: David Henningsson <launchpad.web@epost.diwic.se>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoARM: Add kmap_atomic type debugging
Russell King [Sun, 11 Oct 2009 15:29:48 +0000 (16:29 +0100)]
ARM: Add kmap_atomic type debugging

Seemingly this support was missed when highmem was added, so
DEBUG_HIGHMEM wouldn't have checked the kmap_atomic type.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: boolean bit testing
Johannes Weiner [Tue, 21 Jul 2009 15:08:28 +0000 (17:08 +0200)]
ARM: boolean bit testing

Bit testing (test, testset, testclear, testchange) for bit numbers
known at compile time returns a word with the tested-for bit set.

Change it to return a true boolean value so to make it consistent with
the out-of-line path and all the other bitops implementations.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: update die() output
Russell King [Sun, 11 Oct 2009 14:25:05 +0000 (15:25 +0100)]
ARM: update die() output

Make die() better match x86:
- add printing of the last accessed sysfs file
- ensure console_verbose() is called under the lock
- ensure we panic outside of oops_exit()

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: Dump code/mem oops lines with the appropriate log level
Russell King [Sun, 11 Oct 2009 14:17:53 +0000 (15:17 +0100)]
ARM: Dump code/mem oops lines with the appropriate log level

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: Dump memory and backtrace as one printk per line
Russell King [Sun, 11 Oct 2009 14:03:11 +0000 (15:03 +0100)]
ARM: Dump memory and backtrace as one printk per line

dump_mem and dump_backtrace were both using multiple printk statements
to print each line.  With DEBUG_LL enabled, this causes OOPS to become
very difficult to read.  Solve this by only using one printk per line.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5756/1: ep93xx: introduce clk parent
Hartley Sweeten [Thu, 8 Oct 2009 22:44:41 +0000 (23:44 +0100)]
ARM: 5756/1: ep93xx: introduce clk parent

The clock generation system in the ep93xx uses two external oscillator's
and two internal PLLs to derive all the internal clocks.  Many of these
internal clocks can be stopped to save power.

This introduces a "parent" hierarchy for the clocks so that the users
count can be correctly tracked for power management.

The "parent" for the video clock can either be one of the PLL outputs
or the external oscillator.  In order to correctly track the "parent"
for the video clock calc_clk_div() needed to be modified.  It now
returns an error code if the desired rate cannot be generated.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5754/1: ep93xx: update i2c support
Hartley Sweeten [Wed, 7 Oct 2009 23:45:00 +0000 (00:45 +0100)]
ARM: 5754/1: ep93xx: update i2c support

Update the ep93xx i2c support:

  1) The platform init code passes the configuration data for the
     i2c-gpio driver.  This allows any gpio pin do be used for the
     sda and scl pins.  It also allows the platform to specify the
     udelay and timeout.
  2) Program the gpio configuration register to enable/disable the
     open drain drivers.  Note that this really only works if the
     sda and scl pins are set to EP93XX_GPIO_LINE_EEDAT and
     EP93XX_GPIO_LINE_EECLK.
  3) Update the edb93xx.c platform init to use the new support.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5753/1: ep93xx: remove old EP93XX_GPIO_* defines
Hartley Sweeten [Wed, 7 Oct 2009 22:43:26 +0000 (23:43 +0100)]
ARM: 5753/1: ep93xx: remove old EP93XX_GPIO_* defines

Most of the EP93XX_GPIO_*_INT_* register defines in ep93xx-regs.h
not required due to how the ep93xx core and gpiolib support handle
gpio interrupts.  Remove the defines to prevent future confusion.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoALSA: ice1724: Fix surround on Chaintech AV-710
Robert Hancock [Sat, 10 Oct 2009 04:08:58 +0000 (22:08 -0600)]
ALSA: ice1724: Fix surround on Chaintech AV-710

Fix the num_total_dacs setting for Chaintech AV710. The existing comment
that only PSDOUT0 is connected is correct, but since the card is using
packed AC97 mode to send 6 channels to the codec, num_total_dacs should be
set to 6 and not 2. This allows 6-channel surround to work. Also clarify
a comment regarding the additional WM8728 codec on this card (it's connected
to the SPDIF output and always receives the same data).

Signed-off-by: Robert Hancock <hancockrwd@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agonet: Link in PHY drivers before others.
David S. Miller [Fri, 9 Oct 2009 21:24:36 +0000 (14:24 -0700)]
net: Link in PHY drivers before others.

We need PHY drivers to initialize in a static kernel before
the MAC drivers that use them.  So link them in first.

Based upon a report by Felix Radensky.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoUSB: serial: no unnecessary GFP_ATOMIC in oti6858
Oliver Neukum [Wed, 7 Oct 2009 16:07:10 +0000 (18:07 +0200)]
USB: serial: no unnecessary GFP_ATOMIC in oti6858

GFP_ATOMIC without good cause is evil.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: fix race between unthrottle and completion handler in visor
Oliver Neukum [Wed, 7 Oct 2009 09:01:38 +0000 (11:01 +0200)]
USB: serial: fix race between unthrottle and completion handler in visor

usb:usbserial:visor: fix race between unthrottle and completion handler

visor_unthrottle() mustn't resubmit the URB unconditionally
as the URB may still be running.

the same bug as opticon.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: fix assumption that throttle/unthrottle cannot sleep
Oliver Neukum [Wed, 7 Oct 2009 08:50:23 +0000 (10:50 +0200)]
USB: serial: fix assumption that throttle/unthrottle cannot sleep

many serial subdrivers are clearly written as if throttle/unthrottle
cannot sleep. This leads to unneeded atomic submissions. This
patch converts affected drivers in a way to makes very clear that
throttle/unthrottle can sleep. Thus future misdesigns can be avoided
and efficiency and reliability improved.

This removes any such assumption using GFP_KERNEL and spin_lock_irq()

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: fix race between unthrottle and completion handler in symbolserial
Oliver Neukum [Wed, 7 Oct 2009 07:30:49 +0000 (09:30 +0200)]
USB: serial: fix race between unthrottle and completion handler in symbolserial

usb:usbserial:symbolserial: fix race between unthrottle and completion handler

symbol_unthrottle() mustn't resubmit the URB unconditionally
as the URB may still be running.

the same bug as opticon.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: fix race between unthrottle and completion handler in opticon
Oliver Neukum [Wed, 7 Oct 2009 07:25:10 +0000 (09:25 +0200)]
USB: serial: fix race between unthrottle and completion handler in opticon

usb:usbserial:opticon: fix race between unthrottle and completion handler

opticon_unthrottle() mustn't resubmit the URB unconditionally
as the URB may still be running.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ehci: Fix isoc scheduling boundary checking.
Sarah Sharp [Tue, 6 Oct 2009 20:45:59 +0000 (13:45 -0700)]
USB: ehci: Fix isoc scheduling boundary checking.

The EHCI driver does some bounds checking when it's scheduling an iTD for
an active endpoint.  It sets the local variable start to
stream->next_uframe and moves that variable further in the schedule if
necessary.  However, the driver fails to do anything with start before
jumping to the ready label and setting the URB's starting frame to
stream->next_uframe.  Alan Stern confirms the EHCI driver should set
stream->next_uframe to start before jumping.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: storage: When a device returns no sense data, call it a Hardware Error
Alan Stern [Tue, 6 Oct 2009 18:07:57 +0000 (14:07 -0400)]
USB: storage: When a device returns no sense data, call it a Hardware Error

This patch (as1294) fixes a problem that has plagued users for several
kernel releases.  Some USB mass-storage devices don't return any sense
data when they encounter certain kinds of errors.  The SCSI layer
interprets this to mean that the operation should be retried, and the
same thing happens -- over and over again with no limit.  In some
circumstances (such as when a bus reset occurs) that is the right
thing to do, but not here.

The patch checks for this condition (a transport failure with no sense
data) and changes the result code to DID_ERROR and the sense code to
Hardware Error.  This does get only a limited number of retries, and
so the command will fail relatively quickly instead of getting stuck
in an infinite loop.

This fixes a large part of Bugzilla #14118.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Mantas Mikulenas <grawity@gmail.com>
CC: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: small fix in error case of suspend in generic usbserial code
Oliver Neukum [Thu, 1 Oct 2009 13:01:17 +0000 (15:01 +0200)]
USB: small fix in error case of suspend in generic usbserial code

usb:usbserial: fix flags in error case of suspension

suspended flag must be reset in error case

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: visor: fix trivial accounting bug in visor driver
Oliver Neukum [Thu, 1 Oct 2009 12:54:46 +0000 (14:54 +0200)]
USB: visor: fix trivial accounting bug in visor driver

usb:usbserial:visor: fix accounting in error case

data not pushed to the tty layer due to an error mustn't be counted

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: Fix throttling in generic usbserial driver
Joris van Rantwijk [Thu, 24 Sep 2009 18:20:20 +0000 (20:20 +0200)]
USB: Fix throttling in generic usbserial driver

The generic usbserial driver in Linux 2.6.31 halts its receiving
channel in response to throttle requests from the line discipline.
Unfortunately it drops the contents of the first URB received after
throttling takes effect. This patch corrects that problem.

Signed-off-by: Joris van Rantwijk <jorispubl@xs4all.nl>
Acked-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: cp210x: Add support for the DW700 UART
Éric Piel [Sun, 4 Oct 2009 11:45:07 +0000 (13:45 +0200)]
USB: cp210x: Add support for the DW700 UART

In the Dell inspiron mini 10, the GPS is connected via a cp2102. This patch
adds detection of this USB device. (I haven't managed to use the GPS under
Linux yet, though)

Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ipaq: fix oops when device is plugged in
Alan Stern [Mon, 5 Oct 2009 19:53:58 +0000 (15:53 -0400)]
USB: ipaq: fix oops when device is plugged in

This patch (as1293) fixes a problem with the ipaq serial driver.  It
tries to bind to all the interfaces, even those that don't have enough
endpoints.  The symptom is an invalid memory reference and oops when
the device is plugged in.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: stable <stable@kernel.org>
Tested-by: Matthias Geissert <geissert@mathematik.tu-darmstadt.de>
Tested-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: isp1362: fix build warnings on 64-bit systems
Mike Frysinger [Wed, 7 Oct 2009 08:29:31 +0000 (04:29 -0400)]
USB: isp1362: fix build warnings on 64-bit systems

A bunch of places assumed pointers were 32-bits in size (bit checking and
debug output), but none of these affected runtime functionality.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: gadget: imx_udc: Use resource size
Tobias Klauser [Fri, 18 Sep 2009 07:14:46 +0000 (09:14 +0200)]
USB: gadget: imx_udc: 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: storage: iRiver P7 UNUSUAL_DEV patch
Sergey Pinaev [Thu, 17 Sep 2009 13:26:50 +0000 (17:26 +0400)]
USB: storage: iRiver P7 UNUSUAL_DEV patch

Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: musb: make HAVE_CLK support optional
Mike Frysinger [Thu, 17 Sep 2009 01:10:53 +0000 (21:10 -0400)]
USB: musb: make HAVE_CLK support optional

The Blackfin port doesn't support HAVE_CLK and the musb driver works fine
with support stubbed out, so take the existing Blackfin clk stubs and move
them to common musb code so we can drop the Kconfig dependency.

Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: xhci: Fix dropping endpoints from the xHC schedule.
Sarah Sharp [Fri, 18 Sep 2009 15:55:12 +0000 (08:55 -0700)]
USB: xhci: Fix dropping endpoints from the xHC schedule.

When an endpoint is to be dropped from the hardware bandwidth schedule, we
want to clear its add flag.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: xhci: Don't wait for a disable slot cmd when HC dies.
Sarah Sharp [Wed, 16 Sep 2009 23:42:39 +0000 (16:42 -0700)]
USB: xhci: Don't wait for a disable slot cmd when HC dies.

When the host controller dies or is removed while a device is plugged in,
the USB core will attempt to deallocate the struct usb_device.  That will
call into xhci_free_dev().  This function used to attempt to submit a
disable slot command to the host controller and clean up the device
structures when that command returned.  Change xhci_free_dev() to skip the
command submission and just free the memory if the host controller died.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: xhci: Handle canceled URBs when HC dies.
Sarah Sharp [Tue, 29 Sep 2009 00:21:37 +0000 (17:21 -0700)]
USB: xhci: Handle canceled URBs when HC dies.

When the host controller dies (e.g. it is removed from a PCI card slot),
the xHCI driver cannot expect commands to complete.  The buggy code this
patch fixes would mark an URB as canceled and then expect the URB to be
completed when the stop endpoint command completed.  That would never
happen if the host controller was dead, so the USB core would just hang in
the disconnect code.

If the host controller died, and the driver asks to cancel an URB, free
any structures associated with that URB and immediately give it back.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: xhci: Stop debugging polling loop when HC dies.
Sarah Sharp [Wed, 16 Sep 2009 23:42:30 +0000 (16:42 -0700)]
USB: xhci: Stop debugging polling loop when HC dies.

If the host controller card is removed from the system, stop the timer
function to debug the xHCI rings.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: usbtmc: fix timeout increase
Gergely Imreh [Tue, 15 Sep 2009 08:03:31 +0000 (16:03 +0800)]
USB: usbtmc: fix timeout increase

The current 10ms timeout is too short for some normal USBTMC device
operation, increase it to a value which was tested with previously
affected Tektronix oscilloscopes.

Signed-off-by: Gergely Imreh <imrehg@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: option: Patch for Huawei Mobile Broadband E270+ Modem
Ronnie Furuskog [Mon, 21 Sep 2009 19:20:55 +0000 (21:20 +0200)]
USB: option: Patch for Huawei Mobile Broadband E270+ Modem

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: option: Toshiba G450 device id
Peter Magdina [Wed, 7 Oct 2009 14:22:17 +0000 (16:22 +0200)]
USB: option: Toshiba G450 device id

Signed-off-by: Peter Magdina <peter@magdina.sk>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: usblcd, fix memory leak
Jiri Slaby [Wed, 23 Sep 2009 14:09:56 +0000 (16:09 +0200)]
USB: usblcd, fix memory leak

Stanse found a memory leak in lcd_probe. Instead of returning without
releasing the memory, jump to the error label which frees it.

http://stanse.fi.muni.cz/

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: sierra driver version change to 1.3.8
Elina Pasheva [Thu, 17 Sep 2009 22:26:20 +0000 (15:26 -0700)]
USB: serial: sierra driver version change to 1.3.8

Updated sierra driver version from 1.3.7 to 1.3.8 now that the autosuspend
capabilities were added to the driver.

Signed-off-by: Elina Pasheva <epasheva@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: don't call release without attach
Alan Stern [Fri, 9 Oct 2009 16:43:12 +0000 (12:43 -0400)]
USB: serial: don't call release without attach

This patch (as1295) fixes a recently-added bug in the USB serial core.
If certain kinds of errors occur during probing, the core may call a
serial driver's release method without previously calling the attach
method.  This causes some drivers (io_ti in particular) to perform an
invalid memory access.

The patch adds a new flag to keep track of whether or not attach has
been called.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Jean-Denis Girard <jd.girard@sysnux.pf>
CC: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: digi_acceleport: Fix broken unthrottle.
Johan Hovold [Tue, 29 Sep 2009 10:39:23 +0000 (12:39 +0200)]
USB: digi_acceleport: Fix broken unthrottle.

This patch fixes a regression introduced in
39892da44b21b5362eb848ca424d73a25ccc488f.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Acked-by: Oliver Neukum <oliver@neukum.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: pl2303: fix error characters not being reported to ldisc
Johan Hovold [Thu, 8 Oct 2009 09:36:46 +0000 (11:36 +0200)]
USB: pl2303: fix error characters not being reported to ldisc

Fix regression introduced by commit
d4fc4a7bfc2dee626f4fec1e209e58eaa4312de6 (tty: Fix the PL2303 private
methods for sysrq).

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ftdi_sio: re-implement read processing
Johan Hovold [Wed, 7 Oct 2009 18:05:07 +0000 (20:05 +0200)]
USB: ftdi_sio: re-implement read processing

- Re-structure read processing.
 - Kill obsolete work queue and always push to tty in completion handler.
 - Use tty_insert_flip_string instead of per character push when
   possible.
 - Fix stalled-read regression in 2.6.31 by using urb status to
   determine when port is closed rather than port count.
 - Fix race with open/close by checking ASYNCB_INITIALIZED in
   unthrottle.
 - Kill private rx_flag and lock and use throttle flags in
   usb_serial_port instead.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ftdi_sio: clean up read completion handler
Johan Hovold [Wed, 7 Oct 2009 18:05:06 +0000 (20:05 +0200)]
USB: ftdi_sio: clean up read completion handler

Remove superfluous error checks in completion handler:

 - No need to check private data and urb pointers as we check urb-status
   before dereferencing priv (which is not freed until urb has been killed
   on close).
 - No need to check tty as it is checked again when processing.
 - No need to check urb->number_of_packets on bulk urb.

Note that both private data and tty are checked again before processing
(possibly from work queue which also is cancelled on close).

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ftdi_sio: remove unused rx_byte counter
Johan Hovold [Wed, 7 Oct 2009 18:05:05 +0000 (20:05 +0200)]
USB: ftdi_sio: remove unused rx_byte counter

Remove unused rx_byte counter which is never exposed as noted by Alan
Cox.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ftdi_sio: remove tty->low_latency
Johan Hovold [Wed, 7 Oct 2009 18:05:04 +0000 (20:05 +0200)]
USB: ftdi_sio: remove tty->low_latency

Fixes tty_flip_buffer_push being called from hard interrupt context with
low_latency set.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>