]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh...
Linus Torvalds [Fri, 24 Aug 2007 04:38:21 +0000 (21:38 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
  9p: fix bad error path in conversion routines
  9p: remove deprecated v9fs_fid_lookup_remove()
  9p: update maintainers and documentation
  9p: fix use after free

16 years agoRenumber AUDIT_TTY_[GS]ET
Miloslav Trmac [Thu, 23 Aug 2007 09:19:53 +0000 (10:19 +0100)]
Renumber AUDIT_TTY_[GS]ET

Renumber AUDIT_TTY_[GS]ET to avoid a conflict with netlink message types
already used in the wild.

Signed-off-by: Miloslav Trmac <mitr@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
Linus Torvalds [Fri, 24 Aug 2007 04:36:13 +0000 (21:36 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
  sdhci: tell which spurious interrupt we got
  sdhci: handle data interrupts during command
  mmc: ignore bad max block size in sdhci
  sdhci: be more cautious about block count register
  drivers/mmc/core/host.c: kmalloc + memset conversion to kzalloc
  drivers/mmc/core/bus.c: kmalloc + memset conversion to kzalloc

16 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
Linus Torvalds [Fri, 24 Aug 2007 04:35:45 +0000 (21:35 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6:
  PCI: Run k8t_sound_hostbridge quirk only when needed
  PCI: disable MSI on RX790
  PCI: disable MSI on RD580
  PCI: disable MSI on RS690
  PCI: make pcie_get_readrq visible in pci.h
  PCI: lets kill the 'PCI hidden behind bridge' message
  pci/hotplug/cpqphp_ctrl.c: remove stale BKL use
  PCI: Document pci_iomap()
  PCI: quirk_e100_interrupt() called too early
  PCI: Move prototypes for pci_bus_find_capability to include/linux/pci.h

16 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Fri, 24 Aug 2007 04:35:04 +0000 (21:35 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (35 commits)
  usb: add PRODUCT, TYPE to usb-interface events
  USB: resubmission unusual_devs modification for Nikon D80
  usb quirks: Add Canon EOS 5D (PC Connection mode) to the autosuspend blacklist
  USB: make EHCI initialize properly on PPC SOCs
  UEAGLE: Remove sysfs files on error case
  USB: fsl_usb2_udc: fix bug in processing setup requests
  USB: g_file_storage: fix bug in DMA buffer handling
  USB: update last_busy field correctly
  USB: fix DoS in pwc USB video driver
  USB: allow retry on descriptor fetch errors
  USB: unkill cxacru atm driver
  USB: Adding support for HTC Smartphones to ipaq
  USB: another quirky device
  USB: quirky mass storage device
  USB: ohci, fix oddball gcc warning
  usb-storage: fix bugs in the disconnect pathway
  usb: typo in usb R8A66597 HCD config
  USB: accept 1-byte Device Status replies, fixing some b0rken devices
  USB: blacklist Samsung ML-2010 printer
  usb-serial: fix oti6858.c segfault in termios handling
  ...

16 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
Linus Torvalds [Fri, 24 Aug 2007 04:34:43 +0000 (21:34 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6:
  sysfs: don't warn on removal of a nonexistent binary file
  HOWTO: latest lxr url address changed
  HOWTO: korean translation of Documentation/HOWTO
  Fix Off-by-one in /sys/module/*/refcnt
  sysfs: fix locking in sysfs_lookup() and sysfs_rename_dir()

16 years agom68knommu: include linux/fs.h for do_pipe()
Greg Ungerer [Thu, 23 Aug 2007 23:26:12 +0000 (09:26 +1000)]
m68knommu: include linux/fs.h for do_pipe()

Include linux/fs.h to get the prototype for do_pipe().
Build fix.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68knommu: include asm-generic/pgtable.h
Greg Ungerer [Thu, 23 Aug 2007 23:25:59 +0000 (09:25 +1000)]
m68knommu: include asm-generic/pgtable.h

Include asm-generic/pgtable.h to pick up the lazy_mmu_mode and
lazy_cpu_mode macros. Won't build without them.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68knommu: include linux/fs.h for getname()
Greg Ungerer [Thu, 23 Aug 2007 23:26:06 +0000 (09:26 +1000)]
m68knommu: include linux/fs.h for getname()

Include linux/fs.h to get the prototype for getname().
Build fix.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agopata_it821x: Fix regression/corruptor
Alan Cox [Thu, 23 Aug 2007 19:18:55 +0000 (20:18 +0100)]
pata_it821x: Fix regression/corruptor

Whoever did the PCI revision patch slipped up on the it821x, and I
didn't spot this at the time either.  They moved the check for the
errata from the 0x10 revision to 0x11.  Put it back

This one is important for 2.6.23 final as in some cases bad things will
occur if 0x10 revision boards don't get the fixups.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agolguest should depend on CONFIG_FUTEX
Alexey Dobriyan [Thu, 23 Aug 2007 20:03:47 +0000 (00:03 +0400)]
lguest should depend on CONFIG_FUTEX

It uses get_futex_key().

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago9p: fix bad error path in conversion routines
Mariusz Kozlowski [Thu, 23 Aug 2007 15:24:28 +0000 (10:24 -0500)]
9p: fix bad error path in conversion routines

When buf_check_overflow() returns != 0 we will hit kfree(ERR_PTR(err))
and it will not be happy about it.

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
16 years ago9p: remove deprecated v9fs_fid_lookup_remove()
Eric Van Hensbergen [Thu, 23 Aug 2007 15:08:45 +0000 (10:08 -0500)]
9p: remove deprecated v9fs_fid_lookup_remove()

This patch removes the v9fs_fid_lookup_remove which is no longer used.

Based on original patch from Adrian Bunk <bunk@stusta.de> which
used #if 0 to isolate the code.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
16 years ago9p: update maintainers and documentation
Eric Van Hensbergen [Mon, 23 Jul 2007 18:06:13 +0000 (13:06 -0500)]
9p: update maintainers and documentation

Updates to the MAINTAINERS file and documentation for 9p to point to the
swik wiki versus the outdated sf.net page.  Also updated some email addresses
and added pointers to papers which better describe the implementation and
application of the Linux 9p client.

Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
16 years ago9p: fix use after free
Eric Van Hensbergen [Thu, 26 Jul 2007 19:04:54 +0000 (14:04 -0500)]
9p: fix use after free

On 7/22/07, Adrian Bunk <bunk@stusta.de> wrote:
     The Coverity checker spotted the following use-after-free
     in net/9p/mux.c:

     <--  snip  -->

     ...
     struct p9_conn *p9_conn_create(struct p9_transport *trans, int msize,
                                         unsigned char *extended)
     {
     ...
             if (!m->tagpool) {
                     kfree(m);
                     return ERR_PTR(PTR_ERR(m->tagpool));
             }
     ...

     <--  snip  -->

Also spotted was a leak of the same structure further down in the function.

Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
16 years agosdhci: tell which spurious interrupt we got
Pierre Ossman [Sun, 12 Aug 2007 15:29:47 +0000 (17:29 +0200)]
sdhci: tell which spurious interrupt we got

When we get unexpected interrupts, also print which interrupt it was.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
16 years agosdhci: handle data interrupts during command
Pierre Ossman [Sun, 12 Aug 2007 14:46:32 +0000 (16:46 +0200)]
sdhci: handle data interrupts during command

It is fully legal for a controller to start issuing data related
interrupts before it has signalled that the command has completed.
Make sure the driver actually can handle this.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
16 years agommc: ignore bad max block size in sdhci
David Vrabel [Fri, 10 Aug 2007 12:25:03 +0000 (13:25 +0100)]
mmc: ignore bad max block size in sdhci

Some SDHC cards report an invalid maximum block size, in these cases
assume they support block sizes up to 512 bytes instead of returning
an error.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
16 years agosdhci: be more cautious about block count register
Pierre Ossman [Sun, 12 Aug 2007 11:13:24 +0000 (13:13 +0200)]
sdhci: be more cautious about block count register

The block count register shouldn't be trusted for single block transfers,
so avoid using it completely when calculating transferred bytes.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
16 years agodrivers/mmc/core/host.c: kmalloc + memset conversion to kzalloc
Mariusz Kozlowski [Fri, 10 Aug 2007 21:00:50 +0000 (14:00 -0700)]
drivers/mmc/core/host.c: kmalloc + memset conversion to kzalloc

 drivers/mmc/core/host.c | 3509 -> 3457 (-52 bytes)
 drivers/mmc/core/host.o | 92400 -> 92136 (-264 bytes)

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
16 years agodrivers/mmc/core/bus.c: kmalloc + memset conversion to kzalloc
Mariusz Kozlowski [Fri, 10 Aug 2007 21:00:47 +0000 (14:00 -0700)]
drivers/mmc/core/bus.c: kmalloc + memset conversion to kzalloc

 drivers/mmc/core/bus.c | 5663 -> 5619 (-44 bytes)
 drivers/mmc/core/bus.o | 70899 -> 70731 (-168 bytes)

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
16 years agoApply memory policies to top two highest zones when highest zone is ZONE_MOVABLE
Mel Gorman [Wed, 22 Aug 2007 21:02:05 +0000 (14:02 -0700)]
Apply memory policies to top two highest zones when highest zone is ZONE_MOVABLE

The NUMA layer only supports NUMA policies for the highest zone.  When
ZONE_MOVABLE is configured with kernelcore=, the the highest zone becomes
ZONE_MOVABLE.  The result is that policies are only applied to allocations
like anonymous pages and page cache allocated from ZONE_MOVABLE when the
zone is used.

This patch applies policies to the two highest zones when the highest zone
is ZONE_MOVABLE.  As ZONE_MOVABLE consists of pages from the highest "real"
zone, it's always functionally equivalent.

The patch has been tested on a variety of machines both NUMA and non-NUMA
covering x86, x86_64 and ppc64.  No abnormal results were seen in
kernbench, tbench, dbench or hackbench.  It passes regression tests from
the numactl package with and without kernelcore= once numactl tests are
patched to wait for vmstat counters to update.

akpm: this is the nasty hack to fix NUMA mempolicies in the presence of
ZONE_MOVABLE and kernelcore= in 2.6.23.  Christoph says "For .24 either merge
the mobility or get the other solution that Mel is working on.  That solution
would only use a single zonelist per node and filter on the fly.  That may
help performance and also help to make memory policies work better."

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Acked-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Tested-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Acked-by: Christoph Lameter <clameter@sgi.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoau1100fb: move au1100fb_fb_blank() beforce au1100fb_setmode()
Yoichi Yuasa [Wed, 22 Aug 2007 21:02:03 +0000 (14:02 -0700)]
au1100fb: move au1100fb_fb_blank() beforce au1100fb_setmode()

au1100fb_fb_blank() should come before au1100fb_setmode().

drivers/video/au1100fb.c: In function 'au1100fb_setmode':
drivers/video/au1100fb.c:211: error: implicit declaration of function 'au1100fb_fb_blank'

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agonewport_con warning fix
Andrew Morton [Wed, 22 Aug 2007 21:02:01 +0000 (14:02 -0700)]
newport_con warning fix

drivers/video/console/newport_con.c: In function `newport_console_init':
drivers/video/console/newport_con.c:743: warning: return makes integer from pointer without a cast

Although one wonders whether that should have been -ENODEV...

Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoselection.h: add tty_struct forward declaration
Andrew Morton [Wed, 22 Aug 2007 21:02:01 +0000 (14:02 -0700)]
selection.h: add tty_struct forward declaration

In file included from drivers/video/console/newport_con.c:16:
include/linux/selection.h:16: warning: "struct tty_struct" declared inside parameter list
include/linux/selection.h:16: warning: its scope is only this definition or declaration, which is probably not what you want

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoCheck for PPC32 in imsttfb
Stephen Rothwell [Wed, 22 Aug 2007 21:02:00 +0000 (14:02 -0700)]
Check for PPC32 in imsttfb

This is the correct fix according to Paul Mackerras and allows an
allyesconfig on PPC64 to build.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoXen i386 xen-head.S fix sections mixup
Mathieu Desnoyers [Wed, 22 Aug 2007 21:01:59 +0000 (14:01 -0700)]
Xen i386 xen-head.S fix sections mixup

Xen i386 xen-head.S fix sections mixup

xen-head.S does not come back to the data section, leaving the text section
as current section. It causes problems with a slightly enhanced DEBUG_RODATA
that supports CONFIG_HOTPLUG and bringing a CPU up after the text has been
marked read-only: reference to early_gdt_descr causes a page fault.

Updates:

- It should be using pushsection/popsection.
- Actually, the push/popsections around the ELFNOTEs are redundant; ELFNOTE()
  does its own push/popsection to put things into the appropriate .note* section
  anyway.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Acked-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Chris Wright <chrisw@sous-sol.org>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoexec: kill unsafe BUG_ON(sig->count) checks
Oleg Nesterov [Wed, 22 Aug 2007 21:01:58 +0000 (14:01 -0700)]
exec: kill unsafe BUG_ON(sig->count) checks

de_thread:

if (atomic_read(&oldsighand->count) <= 1)
BUG_ON(atomic_read(&sig->count) != 1);

This is not safe without the rmb() in between.  The results of two
correctly ordered __exit_signal()->atomic_dec_and_test()'s could be seen
out of order on our CPU.

The same is true for the "thread_group_empty()" case, __unhash_process()'s
changes could be seen before atomic_dec_and_test(&sig->count).

On some platforms (including i386) atomic_read() doesn't provide even the
compiler barrier, in that case these checks are simply racy.

Remove these BUG_ON()'s. Alternatively, we can do something like

BUG_ON( ({ smp_rmb(); atomic_read(&sig->count) != 1; }) );

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agortc-max6902 minor fixes
David Brownell [Wed, 22 Aug 2007 21:01:57 +0000 (14:01 -0700)]
rtc-max6902 minor fixes

Minor tweaks to rtc-max6902: make it hotplug correctly, and fix a few
space-before-tab whitespace botches.  This driver has no current in-tree
users, so the hotplug fix changes the driver name.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoSLUB: do not fail on broken memory configurations
Christoph Lameter [Wed, 22 Aug 2007 21:01:57 +0000 (14:01 -0700)]
SLUB: do not fail on broken memory configurations

Print a big fat warning and do what is necessary to continue if a node is
marked as up (meaning either node is online (upstream) or node has memory
(Andrew's tree)) but allocations from the node do not succeed.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoSLUB: use atomic_long_read for atomic_long variables
Christoph Lameter [Wed, 22 Aug 2007 21:01:56 +0000 (14:01 -0700)]
SLUB: use atomic_long_read for atomic_long variables

SLUB is using atomic_read() for variables declared atomic_long_t.
Switch to atomic_long_read().

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocfag12864b fix
Miguel Ojeda [Wed, 22 Aug 2007 21:01:56 +0000 (14:01 -0700)]
cfag12864b fix

This one-liner patch fixes a bug in drivers/auxdisplay/cfag12864b.c

At cfag12864b_init(), the driver tries to kalloc some memory in the
variable cfag12864b_cache.

Then, as usual, it checks if the call failed. However, it checks
cfag12864b_buffer instead.

This patch changes the "cfag12864b_buffer" to "cfag12864b_cache" so the
correct variable is checked.

Signed-off-by: Miguel Ojeda <maxextreme@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoserial: add pci ids for PA Semi PWRficient onchip uarts
Olof Johansson [Wed, 22 Aug 2007 21:01:55 +0000 (14:01 -0700)]
serial: add pci ids for PA Semi PWRficient onchip uarts

Add PCI IDs for the onchip UARTs on PA Semi PWRficient.

Signed-off-by: Olof Johansson <olof@lixom.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoautofs4: deadlock during create
Ian Kent [Wed, 22 Aug 2007 21:01:54 +0000 (14:01 -0700)]
autofs4: deadlock during create

Due to inconsistent locking in the VFS between calls to lookup and
revalidate deadlock can occur in the automounter.

The inconsistency is that the directory inode mutex is held for both lookup
and revalidate calls when called via lookup_hash whereas it is held only
for lookup during a path walk.  Consequently, if the mutex is held during a
call to revalidate autofs4 can't release the mutex to callback the daemon
as it can't know whether it owns the mutex.

This situation happens when a process tries to create a directory within an
automount and a second process also tries to create the same directory
between the lookup and the mkdir.  Since the first process has dropped the
mutex for the daemon callback, the second process takes it during
revalidate leading to deadlock between the autofs daemon and the second
process when the daemon tries to create the mount point directory.

After spending quite a bit of time trying to resolve this on more than one
occassion, using rather complex and ulgy approaches, it turns out that just
delaying the hashing of the dentry until the create operation works fine.

Signed-off-by: Ian Kent <raven@themaw.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agouml: fix previous request size limit fix
Jeff Dike [Wed, 22 Aug 2007 21:01:53 +0000 (14:01 -0700)]
uml: fix previous request size limit fix

The previous patch which limited the number of sectors in a single request
to a COWed device was correct in concept, but the limit was implemented in
the wrong place.

By putting it in ubd_add, it covered the cases where the COWing was
specified on the command line.  However, when the command line only has the
COW file specified, the fact that it's a COW file isn't known until it's
opened, so the limit is missed in these cases.

This patch moves the sector limit from ubd_add to ubd_open_dev.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomd: correctly update sysfs when a raid1 is reshaped
NeilBrown [Wed, 22 Aug 2007 21:01:53 +0000 (14:01 -0700)]
md: correctly update sysfs when a raid1 is reshaped

When a raid1 array is reshaped (number of drives changed), the list of devices
is compacted, so that slots for missing devices are filled with working
devices from later slots.  This requires the "rd%d" symlinks in sysfs to be
updated.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomd: make sure a re-add after a restart honours bitmap when resyncing
NeilBrown [Wed, 22 Aug 2007 21:01:52 +0000 (14:01 -0700)]
md: make sure a re-add after a restart honours bitmap when resyncing

Commit 1757128438d41670ded8bc3bc735325cc07dc8f9 was slightly bad.  If an array
has a write-intent bitmap, and you remove a drive, then readd it, only the
changed parts should be resynced.  However after the above commit, this only
works if the array has not been shut down and restarted.

This is because it sets 'fullsync' at little more often than it should.  This
patch is more careful.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agow1: fix w1_remove_master_device() searching
Evgeniy Polyakov [Wed, 22 Aug 2007 21:01:51 +0000 (14:01 -0700)]
w1: fix w1_remove_master_device() searching

In case bus master driver provided bogus value as its private data, search
can be incorrect.  Problem found by Adrian Bunk.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Cc: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoFix VM_FAULT flags conversion for hugetlb
Adam Litke [Wed, 22 Aug 2007 21:01:51 +0000 (14:01 -0700)]
Fix VM_FAULT flags conversion for hugetlb

It seems a simple mistake was made when converting follow_hugetlb_page()
over to the VM_FAULT flags bitmasks (in "mm: fault feedback #2", commit
83c54070ee1a2d05c89793884bea1a03f2851ed4).

By using the wrong bitmask, hugetlb_fault() failures are not being
recognized.  This results in an infinite loop whenever follow_hugetlb_page
is involved in a failed fault.

Signed-off-by: Adam Litke <agl@us.ibm.com>
Acked-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agosynclink_gt fix module reference
Paul Fulghum [Wed, 22 Aug 2007 21:01:50 +0000 (14:01 -0700)]
synclink_gt fix module reference

Get module reference on open() by generic HDLC to prevent module from
unloading while interface is active.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoslab: skip calling cache_free_alien() when the platform is not numa capable
Siddha, Suresh B [Wed, 22 Aug 2007 21:01:49 +0000 (14:01 -0700)]
slab: skip calling cache_free_alien() when the platform is not numa capable

Skip calling cache_free_alien() when the platform is not numa capable.
This will avoid cache misses that happen while accessing slabp (which is
per page memory reference) to get nodeid.  Instead use a global variable to
skip the call, which is mostly likely to be present in the cache.

This gives a 0.8% performance boost with the database oltp workload on a
quad-core SMP platform and by any means the number is not small :)

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Acked-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoIPMI: fix warning in ipmi_si_intf.c
Mijo Safradin [Wed, 22 Aug 2007 21:01:48 +0000 (14:01 -0700)]
IPMI: fix warning in ipmi_si_intf.c

trivial change: fix warning

Signed-off-by: Mijo Safradin <safradin@de.ibm.com>
Acked-by: Christian Krafft <krafft@de.ibm.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agosignalfd: make it group-wide, fix posix-timers scheduling
Oleg Nesterov [Wed, 22 Aug 2007 21:01:48 +0000 (14:01 -0700)]
signalfd: make it group-wide, fix posix-timers scheduling

With this patch any thread can dequeue its own private signals via signalfd,
even if it was created by another sub-thread.

To do so, we pass "current" to dequeue_signal() if the caller is from the same
thread group. This also fixes the scheduling of posix timers broken by the
previous patch.

If the caller doesn't belong to this thread group, we can't handle __SI_TIMER
case properly anyway. Perhaps we should forbid the cross-process signalfd usage
and convert ctx->tsk to ctx->sighand.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Davide Libenzi <davidel@xmailserver.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Michael Kerrisk <mtk-manpages@gmx.net>
Cc: Roland McGrath <roland@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agosignalfd: fix interaction with posix-timers
Oleg Nesterov [Wed, 22 Aug 2007 21:01:42 +0000 (14:01 -0700)]
signalfd: fix interaction with posix-timers

dequeue_signal:

if (__SI_TIMER) {
spin_unlock(&tsk->sighand->siglock);
do_schedule_next_timer(info);
spin_lock(&tsk->sighand->siglock);
}

Unless tsk == curent, this is absolutely unsafe: nothing prevents tsk from
exiting. If signalfd was passed to another process, do_schedule_next_timer()
is just wrong.

Add yet another "tsk == current" check into dequeue_signal().

This patch fixes an oopsable bug, but breaks the scheduling of posix timers
if the shared __SI_TIMER signal was fetched via signalfd attached to another
sub-thread. Mostly fixed by the next patch.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Davide Libenzi <davidel@xmailserver.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Michael Kerrisk <mtk-manpages@gmx.net>
Cc: Roland McGrath <roland@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoposix-timers: fix creation race
Oleg Nesterov [Wed, 22 Aug 2007 21:01:37 +0000 (14:01 -0700)]
posix-timers: fix creation race

sys_timer_create() sets ->it_process and unlocks ->siglock, then checks
tmr->it_sigev_notify to define if get_task_struct() is needed.

We already passed ->it_id to the caller, another thread can delete this timer
and free its memory in between.

As a minimal fix, move this code under ->siglock, sys_timer_delete() takes it
too before calling release_posix_timer().  A proper serialization would be to
take ->it_lock, we add a partly initialized timer on posix_timers_id, not
good.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoposix-timers: fix deletion race
Thomas Gleixner [Wed, 22 Aug 2007 21:01:37 +0000 (14:01 -0700)]
posix-timers: fix deletion race

timer_delete does:
lock_timer();
timer->it_process = NULL;
unlock_timer();
release_posix_timer();

timer->it_process is checked in lock_timer() to prevent access to a
timer, which is on the way to be deleted, but the check happens after
idr_lock is dropped. This allows release_posix_timer() to delete the
timer before the lock code can check the timer:

  CPU 0 CPU 1

  lock_timer();
  timer->it_process = NULL;
  unlock_timer();
lock_timer()
spin_lock(idr_lock);
timer = idr_find();
spin_lock(timer->lock);
spin_unlock(idr_lock);
  release_posix_timer();
spin_lock(idr_lock);
idr_remove(timer);
spin_unlock(idr_lock);
free_timer(timer);
if (timer->......)

Change the locking to prevent this.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoIntroduce CONFIG_CHECK_SIGNATURE
Geert Uytterhoeven [Wed, 22 Aug 2007 21:01:36 +0000 (14:01 -0700)]
Introduce CONFIG_CHECK_SIGNATURE

Introduce CONFIG_CHECK_SIGNATURE to control inclusion of check_signature()
and avoid problems on platforms that don't have readb().

Let the few legacy (ISA || PCI || X86) drivers that need check_signature()
select CONFIG_CHECK_SIGNATURE.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68k/mac: Make mac_hid_mouse_emulate_buttons() declaration visible
Geert Uytterhoeven [Wed, 22 Aug 2007 21:01:35 +0000 (14:01 -0700)]
m68k/mac: Make mac_hid_mouse_emulate_buttons() declaration visible

m68k/mac: Make mac_hid_mouse_emulate_buttons() declaration visible

drivers/char/keyboard.c: In function 'kbd_keycode':
drivers/char/keyboard.c:1142: error: implicit declaration of function 'mac_hid_mouse_emulate_buttons'

The forward declaration of mac_hid_mouse_emulate_buttons() is not visible on
m68k because it's hidden in the middle of a big #ifdef block.

Move it to <linux/kbd_kern.h>, correct the type of the second parameter, and
include <linux/kbd_kern.h> where needed.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agozorro: Make sysfs config attribute read-only
Geert Uytterhoeven [Wed, 22 Aug 2007 21:01:34 +0000 (14:01 -0700)]
zorro: Make sysfs config attribute read-only

zorro: Make the sysfs `config' attribute read-only, as you cannot write to it
(there's no .write function neither).

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68k: Fix a few hickups in drivers/scsi/Kconfig
Geert Uytterhoeven [Wed, 22 Aug 2007 21:01:34 +0000 (14:01 -0700)]
m68k: Fix a few hickups in drivers/scsi/Kconfig

m68k: Fix a few hickups in drivers/scsi/Kconfig

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68k: Dont include RODATA into text segment
Roman Zippel [Wed, 22 Aug 2007 21:01:33 +0000 (14:01 -0700)]
m68k: Dont include RODATA into text segment

Don't include RODATA into text segment as it includes the kallsyms data and
can cause spurious link failures (layout differences can change the number of
symbols in kallsyms, i.e.  when a symbol is equal to _etext it's not
included).

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68k: Enable arbitary speed tty support
Alan Cox [Wed, 22 Aug 2007 21:01:32 +0000 (14:01 -0700)]
m68k: Enable arbitary speed tty support

Add the needed constants and defines to activate the existing code.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68k: Use _AC() instead of #ifdef __ASSEMBLY__
Geert Uytterhoeven [Wed, 22 Aug 2007 21:01:32 +0000 (14:01 -0700)]
m68k: Use _AC() instead of #ifdef __ASSEMBLY__

m68k: Use _AC() instead of #ifdef __ASSEMBLY__ hackery when needed, remove
hackery when unused.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoremove dead code in via-pmu68k
Johannes Berg [Wed, 22 Aug 2007 21:01:31 +0000 (14:01 -0700)]
remove dead code in via-pmu68k

When suspend is ever implemented for pmu68k it really should follow the
generic pm_ops concept and not mirror the platform-specific /dev/pmu
device with ioctls on it. Hence, this patch removes the unused code there;
should the implementers need it they can look at via-pmu.c and/or the
history of the file.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68k: Remove unnecessary m68k_memoffset export and init
Roman Zippel [Wed, 22 Aug 2007 21:01:31 +0000 (14:01 -0700)]
m68k: Remove unnecessary m68k_memoffset export and init

Remove an unnecessary m68k_memoffset export and initialization

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68k: Kill superfluous extern
Geert Uytterhoeven [Wed, 22 Aug 2007 21:01:30 +0000 (14:01 -0700)]
m68k: Kill superfluous extern

Kill a superfluous extern declaration

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68k: <asm/page.h> needs <linux/compiler.h>
Geert Uytterhoeven [Wed, 22 Aug 2007 21:01:29 +0000 (14:01 -0700)]
m68k: <asm/page.h> needs <linux/compiler.h>

m68k: <asm/page.h> needs <linux/compiler.h> because of __attribute_const__

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofix NULL pointer dereference in __vm_enough_memory()
Alan Cox [Wed, 22 Aug 2007 21:01:28 +0000 (14:01 -0700)]
fix NULL pointer dereference in __vm_enough_memory()

The new exec code inserts an accounted vma into an mm struct which is not
current->mm.  The existing memory check code has a hard coded assumption
that this does not happen as does the security code.

As the correct mm is known we pass the mm to the security method and the
helper function.  A new security test is added for the case where we need
to pass the mm and the existing one is modified to pass current->mm to
avoid the need to change large amounts of code.

(Thanks to Tobias for fixing rejects and testing)

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: WU Fengguang <wfg@mail.ustc.edu.cn>
Cc: James Morris <jmorris@redhat.com>
Cc: Tobias Diedrich <ranma+kernel@tdiedrich.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocorrect name for rtc-m41t80
David Brownell [Wed, 22 Aug 2007 21:01:27 +0000 (14:01 -0700)]
correct name for rtc-m41t80

The new rtc-m41t80 driver name doesn't match its module name, which
prevents it from properly hotplugging.  Since it's new, no platforms yet
depend on that name ...  so this patch fixes the driver name to match its
module name, rather than going the other way around with a MODULE_ALIAS().

NOTE: This sort of bug is a new thing to watch out for with new-style I2C
drivers; previously I2C couldn't hotplug.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agosynchronous lumpy reclaim: wait for page writeback when directly reclaiming contiguou...
Andy Whitcroft [Wed, 22 Aug 2007 21:01:26 +0000 (14:01 -0700)]
synchronous lumpy reclaim: wait for page writeback when directly reclaiming contiguous areas

Lumpy reclaim works by selecting a lead page from the LRU list and then
selecting pages for reclaim from the order-aligned area of pages.  In the
situation were all pages in that region are inactive and not referenced by any
process over time, it works well.

In the situation where there is even light load on the system, the pages may
not free quickly.  Out of a area of 1024 pages, maybe only 950 of them are
freed when the allocation attempt occurs because lumpy reclaim returned early.
 This patch alters the behaviour of direct reclaim for large contiguous
blocks.

The first attempt to call shrink_page_list() is asynchronous but if it fails,
the pages are submitted a second time and the calling process waits for the IO
to complete.  This may stall allocators waiting for contiguous memory but that
should be expected behaviour for high-order users.  It is preferable behaviour
to potentially queueing unnecessary areas for IO.  Note that kswapd will not
stall in this fashion.

[apw@shadowen.org: update to version 2]
[apw@shadowen.org: update to version 3]
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agosynchronous lumpy reclaim: ensure we count pages transitioning inactive via clear_act...
Andy Whitcroft [Wed, 22 Aug 2007 21:01:25 +0000 (14:01 -0700)]
synchronous lumpy reclaim: ensure we count pages transitioning inactive via clear_active_flags

As pointed out by Mel when reclaim is applied at higher orders a significant
amount of IO may be started.  As this takes finite time to drain reclaim will
consider more areas than ultimatly needed to satisfy the request.  This leads
to more reclaim than strictly required and reduced success rates.

I was able to confirm Mel's test results on systems locally.  These show that
even under light load the success rates drop off far more than expected.
Testing with a modified version of his patch (which follows) I was able to
allocate almost all of ZONE_MOVABLE with a near idle system.  I ran 5 test
passes sequentially following system boot (the system has 29 hugepages in
ZONE_MOVABLE):

  2.6.23-rc1              11  8  6  7  7
  sync_lumpy              28 28 29 29 26

These show that although hugely better than the near 0% success normally
expected we can only allocate about a 1/4 of the zone.  Using synchronous
reclaim for these allocations we get close to 100% as expected.

I have also run our standard high order tests and these show no regressions in
allocation success rates at rest, and some significant improvements under
load.

This patch:

We are transitioning pages from active to inactive in clear_active_flags,
those need counting as PGDEACTIVATE vm events.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoh8300: missing include
Yoshinori Sato [Wed, 22 Aug 2007 21:01:24 +0000 (14:01 -0700)]
h8300: missing include

Build error fix.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoDocumentation: fix getdelays.c printf bug
Michael Neuling [Wed, 22 Aug 2007 23:31:42 +0000 (09:31 +1000)]
Documentation: fix getdelays.c printf bug

Commit b663a79c191508f27cd885224b592a878c0ba0f6 ("taskstats: add
context-switch counters") incorrectly removed a comma from a printf
statement.  This causes corruption in the output printing or a seg
fault.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofree_irq(): fix DEBUG_SHIRQ handling
Andrew Morton [Wed, 22 Aug 2007 21:01:20 +0000 (14:01 -0700)]
free_irq(): fix DEBUG_SHIRQ handling

If we're going to run the handler from free_irq() then we must do it with
local irq's disabled.  Otherwise lockdep complains that the handler is taking
irq-safe spinlocks in a non-irq-safe fashion.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoAdd blacklisting capability to serial_pci to avoid misdetection of serial ports
Christian Schmidt [Wed, 22 Aug 2007 21:01:19 +0000 (14:01 -0700)]
Add blacklisting capability to serial_pci to avoid misdetection of serial ports

The serial_pci driver tries to guess serial ports on unknown devices based
on the PCI class (modem or serial).  On certain softmodems (AC'97 modems)
this can lead to the recognition of non-existing serial ports.

This patch adds a blacklist of PCI IDs that are to be ignored by the driver.

[akpm@linux-foundation.org: cleanups]
Signed-off-by: Christian Schmidt <schmidt@digadd.de>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Russell King <rmk+lkml@arm.linux.org.uk>
Cc: Yinghai Lu <yinghai.lu@sun.com>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoSerial 8250: handle saving the clear-on-read bits from the LSR and MSR
Corey Minyard [Wed, 22 Aug 2007 21:01:18 +0000 (14:01 -0700)]
Serial 8250: handle saving the clear-on-read bits from the LSR and MSR

Reading the LSR clears the break, parity, frame error, and overrun bits in
the 8250 chip, but these are not being saved in all places that read the
LSR.  Same goes for the MSR delta bits.  Save the LSR bits off whenever the
lsr is read so they can be handled later in the receive routine.  Save the
MSR bits to be handled in the modem status routine.

Also, clear the stored bits and clear the interrupt registers before
enabling interrupts, to avoid handling old values of the stored bits in the
interrupt routines.

[akpm@linux-foundation.org: clean up pre-existing code]
Signed-off-by: Corey Minyard <minyard@acm.org>
Cc: Russell King <rmk+lkml@arm.linux.org.uk>
Cc: Yinghai Lu <yinghai.lu@sun.com>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoserial_txx9: Fix modem control line handling
Atsushi Nemoto [Wed, 22 Aug 2007 21:01:15 +0000 (14:01 -0700)]
serial_txx9: Fix modem control line handling

This chip does not have modem control lines.  Return TIOCM_CAR and
TIOCM_DSR always on get_mctrl() and ajust some bits in termios cflag.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoserial: add support for ITE 887x chips
Niels de Vos [Wed, 22 Aug 2007 21:01:14 +0000 (14:01 -0700)]
serial: add support for ITE 887x chips

Add support for the it887x-chips (PCI) manufactured by ITE.

Signed-off-by: Niels de Vos <niels.devos@wincor-nixdorf.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoserial: don't optimise away baud rate changes when BOTHER is used
David Woodhouse [Wed, 22 Aug 2007 21:01:11 +0000 (14:01 -0700)]
serial: don't optimise away baud rate changes when BOTHER is used

The uart_set_termios() function will bail out early without bothering to
touch the hardware, if it decides that nothing "relevant" has changed.
Unfortunately, its idea of "relevant" doesn't include c_[io]speed.  So if
the baud rate bits are BOTHER and you just change the speed, the change
gets optimised away.

This patch makes it ignore the old Bfoo bits in c_cflag and just check
whether c_ispeed and c_ospeed have changed.  Those integers are always set
appropriately for us by set_termios().

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Alan Cox <alan@redhat.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofutex_unlock_pi() hurts my brain and may cause application deadlock
john stultz [Wed, 22 Aug 2007 21:01:10 +0000 (14:01 -0700)]
futex_unlock_pi() hurts my brain and may cause application deadlock

Avoid futex_unlock_pi returning -EFAULT (which results in deadlock), by
clearing uval before jumping to retry_locked.

Signed-off-by: John Stultz <johnstul@us.ibm.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoDocument Linux Memory Policy
Lee Schermerhorn [Wed, 22 Aug 2007 21:01:06 +0000 (14:01 -0700)]
Document Linux Memory Policy

I couldn't find any memory policy documentation in the Documentation
directory, so here is my attempt to document it.

There's lots more that could be written about the internal design--including
data structures, functions, etc.  However, if you agree that this is better
that the nothing that exists now, perhaps it could be merged.  This will
provide a baseline for updates to document the many policy patches that are
currently being worked.

Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Michael Kerrisk <mtk-manpages@gmx.net>
Acked-by: Rob Landley <rob@landley.net>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agokernel/auditsc.c: fix an off-by-one
Adrian Bunk [Wed, 22 Aug 2007 21:01:05 +0000 (14:01 -0700)]
kernel/auditsc.c: fix an off-by-one

This patch fixes an off-by-one in a BUG_ON() spotted by the Coverity
checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Amy Griffis <amy.griffis@hp.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotpmdd maintainers
Kent Yoder [Wed, 22 Aug 2007 21:01:04 +0000 (14:01 -0700)]
tpmdd maintainers

Fix up the maintainers info in the tpm drivers.  Kylene will be out for
some time, so copying the sourceforge list is the best way to get some
attention.

Cc: Marcel Selhorst <tpm@selhorst.net>
Cc: Kylene Jo Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agosparsemem: ensure we initialise the node mapping for SPARSEMEM_STATIC
Andy Whitcroft [Wed, 22 Aug 2007 21:01:03 +0000 (14:01 -0700)]
sparsemem: ensure we initialise the node mapping for SPARSEMEM_STATIC

Booting SPARSEMEM on NUMA systems trips a BUG in page_alloc.c:

Initializing HighMem for node 0 (00038000:00100000)
Initializing HighMem for node 1 (00100000:001ffe00)
------------[ cut here ]------------
kernel BUG at /home/apw/git/linux-2.6/mm/page_alloc.c:456!
[...]

This occurs because the section to node id mapping is not being
setup correctly during init under SPARSEMEM_STATIC, leading to an
attempt to free pages from all nodes into the zones on node 0.

When the zone_table[] was removed in the following commit, a new
section to node mapping table was introduced:

    commit 89689ae7f95995723fbcd5c116c47933a3bb8b13
    [PATCH] Get rid of zone_table[]

That conversion inadvertantly only initialised the node mapping in
SPARSEMEM_EXTREME.  Ensure we initialise the node mapping in
SPARSEMEM_STATIC.

[akpm@linux-foundation.org: make the stubs static inline]
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Cc: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoeCryptfs: fix lookup error for special files
Ryusuke Konishi [Wed, 22 Aug 2007 21:01:02 +0000 (14:01 -0700)]
eCryptfs: fix lookup error for special files

When ecryptfs_lookup() is called against special files, eCryptfs generates
the following errors because it tries to treat them like regular eCryptfs
files.

Error opening lower file for lower_dentry [0xffff810233a6f150], lower_mnt [0xffff810235bb4c80], and flags [0x8000]
Error opening lower_file to read header region
Error attempting to read the [user.ecryptfs] xattr from the lower file; return value = [-95]
Valid metadata not found in header region or xattr region; treating file as unencrypted

For instance, the problem can be reproduced by the steps below.

  # mkdir /root/crypt /mnt/crypt
  # mount -t ecryptfs /root/crypt /mnt/crypt
  # mknod /mnt/crypt/c0 c 0 0
  # umount /mnt/crypt
  # mount -t ecryptfs /root/crypt /mnt/crypt
  # ls -l /mnt/crypt

This patch fixes it by adding a check similar to directories and
symlinks.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Acked-by: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoPCI: Run k8t_sound_hostbridge quirk only when needed
Jean Delvare [Sun, 19 Aug 2007 10:03:07 +0000 (12:03 +0200)]
PCI: Run k8t_sound_hostbridge quirk only when needed

The k8t_sound_hostbridge PCI quick fires on my motherboard (Jetway
K8M8MS) while it shouldn't: the on-board sound chip is not disabled
and is working just fine. Looking at the code, I see that we are
running the quirk for two distinct register values (0x88 and 0xc8)
and then clear bit 6 (0x40). However value 0x88 already has bit 6
cleared so this is a no-op. This is what happens on my board. Thus I
believe that the quirk should only be run for register value 0xc8.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoPCI: disable MSI on RX790
Tejun Heo [Tue, 21 Aug 2007 05:33:01 +0000 (14:33 +0900)]
PCI: disable MSI on RX790

RX790 can't do MSI like its predecessors.  Disable MSI on RX790.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoPCI: disable MSI on RD580
Tejun Heo [Fri, 17 Aug 2007 18:03:10 +0000 (03:03 +0900)]
PCI: disable MSI on RD580

RD580 can't do MSI like its predecessors.  Disable MSI on RD580.

Signed-off-by: Tejun Heo <teheo@suse.de>
CC: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoPCI: disable MSI on RS690
Tejun Heo [Thu, 16 Aug 2007 05:34:42 +0000 (14:34 +0900)]
PCI: disable MSI on RS690

RS690 can't do MSI like its predecessors.  Disable MSI on RS690.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Henry Su <henry.su@amd.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoPCI: make pcie_get_readrq visible in pci.h
Brice Goglin [Tue, 14 Aug 2007 10:43:48 +0000 (12:43 +0200)]
PCI: make pcie_get_readrq visible in pci.h

[PATCH] PCI: make pcie_get_readrq visible in pci.h

pcie_get_readrq() is EXPORT_SYMBOL'ed, but its prototype is not
visible in pci.h, add it there.

This is needed by some network drivers.

Signed-off-by: Brice Goglin <brice@myri.com>
Acked-by: Peter Oruba <peter.oruba@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoPCI: lets kill the 'PCI hidden behind bridge' message
Bernhard Kaindl [Mon, 30 Jul 2007 18:35:13 +0000 (20:35 +0200)]
PCI: lets kill the 'PCI hidden behind bridge' message

Adrian Bunk wrote:
> Alois Nešpor wrote
>> PCI: Bus #0b (-#0e) is hidden behind transparent bridge #0a (-#0b) (try 'pci=assign-busses')
>> Please report the result to linux-kernel to fix this permanently"
>>
>> dmesg:
>> "Yenta: Raising subordinate bus# of parent bus (#0a) from #0b to #0e"
>> without pci=assign-busses and nothing with pci=assign-busses.
>
> Bernhard?

Ok, lets kill the message. As Alois Nešpor also saw, that's fixed up by Yenta,
so PCI does not have to warn about it. PCI could still warn about it if
is_cardbus is 0 in that instance of pci_scan_bridge(), but so far I have
not seen a report where this would have been the case so I think we can
spare the kernel of that check (removes ~300 lines of asm) unless debugging
is done.

History: The whole check was added in the days before we had the fixup
for this in Yenta and pci=assign-busses was the only way to get CardBus
cards detected on many (not all) of the machines which give this warning.

In theory, there could be cases when this warning would be triggered and
it's not cardbus, then the warning should still apply, but I think this
should only be the case when working on a completely broken PCI setup,
but one may have already enabled the debug code in drivers/pci and the
patched check would then trigger.

I do not sign this off yet because it's completely untested so far, but
everyone is free to test it (with the #ifdef DEBUG replaced by #if 1 and
pr_debug( changed to printk(.

We may also dump the whole check (remove everything within the #ifdef from
the source) if that's perferred.

On Alois Nešpor's machine this would then (only when debugging) this message:

"PCI: Bus #0b (-#0e) is partially hidden behind transparent bridge #0a (-#0b)"

"partially" should be in the message on his machine because #0b of #0b-#0e
is reachable behind #0a-#0b, but not #0c-#0e.

But that differentiation is now moot anyway because the fixup in Yenta takes
care of it as far as I could see so far, which means that unless somebody
is debugging a totally broken PCI setup, this message is not needed anymore,
not even for debugging PCI.

Ok, here the patch with the following changes:

* Refined to say that the bus is only partially hidden when the parent
  bus numbers are not totally way off (outside of) the child bus range
* remove the reference to pci=assign-busses and the plea to report it

We could add a pure source code-only comment to keep a reference to
pci=assign-busses the in case when this is triggered by someone who
is debugging the cause of this message and looking the way to solve it.

From: Bernhard Kaindl <bk@suse.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agopci/hotplug/cpqphp_ctrl.c: remove stale BKL use
Ingo Molnar [Tue, 24 Jul 2007 09:16:37 +0000 (11:16 +0200)]
pci/hotplug/cpqphp_ctrl.c: remove stale BKL use

remove stale BKL use from drivers/pci/hotplug/cpqphp_ctrl.c.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoPCI: Document pci_iomap()
Rolf Eike Beer [Fri, 20 Jul 2007 00:48:44 +0000 (17:48 -0700)]
PCI: Document pci_iomap()

This useful interface is hardly mentioned anywhere in the in-tree
documentation.

Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
Cc: Tejun Heo <htejun@gmail.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoPCI: quirk_e100_interrupt() called too early
Marian Balakowicz [Tue, 3 Jul 2007 09:03:18 +0000 (11:03 +0200)]
PCI: quirk_e100_interrupt() called too early

quirk_e100_interrupts() is called after PCI controller is initialized
and before PCI bus enumeration is performed. On some powerpc platforms
which modify PCI controller configuration and set different MEM and IO
windows than those set by firmware quirk_e100_interrupt() is causing
kernel panic as it tries to read from device BAR0 offets which at this
time points to a invalid PCI window (set by firmware).

This patch delays the quirk_100_interrupt() to pci_fixup_final phase,
which happens after bus enumeration and before PCI enable and
device driver initialization.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoPCI: Move prototypes for pci_bus_find_capability to include/linux/pci.h
Kumar Gala [Tue, 17 Jul 2007 04:27:10 +0000 (23:27 -0500)]
PCI: Move prototypes for pci_bus_find_capability to include/linux/pci.h

We need pci_bus_find_capability() in some arch/powerpc code so move
the prototype into a header accessible to it.

Also kill the duplicate prototype for pci_bus_alloc_resource().

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agosysfs: don't warn on removal of a nonexistent binary file
Alan Stern [Thu, 16 Aug 2007 20:13:06 +0000 (16:13 -0400)]
sysfs: don't warn on removal of a nonexistent binary file

This patch (as960) removes the error message and stack dump logged by
sysfs_remove_bin_file() when someone tries to remove a nonexistent
file.  The warning doesn't seem to be needed, since none of the other
file-, symlink-, or directory-removal routines in sysfs complain in a
comparable way.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Tejun Heo <htejun@gmail.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoHOWTO: latest lxr url address changed
Qi Yong [Tue, 12 Jun 2007 05:06:49 +0000 (13:06 +0800)]
HOWTO: latest lxr url address changed

Hello,

I've noticed that in Document/HOWTO the url address:
http://sosdg.org/~coywolf/lxr/
has changed to
http://users.sosdg.org/~qiyong/lxr/
from the website.

-- qiyong

Signed-off-by: Qi Yong <qiyong@fc-cn.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoHOWTO: korean translation of Documentation/HOWTO
Minchan Kim [Thu, 2 Aug 2007 01:05:12 +0000 (10:05 +0900)]
HOWTO: korean translation of Documentation/HOWTO

This is a Documentation/HOWTO korean version of  2.6.23-rc1
The header is refered to a japanese's one.

From: Minchan Kim <minchan.kim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoFix Off-by-one in /sys/module/*/refcnt
Alexey Dobriyan [Mon, 6 Aug 2007 19:47:45 +0000 (23:47 +0400)]
Fix Off-by-one in /sys/module/*/refcnt

sysfs internals were changed to not pin module in question.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Kay Sievers <kay.sievers@vrfy.org>
Acked-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agosysfs: fix locking in sysfs_lookup() and sysfs_rename_dir()
Tejun Heo [Tue, 31 Jul 2007 10:15:08 +0000 (19:15 +0900)]
sysfs: fix locking in sysfs_lookup() and sysfs_rename_dir()

sd children list walking in sysfs_lookup() and sd renaming in
sysfs_rename_dir() were left out during i_mutex -> sysfs_mutex
conversion.  Fix them.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousb: add PRODUCT, TYPE to usb-interface events
Kay Sievers [Tue, 21 Aug 2007 11:41:08 +0000 (13:41 +0200)]
usb: add PRODUCT, TYPE to usb-interface events

This fixes a regression for userspace programs that were relying on these events.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Cc: Andreas Jellinghaus <aj@ciphirelabs.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: resubmission unusual_devs modification for Nikon D80
Mike Pagano [Wed, 15 Aug 2007 14:13:28 +0000 (10:13 -0400)]
USB: resubmission unusual_devs modification for Nikon D80

Upgrade the unusual_devs.h file to support the new 1.01 firmware for the Nikon D80.

Signed-off-by: Mike Pagano <mpagano-kernel@mpagano.com>
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousb quirks: Add Canon EOS 5D (PC Connection mode) to the autosuspend blacklist
Paul Walmsley [Thu, 16 Aug 2007 23:21:35 +0000 (16:21 -0700)]
usb quirks: Add Canon EOS 5D (PC Connection mode) to the autosuspend blacklist

Recent versions of the Linux kernel auto-suspend attached USB devices.
After this happens to the Canon EOS 5D camera, the camera's interrupt endpoints
don't seem to wake back up correctly, causing further use with libgphoto2
to fail with a -114 "OS error in camera communication" error.

A similar fix is probably necessary for this camera in PTP mode, which
identifies as USB product id 0x3102, but we haven't tested this.

As part of our testing process, we tried the USB_QUIRK_RESET_RESUME
quirk also, it's not helpful in this case.

Signed-off-by: Raj Kumar <rkumar@archive.org>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: make EHCI initialize properly on PPC SOCs
Mike Nuss [Tue, 21 Aug 2007 01:21:15 +0000 (18:21 -0700)]
USB: make EHCI initialize properly on PPC SOCs

Correctly initialize the on-chip EHCI controller on the AMCC PPC440EPx.
Fix "USB 0.0" initialization message, and properly put the controller
into a known state before starting it.

Add "FIXME" comment to the au1xxx bus glue which is doing the same wrong
thing here.  (Who maintains that, now that AMD sold off Alchemy?)  Remove
some false copyright attributions which were somehow placed in the au1xxx
bus glue then copied into ppc-soc.

Signed-off-by: Mike Nuss <mike@terascala.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: K.Boge <karsten.boge@amd.com>
Cc: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUEAGLE: Remove sysfs files on error case
Stanislaw Gruszka [Mon, 20 Aug 2007 21:20:49 +0000 (23:20 +0200)]
UEAGLE: Remove sysfs files on error case

Bugfix, remove sysfs files when modem fails to boot.

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: fsl_usb2_udc: fix bug in processing setup requests
Li Yang [Fri, 17 Aug 2007 15:36:44 +0000 (08:36 -0700)]
USB: fsl_usb2_udc: fix bug in processing setup requests

Kim Liu found that in the original code certain class setup requests
are wrongly recognized and processed as standard setup requests.
For that reason gadget ether can't work in RNDIS mode with Windows host.

The patch fixes the setup request processing code, and makes class
requests correctly passed to gadget layer.

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Kim Liu <KLiu@vixs.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: g_file_storage: fix bug in DMA buffer handling
Alan Stern [Fri, 17 Aug 2007 14:58:16 +0000 (10:58 -0400)]
USB: g_file_storage: fix bug in DMA buffer handling

This patch (as963) fixes a recently-introduced bug.  The gadget
conversion removing DMA-mapped buffer allocation did not remove quite
enough code from the g_file_storage driver; DMA pointers were being
set to 0.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: update last_busy field correctly
Alan Stern [Mon, 20 Aug 2007 16:18:39 +0000 (12:18 -0400)]
USB: update last_busy field correctly

This patch (as966) fixes a bug in the autosuspend code.  The last_busy
field should be updated whenever any event occurs, not just events
that cause an autosuspend or an autoresume.

This partially fixes Bugzilla #8892.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: fix DoS in pwc USB video driver
Oliver Neukum [Tue, 21 Aug 2007 05:10:42 +0000 (07:10 +0200)]
USB: fix DoS in pwc USB video driver

the pwc driver has a disconnect method that waits for user space to
close the device. This opens up an opportunity for a DoS attack,
blocking the USB subsystem and making khubd's task busy wait in
kernel space. This patch shifts freeing resources to close if an opened
device is disconnected.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
CC: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: allow retry on descriptor fetch errors
Alan Stern [Mon, 20 Aug 2007 14:45:28 +0000 (10:45 -0400)]
USB: allow retry on descriptor fetch errors

This patch (as964) was suggested by Steffen Koepf.  It makes
usb_get_descriptor() retry on all errors other than ETIMEDOUT, instead
of only on EPIPE.  This helps with some devices.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>