kernel/kernel-generic.git
16 years agoMake constants in kernel/timeconst.h fixed 64 bits
H. Peter Anvin [Fri, 2 May 2008 23:18:42 +0000 (16:18 -0700)]
Make constants in kernel/timeconst.h fixed 64 bits

Force constants in kernel/timeconst.h (except shift counts) to be 64 bits,
using U64_C() constructor macros, and eliminate constants that cannot
be represented at all in 64 bits.  This avoids warnings with some gcc
versions.

Drop generating 64-bit constants, since we have no real hope of
getting a full set (operation on 64-bit values requires a 128-bit
intermediate result, which gcc only supports on 64-bit platforms, and
only with libgcc support on some.)  Note that the use of these
constants does not depend on if we are on a 32- or 64-bit architecture.

This resolves Bugzilla 10153.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
16 years agotypes: add C99-style constructors to <asm-generic/int-*.h>
H. Peter Anvin [Thu, 24 Apr 2008 20:37:33 +0000 (13:37 -0700)]
types: add C99-style constructors to <asm-generic/int-*.h>

Add C99-style constructor macros for fixed types to
<asm-generic/int-*.h>.  Since Linux uses names like "u64" instead of
"uint64_t", the constructor macros are called U64_C() instead of
UINT64_C() and so forth.

These macros allow specific sizes to be specified as
U64_C(0x123456789abcdef), without gcc issuing warnings as it will if
one writes (u64)0x123456789abcdef.

When used from assembly, these macros pass their argument unchanged.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
16 years agoxtensa: types: use <asm-generic/int-*.h> for the xtensa architecture
H. Peter Anvin [Sun, 6 Apr 2008 17:35:15 +0000 (10:35 -0700)]
xtensa: types: use <asm-generic/int-*.h> for the xtensa architecture

This modifies <asm-xtensa/types.h> to use the <asm-generic/int-*.h>
generic include files.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Chris Zankel <chris@zankel.net>
16 years agox86: types: use <asm-generic/int-*.h> for the x86 architecture
H. Peter Anvin [Sun, 6 Apr 2008 17:35:14 +0000 (10:35 -0700)]
x86: types: use <asm-generic/int-*.h> for the x86 architecture

This modifies <asm-x86/types.h> to use the <asm-generic/int-*.h>
generic include files.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
16 years agov850: types: use <asm-generic/int-*.h> for the v850 architecture
H. Peter Anvin [Sun, 6 Apr 2008 17:35:13 +0000 (10:35 -0700)]
v850: types: use <asm-generic/int-*.h> for the v850 architecture

This modifies <asm-v850/types.h> to use the <asm-generic/int-*.h>
generic include files.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
16 years agosparc64: types: use <asm-generic/int-*.h> for the sparc64 architecture
H. Peter Anvin [Sun, 6 Apr 2008 17:35:13 +0000 (10:35 -0700)]
sparc64: types: use <asm-generic/int-*.h> for the sparc64 architecture

This modifies <asm-sparc64/types.h> to use the <asm-generic/int-*.h>
generic include files.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Acked-by: David S. Miller <davem@davemloft.net>
16 years agosparc: types: use <asm-generic/int-*.h> for the sparc architecture
H. Peter Anvin [Sun, 6 Apr 2008 17:35:12 +0000 (10:35 -0700)]
sparc: types: use <asm-generic/int-*.h> for the sparc architecture

This modifies <asm-sparc/types.h> to use the <asm-generic/int-*.h>
generic include files.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: William L. Irwin <wli@holomorphy.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosh: types: use <asm-generic/int-*.h> for the sh architecture
H. Peter Anvin [Sun, 6 Apr 2008 17:35:11 +0000 (10:35 -0700)]
sh: types: use <asm-generic/int-*.h> for the sh architecture

This modifies <asm-sh/types.h> to use the <asm-generic/int-*.h>
generic include files.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Paul Mundt <lethal@linux-sh.org>
16 years agos390: types: use <asm-generic/int-*.h> for the s390 architecture
H. Peter Anvin [Sun, 6 Apr 2008 17:35:10 +0000 (10:35 -0700)]
s390: types: use <asm-generic/int-*.h> for the s390 architecture

This modifies <asm-s390/types.h> to use the <asm-generic/int-*.h>
generic include files.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
16 years agopowerpc: types: use <asm-generic/int-*.h> for the powerpc architecture
H. Peter Anvin [Sun, 6 Apr 2008 17:35:09 +0000 (10:35 -0700)]
powerpc: types: use <asm-generic/int-*.h> for the powerpc architecture

This modifies <asm-powerpc/types.h> to use the <asm-generic/int-*.h>
generic include files.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Anton Blanchard <anton@samba.org>
16 years agoparisc: types: use <asm-generic/int-*.h> for the parisc architecture
H. Peter Anvin [Sun, 6 Apr 2008 17:35:09 +0000 (10:35 -0700)]
parisc: types: use <asm-generic/int-*.h> for the parisc architecture

This modifies <asm-parisc/types.h> to use the <asm-generic/int-*.h>
generic include files.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Kyle McMartin <kyle@parisc-linux.org>
Cc: Matthew Wilcox <matthew@wil.cx>
Cc: Grant Grundler <grundler@parisc-linux.org>
16 years agomn10300: types: use <asm-generic/int-*.h> for the mn10300 architecture
H. Peter Anvin [Sun, 6 Apr 2008 17:35:07 +0000 (10:35 -0700)]
mn10300: types: use <asm-generic/int-*.h> for the mn10300 architecture

This modifies <asm-mn10300/types.h> to use the <asm-generic/int-*.h>
generic include files.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
16 years agomips: types: use <asm-generic/int-*.h> for the mips architecture
H. Peter Anvin [Sun, 6 Apr 2008 17:35:06 +0000 (10:35 -0700)]
mips: types: use <asm-generic/int-*.h> for the mips architecture

This modifies <asm-mips/types.h> to use the <asm-generic/int-*.h>
generic include files.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
16 years agom68k: types: use <asm-generic/int-*.h> for the m68k architecture
H. Peter Anvin [Sun, 6 Apr 2008 17:35:06 +0000 (10:35 -0700)]
m68k: types: use <asm-generic/int-*.h> for the m68k architecture

This modifies <asm-m68k/types.h> to use the <asm-generic/int-*.h>
generic include files.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
16 years agom32r: types: use <asm-generic/int-*.h> for the m32r architecture
H. Peter Anvin [Sun, 6 Apr 2008 17:35:05 +0000 (10:35 -0700)]
m32r: types: use <asm-generic/int-*.h> for the m32r architecture

This modifies <asm-m32r/types.h> to use the <asm-generic/int-*.h>
generic include files.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
16 years agoia64: types: use <asm-generic/int-*.h> for the ia64 architecture
H. Peter Anvin [Sun, 6 Apr 2008 17:35:04 +0000 (10:35 -0700)]
ia64: types: use <asm-generic/int-*.h> for the ia64 architecture

This modifies <asm-ia64/types.h> to use the <asm-generic/int-*.h>
generic include files.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Acked-by: Tony Luck <tony.luck@intel.com>
16 years agoh8300: types: use <asm-generic/int-*.h> for the h8300 architecture
H. Peter Anvin [Sun, 6 Apr 2008 17:35:04 +0000 (10:35 -0700)]
h8300: types: use <asm-generic/int-*.h> for the h8300 architecture

This modifies <asm-h8300/types.h> to use the <asm-generic/int-*.h>
generic include files.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
16 years agofrv: types: use <asm-generic/int-*.h> for the frv architecture
H. Peter Anvin [Sun, 6 Apr 2008 17:35:03 +0000 (10:35 -0700)]
frv: types: use <asm-generic/int-*.h> for the frv architecture

This modifies <asm-frv/types.h> to use the <asm-generic/int-*.h>
generic include files.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: David Howells <dhowells@redhat.com>
16 years agocris: types: use <asm-generic/int-*.h> for the cris architecture
H. Peter Anvin [Sun, 6 Apr 2008 17:35:02 +0000 (10:35 -0700)]
cris: types: use <asm-generic/int-*.h> for the cris architecture

This modifies <asm-cris/types.h> to use the <asm-generic/int-*.h>
generic include files.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
16 years agoblackfin: types: use <asm-generic/int-*.h> for the blackfin architecture
H. Peter Anvin [Sun, 6 Apr 2008 17:35:02 +0000 (10:35 -0700)]
blackfin: types: use <asm-generic/int-*.h> for the blackfin architecture

This modifies <asm-blackfin/types.h> to use the <asm-generic/int-*.h>
generic include files.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Bryan Wu <cooloney@kernel.org>
16 years agoavr32: types: use <asm-generic/int-*.h> for the avr32 architecture
H. Peter Anvin [Sun, 6 Apr 2008 17:35:01 +0000 (10:35 -0700)]
avr32: types: use <asm-generic/int-*.h> for the avr32 architecture

This modifies <asm-avr32/types.h> to use the <asm-generic/int-*.h>
generic include files.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
16 years agoarm: types: use <asm-generic/int-*.h> for the arm architecture
H. Peter Anvin [Sun, 6 Apr 2008 17:35:00 +0000 (10:35 -0700)]
arm: types: use <asm-generic/int-*.h> for the arm architecture

This modifies <asm-arm/types.h> to use the <asm-generic/int-*.h>
generic include files.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Ben Dooks <ben-linux@fluff.org>
16 years agoalpha: types: use <asm-generic/int-*.h> for the alpha architecture
H. Peter Anvin [Sun, 6 Apr 2008 17:35:00 +0000 (10:35 -0700)]
alpha: types: use <asm-generic/int-*.h> for the alpha architecture

This modifies <asm-alpha/types.h> to use the <asm-generic/int-*.h>
generic include files.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
16 years agotypes: create <asm-generic/int-*.h>
H. Peter Anvin [Thu, 24 Apr 2008 19:56:52 +0000 (12:56 -0700)]
types: create <asm-generic/int-*.h>

This creates two generic files with common integer definitions; one
where 64 bits is "long" (most 64-bit architectures) and one where 64
bits is "long long" (all 32-bit architectures and x86-64.)

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Anton Blanchard <anton@samba.org>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Bryan Wu <cooloney@kernel.org>
Cc: Chris Zankel <chris@zankel.net>
Cc: David Howells <dhowells@redhat.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Grant Grundler <grundler@parisc-linux.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
Cc: Kyle McMartin <kyle@parisc-linux.org>
Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Matthew Wilcox <matthew@wil.cx>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: William L. Irwin <wli@holomorphy.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
Linus Torvalds [Fri, 2 May 2008 18:23:14 +0000 (11:23 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
  [PATCH] fix sysctl_nr_open bugs
  [PATCH] sanitize anon_inode_getfd()
  [PATCH] split linux/file.h
  [PATCH] make osf_select() use core_sys_select()
  [PATCH] remove horrors with irix tty ioctls handling
  [PATCH] fix file and descriptor handling in perfmon

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Fri, 2 May 2008 18:03:08 +0000 (11:03 -0700)]
Merge git://git./linux/kernel/git/gregkh/usb-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (32 commits)
  USB GADGET/PERIPHERAL: g_file_storage Bulk-Only Transport compliance, clear-feature ignore
  USB GADGET/PERIPHERAL: g_file_storage Bulk-Only Transport compliance
  usb_serial: some coding style fixes
  USB: Remove redundant dependencies on USB_ATM.
  USB: UHCI: disable remote wakeup when it's not needed
  USB: OHCI: work around bogus compiler warning
  USB: add Cypress c67x00 OTG controller HCD driver
  USB: add Cypress c67x00 OTG controller core driver
  USB: add Cypress c67x00 low level interface code
  USB: airprime: unlock mutex instead of trying to lock it again
  USB: storage: Update mailling list address
  USB: storage: UNUSUAL_DEVS() for PanDigital Picture frame.
  USB: Add the USB 2.0 extension descriptor.
  USB: add more FTDI device ids
  USB: fix cannot work usb storage when using ohci-sm501
  usb: gadget zero timer init fix
  usb: gadget zero style fixups (mostly whitespace)
  usb serial gadget: CDC ACM fixes
  usb: pxa27x_udc driver
  USB: INTOVA Pixtreme camera mass storage device
  ...

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
Linus Torvalds [Fri, 2 May 2008 18:02:53 +0000 (11:02 -0700)]
Merge git://git./linux/kernel/git/gregkh/driver-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6:
  driver-core: add dev_name() to help transition away from using bus_id

16 years agoUSB GADGET/PERIPHERAL: g_file_storage Bulk-Only Transport compliance, clear-feature...
David Lopo [Tue, 29 Apr 2008 09:14:38 +0000 (10:14 +0100)]
USB GADGET/PERIPHERAL: g_file_storage Bulk-Only Transport compliance, clear-feature ignore

Gadget tells controller driver to ignore Clear-Feature(HALT_ENDPOINT)

Signed-off-by: David Lopo <lopo.david@gmail.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
16 years agoUSB GADGET/PERIPHERAL: g_file_storage Bulk-Only Transport compliance
David Lopo [Tue, 29 Apr 2008 09:12:37 +0000 (10:12 +0100)]
USB GADGET/PERIPHERAL: g_file_storage Bulk-Only Transport compliance

Gadget can tell controller driver to ignore Clear-Feature(HALT_ENDPOINT)
This API change enables future support for Bulk-Only Transport compliance

Signed-off-by: David Lopo <lopo.david@gmail.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousb_serial: some coding style fixes
Alan Cox [Tue, 29 Apr 2008 13:35:39 +0000 (14:35 +0100)]
usb_serial: some coding style fixes

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: Remove redundant dependencies on USB_ATM.
Robert P. J. Day [Fri, 25 Apr 2008 21:06:35 +0000 (17:06 -0400)]
USB: Remove redundant dependencies on USB_ATM.

Given that the bulk of the Kconfig file is enclosed in "if USB_ATM",
remove the unnecessary dependencies.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: UHCI: disable remote wakeup when it's not needed
Alan Stern [Tue, 22 Apr 2008 14:49:15 +0000 (10:49 -0400)]
USB: UHCI: disable remote wakeup when it's not needed

This patch (as1084b) fixes the way uhci-hcd handles polling and
remote wakeups for its root hubs.  When remote wakeup is disabled,
neither interrupts nor polling should be enabled during a root-hub
suspend.  Likewise, if interrupts are enabled during suspend then
polling isn't needed.

Furthermore the EGSM (Enter Global Suspend Mode) bit shouldn't be set
in the Command register unless remote wakeup is enabled.  Apparently
some controllers will issue a remote-wakeup interrupt whenever EGSM
is on, even if Resume-Detect interrupts are supposedly disabled.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: OHCI: work around bogus compiler warning
Alan Stern [Tue, 22 Apr 2008 14:50:18 +0000 (10:50 -0400)]
USB: OHCI: work around bogus compiler warning

The patch (as1086) works around a bogus "uninitialized variable"
warning generated by some versions of GCC.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: add Cypress c67x00 OTG controller HCD driver
Peter Korsgaard [Sun, 27 Apr 2008 06:59:45 +0000 (08:59 +0200)]
USB: add Cypress c67x00 OTG controller HCD driver

This patch adds HCD support for the Cypress c67x00 family of devices.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: add Cypress c67x00 OTG controller core driver
Peter Korsgaard [Sun, 27 Apr 2008 06:59:44 +0000 (08:59 +0200)]
USB: add Cypress c67x00 OTG controller core driver

This patch add the core driver for the c67x00 USB OTG controller.  The core
driver is responsible for the platform bus binding and creating either
USB HCD or USB Gadget instances for each of the serial interface engines
on the chip.

This driver does not directly implement the HCD or gadget behaviours; it
just controls access to the chip.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: add Cypress c67x00 low level interface code
Peter Korsgaard [Sun, 27 Apr 2008 06:59:43 +0000 (08:59 +0200)]
USB: add Cypress c67x00 low level interface code

This patch adds the low level support code for the Cypress c67x00 family of
OTG controllers.  The low level code is responsible for register access and
implements the software protocol for communicating with the 16bit
microcontroller inside the c67x00 device.

Communication is done over the HPI interface (16bit SRAM-like parallel bus).

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: airprime: unlock mutex instead of trying to lock it again
Leonardo Chiquitto [Tue, 22 Apr 2008 19:02:03 +0000 (16:02 -0300)]
USB: airprime: unlock mutex instead of trying to lock it again

The following patch fixes a [probable] copy & paste mistake in
airprime.c. Instead of unlocking an acquired mutex, the actual
code tries to lock it again.

Signed-off-by: Leonardo Chiquitto <lchiquitto@novell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: storage: Update mailling list address
Andrew Lunn [Wed, 23 Apr 2008 20:04:30 +0000 (22:04 +0200)]
USB: storage: Update mailling list address

drivers/usb/storage/unusual_devs.h lists the address
linux-usb-devel@lists.sourceforge.net for patches to that file. This
address results in a bounce and a pointer to vger. This patch updates
the address in the header file.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: storage: UNUSUAL_DEVS() for PanDigital Picture frame.
Andrew Lunn [Thu, 24 Apr 2008 17:36:39 +0000 (19:36 +0200)]
USB: storage: UNUSUAL_DEVS() for PanDigital Picture frame.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: Add the USB 2.0 extension descriptor.
Sarah Sharp [Fri, 25 Apr 2008 23:46:45 +0000 (16:46 -0700)]
USB: Add the USB 2.0 extension descriptor.

This device descriptor was added by the recent USB Link Power Management (LPM)
ECN.  It indicates whether the USB device supports LPM.

This descriptor is grouped under a Binary Device Object Store (BOS) descriptor.
Update the BOS comments to indicate any USB device (not just wireless USB
devices) can implement BOS descriptors.

Signed-off-by: Sarah Sharp <sarah.a.sharp@intel.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: add more FTDI device ids
Peter Mack [Tue, 22 Apr 2008 11:25:11 +0000 (13:25 +0200)]
USB: add more FTDI device ids

Add more usb device ids to the ftdi driver.

From: Peter Mack <Peter.Mack@scs-ptc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: fix cannot work usb storage when using ohci-sm501
Yoshihiro Shimoda [Mon, 21 Apr 2008 04:48:22 +0000 (13:48 +0900)]
USB: fix cannot work usb storage when using ohci-sm501

When I used ohci-sm501, hcd_alloc_coherent() in map_urb_for_dma() is not
called, because usb_sg_init() always sets URB_NO_TRANSFER_DMA_MAP.

dmesg (CONFIG_USB_STORAGE_DEBUG enabled):

usb-storage: Bulk Command S 0x43425355 T 0x1 L 36 F 128 Trg 0 LUN 0 CL 6
usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
usb-storage: Status code 0; transferred 31/31
usb-storage: -- transfer complete
usb-storage: Bulk command transfer result=0
usb-storage: usb_stor_bulk_transfer_sglist: xfer 36 bytes, 1 entries
usb-storage: Status code -75; transferred 0/36
usb-storage: -- babble
usb-storage: Bulk data transfer result 0x3
usb-storage: Attempting to get CSW...
usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
usb-storage: Status code 0; transferred 13/13
usb-storage: -- transfer complete
usb-storage: Bulk status result = 0
usb-storage: Bulk Status S 0x53425355 T 0x1 R 0 Stat 0x0
usb-storage: scsi cmd done, result=0x2

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousb: gadget zero timer init fix
David Lopo [Sat, 19 Apr 2008 01:49:01 +0000 (18:49 -0700)]
usb: gadget zero timer init fix

Initialize timer earlier so if an error occurs allocating USB request
or buffer request (zero_bind) Gadget Zero will not hang trying to
delete an uninitialized timer (zero_unbind).

Signed-off-by: David Lopo <lopo.david@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousb: gadget zero style fixups (mostly whitespace)
David Brownell [Sat, 19 Apr 2008 01:47:54 +0000 (18:47 -0700)]
usb: gadget zero style fixups (mostly whitespace)

Minor updates to "Gadget Zero".

 - Primarily these are whitespace updates to address the fact that since
   this was written, Documentation/CodingStyle was changed to disapprove
   of parts of the original coding style.

 - Update a few comments that weren't quite correct, notably mentioning
   the "autoresume" module parameter.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousb serial gadget: CDC ACM fixes
David Brownell [Sat, 19 Apr 2008 00:37:49 +0000 (17:37 -0700)]
usb serial gadget: CDC ACM fixes

Based on a patch from <Aurel.Thomi@ruag.com>, this makes the
CDC-ACM support in the serial gadget handle the SET_LINE_CODING
and SET_CONTROL_LINE_STATE requests ... which should improve
interop with at least MS-Windows "usbser.sys" if not some other
ACM host drivers.

It also adds a few REVISIT comments where this code plays a bit
loose with the CDC ACM spec.  If this were used to hook up to a
real RS232 or modem link, those places would need a bit of work.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousb: pxa27x_udc driver
Robert Jarzmik [Fri, 18 Apr 2008 22:56:49 +0000 (15:56 -0700)]
usb: pxa27x_udc driver

Adds pxa27x udc driver to support USB peripherals on pxa27x chips.

The driver is compatible with: Gadget Zero, the File Storage
gadget, and the Ethernet gadget (only in CDC subset mode).

The driver can't properly support multiple interfaces, because
of hardware bugs without possible workaround.  That means no
RNDIS support from g_ether, and no CDC ACM support in g_serial.

Signed-off-by: Robert Jarzmik <rjarzmik@free.fr>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: INTOVA Pixtreme camera mass storage device
Rohan Hart [Fri, 18 Apr 2008 09:19:33 +0000 (21:19 +1200)]
USB: INTOVA Pixtreme camera mass storage device

FIX_CAPACITY is all that's needed.

Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: mos7840: test and propagate set_uart_reg return value
Roel Kluin [Thu, 17 Apr 2008 04:16:24 +0000 (06:16 +0200)]
USB: mos7840: test and propagate set_uart_reg return value

The test for an mos7840_set_uart_reg() error return value only works when
status is signed. propagate its error value.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Cc: SL Baur <steve@xemacs.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: usbtest displays diagnostics again
David Brownell [Sat, 26 Apr 2008 01:51:10 +0000 (18:51 -0700)]
USB: usbtest displays diagnostics again

Minor cleanup to the "usbtest" driver, mostly to resolve a regression:
all the important diagnostics were at KERN_DEBUG, so that when the
"#define DEBUG" was removed from the top of that file it stopped
providing diagnostics.  Fix by using KERN_ERROR.  Also:

 - Stop using the legacy dbg() calls
 - Simplify the internal debug macros
 - Correct some test descriptions:
* Test #10 subcase 7 should *always* stall
* Test #10 subcase 8 *may* stall
 - Diagnostic about control queue test failures is more informative
 - Fix some whitespace "bugs"

And add a warning about the rude interaction between usbfs ioctl()
and khubd during device disconnect ... don't unplug a device under
test, that will wedge.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoub: Cosmetics
Pete Zaitcev [Sat, 19 Apr 2008 21:45:24 +0000 (14:45 -0700)]
ub: Cosmetics

Fix a few comments and printk statements.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoub: Ignore bad residue
Pete Zaitcev [Sat, 19 Apr 2008 21:42:49 +0000 (14:42 -0700)]
ub: Ignore bad residue

I hoped to continue to ignore this problem or use libusual, but these
days it's simpler to work around than to deal with it. Let's attempt to
use bad residue devices and hope that upper level integrity checks catch
any problems (e.g. please use sha1sum on your backups).

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoub: Tune retries
Pete Zaitcev [Sat, 19 Apr 2008 21:35:30 +0000 (14:35 -0700)]
ub: Tune retries

Make ub to fail faster in hopeless cases.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoub: Fix timeouts
Pete Zaitcev [Sat, 19 Apr 2008 21:32:18 +0000 (14:32 -0700)]
ub: Fix timeouts

The wodim says:
"close track/session scsi sendcmd: cmd timeout after 5.000 (480) s"
This happened because we ignored the supplied timeout and used 5s.

It's not completely correct to apply a timeout meant for the complete
command to any single URB, but we don't have many URBs per command, so
this is simple and works.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousb: libusual kthread_run() called with wrong format.
Rusty Russell [Sun, 20 Apr 2008 20:38:34 +0000 (06:38 +1000)]
usb: libusual kthread_run() called with wrong format.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousb-storage: add unusual_devs entry for Samsung YP-U3
Alan Stern [Mon, 28 Apr 2008 14:26:13 +0000 (10:26 -0400)]
usb-storage: add unusual_devs entry for Samsung YP-U3

This patch (as1088) adds an unusual_devs entry for Samsung's YP-U3.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: storage/onetouch.c: make a function static
Adrian Bunk [Mon, 28 Apr 2008 15:39:37 +0000 (18:39 +0300)]
USB: storage/onetouch.c: make a function static

This patch makes the needlessly global onetouch_release_input() static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousb-storage: fix build failure in OneTouch driver
Dmitry Torokhov [Mon, 28 Apr 2008 20:57:14 +0000 (16:57 -0400)]
usb-storage: fix build failure in OneTouch driver

If USB storage is built-in but input subsystem is made modular then
OneTouch button functionality can not be selected.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousb: ldusb: ld_usb semaphore to mutex
Daniel Walker [Mon, 28 Apr 2008 17:34:56 +0000 (10:34 -0700)]
usb: ldusb: ld_usb semaphore to mutex

Signed-off-by: Daniel Walker <dwalker@mvista.com>
Acked-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: ISP1760 HCD driver
Sebastian Siewior [Wed, 23 Apr 2008 22:37:04 +0000 (00:37 +0200)]
USB: ISP1760 HCD driver

This driver has been written from scratch and supports the ISP1760. ISP1761
might (should) work as well but the OTG isn't supported. Also ISO packets are
not. However, it works on my little PowerPC board.

Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodriver-core: add dev_name() to help transition away from using bus_id
Kay Sievers [Fri, 2 May 2008 04:02:41 +0000 (06:02 +0200)]
driver-core: add dev_name() to help transition away from using bus_id

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-genirq
Linus Torvalds [Fri, 2 May 2008 15:22:36 +0000 (08:22 -0700)]
Merge git://git./linux/kernel/git/tglx/linux-2.6-genirq

* git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-genirq:
  genirq: reenable a nobody cared disabled irq when a new driver arrives

16 years agoMerge branch 'for-linus' of git://www.linux-m32r.org/git/takata/linux-2.6_dev
Linus Torvalds [Fri, 2 May 2008 15:20:43 +0000 (08:20 -0700)]
Merge branch 'for-linus' of git://linux-m32r.org/git/takata/linux-2.6_dev

* 'for-linus' of git://www.linux-m32r.org/git/takata/linux-2.6_dev:
  m32r: cleanup: drop .data.idt section in vmlinux.lds script
  m32r: use KBUILD_DEFCONFIG

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
Linus Torvalds [Fri, 2 May 2008 15:20:04 +0000 (08:20 -0700)]
Merge git://git./linux/kernel/git/rusty/linux-2.6-for-linus

* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
  lguest: make Launcher see device status updates
  lguest: remove bogus NULL cpu check
  lguest: avoid using NR_CPUS as a bounds check.
  virtio: add virtio disk geometry feature
  virtio: explicit advertisement of driver features
  virtio: change config to guest endian.
  virtio: finer-grained features for virtio_net
  virtio: wean net driver off NETDEV_TX_BUSY
  virtio-blk: fix remove oops
  virtio: fix scatterlist sizing in net driver.
  virtio: de-structify virtio_block status byte
  virtio: export more headers to userspace
  virtio: fix sparse return void-valued expression warnings
  virtio: fix tx_ stats in virtio_net
  virtio: ignore corrupted virtqueues rather than spinning.

16 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Fri, 2 May 2008 15:17:58 +0000 (08:17 -0700)]
Merge branch 'release' of git://git./linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] fix file and descriptor handling in perfmon
  [IA64] TS_RESTORE_SIGMASK
  [IA64] smp.c coding style fix
  [IA64] fix section mismatch in arch/ia64/kernel/topology.c
  [IA64] fix section mismatch in arch/ia64/kernel/palinfo.c
  [IA64] fix section mismatch in arch/ia64/kernel/irq.c
  [IA64] fix section mismatch in arch/ia64/kernel/acpi.c

16 years agolguest: make Launcher see device status updates
Rusty Russell [Sat, 3 May 2008 02:50:53 +0000 (21:50 -0500)]
lguest: make Launcher see device status updates

This brings us closer to Real Life, where we'd examine the device
features once it's set the DRIVER_OK status bit.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agolguest: remove bogus NULL cpu check
Rusty Russell [Sat, 3 May 2008 02:50:51 +0000 (21:50 -0500)]
lguest: remove bogus NULL cpu check

If lg isn't NULL, and cpu_id is sane, &lg->cpus[cpu_id] can't be NULL.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agolguest: avoid using NR_CPUS as a bounds check.
Rusty Russell [Sat, 3 May 2008 02:50:51 +0000 (21:50 -0500)]
lguest: avoid using NR_CPUS as a bounds check.

NR_CPUS (being a host number) is an arbitrary limit for the Guest.
Using the array size directly (which currently happes to be NR_CPUS)
is more futureproof.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agovirtio: add virtio disk geometry feature
Ryan Harper [Wed, 16 Apr 2008 18:56:37 +0000 (13:56 -0500)]
virtio: add virtio disk geometry feature

Rather than faking up some geometry, allow the backend to push the disk
geometry via virtio pci config option.  Keep the old geo code around for
compatibility.

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (modified to single struct)
16 years agovirtio: explicit advertisement of driver features
Rusty Russell [Sat, 3 May 2008 02:50:50 +0000 (21:50 -0500)]
virtio: explicit advertisement of driver features

A recent proposed feature addition to the virtio block driver revealed
some flaws in the API: in particular, we assume that feature
negotiation is complete once a driver's probe function returns.

There is nothing in the API to require this, however, and even I
didn't notice when it was violated.

So instead, we require the driver to specify what features it supports
in a table, we can then move the feature negotiation into the virtio
core.  The intersection of device and driver features are presented in
a new 'features' bitmap in the struct virtio_device.

Note that this highlights the difference between Linux unsigned-long
bitmaps where each unsigned long is in native endian, and a
straight-forward little-endian array of bytes.

Drivers can still remove feature bits in their probe routine if they
really have to.

API changes:
- dev->config->feature() no longer gets and acks a feature.
- drivers should advertise their features in the 'feature_table' field
- use virtio_has_feature() for extra sanity when checking feature bits

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agovirtio: change config to guest endian.
Rusty Russell [Sat, 3 May 2008 02:50:49 +0000 (21:50 -0500)]
virtio: change config to guest endian.

A recent proposed feature addition to the virtio block driver revealed
some flaws in the API, in particular how easy it is to break big
endian machines.

The virtio config space was originally chosen to be little-endian,
because we thought the config might be part of the PCI config space
for virtio_pci.  It's actually a separate mmio region, so that
argument holds little water; as only x86 is currently using the virtio
mechanism, we can change this (but must do so now, before the
impending s390 merge).

API changes:
- __virtio_config_val() just becomes a striaght vdev->config_get() call.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agovirtio: finer-grained features for virtio_net
Rusty Russell [Sat, 3 May 2008 02:50:46 +0000 (21:50 -0500)]
virtio: finer-grained features for virtio_net

So, we previously had a 'VIRTIO_NET_F_GSO' bit which meant that 'the
host can handle csum offload, and any TSO (v4&v6 incl ECN) or UFO
packets you might want to send.  I thought this was good enough for
Linux, but it actually isn't, since we don't do UFO in software.

So, add separate feature bits for what the host can handle.  Add
equivalent ones for the guest to say what it can handle, because LRO
is coming too (thanks Herbert!).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agovirtio: wean net driver off NETDEV_TX_BUSY
Rusty Russell [Sat, 3 May 2008 02:50:46 +0000 (21:50 -0500)]
virtio: wean net driver off NETDEV_TX_BUSY

Herbert tells me that returning NETDEV_TX_BUSY from hard_start_xmit is
seen as a poor thing to do; we should cache the packet and stop the queue.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
16 years agovirtio-blk: fix remove oops
Marcelo Tosatti [Thu, 24 Apr 2008 18:49:53 +0000 (15:49 -0300)]
virtio-blk: fix remove oops

Do not unregister the major at device remove, since there might be
another device instances around.

(qemu) pci_del 0 11
(qemu) ACPI: PCI interrupt for device 0000:00:0b.0 disabled
(qemu) pci_del 0 10
(qemu) ------------[ cut here ]------------
WARNING: at block/genhd.c:126 unregister_blkdev+0x74/0x9e()
ACPI: PCI interrupt for device 0000:00:0a.0 disabled

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agovirtio: fix scatterlist sizing in net driver.
Rusty Russell [Sat, 3 May 2008 02:50:45 +0000 (21:50 -0500)]
virtio: fix scatterlist sizing in net driver.

Herbert Xu points out (within another patch) that my scatterlists are
too short: one entry for the gso header, one for the skb->data, and
MAX_SKB_FRAGS for all the fragments.

Fix both xmit and recv sides (recv currently unused, coming in later
patch).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agovirtio: de-structify virtio_block status byte
Rusty Russell [Sat, 3 May 2008 02:50:45 +0000 (21:50 -0500)]
virtio: de-structify virtio_block status byte

Ron Minnich points out that a struct containing a char is not always
sizeof(char); simplest to remove the structure to avoid confusion.

Cc: "ron minnich" <rminnich@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agovirtio: export more headers to userspace
Christian Borntraeger [Wed, 23 Apr 2008 10:57:00 +0000 (12:57 +0200)]
virtio: export more headers to userspace

Rusty,

is there a reason why we dont export the virtio headers for
9p, balloon, console, pci, and virtio_ring? kvm uses make sync,
but I think it is still useful to heave these headers exported
as they might be useful for other userspace tools.

I dont export virtio.h, because it does not seem to have useful
information for userspace and it requires scatterlist.h which is
also not exported. See also my other mail about your "virtio:
change config to guest endian." patch.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agovirtio: fix sparse return void-valued expression warnings
Harvey Harrison [Tue, 1 Apr 2008 00:53:55 +0000 (17:53 -0700)]
virtio: fix sparse return void-valued expression warnings

drivers/virtio/virtio_pci.c:148:2: warning: returning void-valued expression
drivers/virtio/virtio_pci.c:155:2: warning: returning void-valued expression

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agovirtio: fix tx_ stats in virtio_net
Rusty Russell [Sat, 3 May 2008 02:50:43 +0000 (21:50 -0500)]
virtio: fix tx_ stats in virtio_net

get_buf() gives the length written by the other side, which will be
zero.  We want to add the skb length.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agovirtio: ignore corrupted virtqueues rather than spinning.
Rusty Russell [Sat, 3 May 2008 02:50:43 +0000 (21:50 -0500)]
virtio: ignore corrupted virtqueues rather than spinning.

A corrupt virtqueue (caused by the other end screwing up) can have
strange results such as a driver spinning: just bail when we try to
get a buffer from a known-broken queue.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agogenirq: reenable a nobody cared disabled irq when a new driver arrives
Thomas Gleixner [Mon, 28 Apr 2008 15:01:56 +0000 (17:01 +0200)]
genirq: reenable a nobody cared disabled irq when a new driver arrives

Uwe Kleine-Koenig has some strange hardware where one of the shared
interrupts can be asserted during boot before the appropriate driver
loads. Requesting the shared irq line from another driver result in a
spurious interrupt storm which finally disables the interrupt line.

I have seen similar behaviour on resume before (the hardware does not
work anymore so I can not verify).

Change the spurious disable logic to increment the disable depth and
mark the interrupt with an extra flag which allows us to reenable the
interrupt when a new driver arrives which requests the same irq
line. In the worst case this will disable the irq again via the
spurious trap, but there is a decent chance that the new driver is the
one which can handle the already asserted interrupt and makes the box
usable again.

Eric Biederman said further: This case also happens on a regular basis
in kdump kernels where we deliberately don't shutdown the hardware
before starting the new kernel.  This patch should reduce the need for
using irqpoll in that situation by a small amount.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-and-Acked-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
16 years ago[IA64] fix file and descriptor handling in perfmon
Al Viro [Thu, 1 May 2008 21:36:36 +0000 (14:36 -0700)]
[IA64] fix file and descriptor handling in perfmon

Races galore...  General rule: as soon as it's in descriptor table,
it's over; another thread might have started IO on it/dup2() it
elsewhere/dup2() something *over* it/etc.  fd_install() is the very
last step one should take - it's a point of no return.

Besides, the damn thing leaked on failure exits...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] TS_RESTORE_SIGMASK
Roland McGrath [Wed, 30 Apr 2008 21:40:14 +0000 (14:40 -0700)]
[IA64] TS_RESTORE_SIGMASK

Replace TIF_RESTORE_SIGMASK with TS_RESTORE_SIGMASK and define
our own set_restore_sigmask() function.  This saves the costly
SMP-safe set_bit operation, which we do not need for the sigmask
flag since TIF_SIGPENDING always has to be set too.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] smp.c coding style fix
Hidetoshi Seto [Wed, 30 Apr 2008 09:55:48 +0000 (18:55 +0900)]
[IA64] smp.c coding style fix

Fix indenting of switch statement to follow CodingStyle, and
pull out handling of call_data into an inlined function.

I confirmed that applying this fix doesn't affect assembled code.

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
Linus Torvalds [Thu, 1 May 2008 18:31:38 +0000 (11:31 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ieee1394/linux1394-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  firewire: fw-sbp2: log scsi_target ID at release
  ieee1394: fix NULL pointer dereference in sysfs access

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-linus
Linus Torvalds [Thu, 1 May 2008 18:31:24 +0000 (11:31 -0700)]
Merge git://git./linux/kernel/git/sam/kbuild-linus

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-linus:
  kbuild: fix vmlinux.o link
  kconfig: made check-lxdialog more portable

16 years agoMerge git://git.infradead.org/mtd-2.6
Linus Torvalds [Thu, 1 May 2008 18:15:28 +0000 (11:15 -0700)]
Merge git://git.infradead.org/mtd-2.6

* git://git.infradead.org/mtd-2.6:
  [MTD][NOR] Add physical address to point() method
  [JFFS2] Track parent inode for directories (for NFS export)
  [JFFS2] Invert last argument of jffs2_gc_fetch_inode(), make it boolean.
  [JFFS2] Quiet lockdep false positive.
  [JFFS2] Clean up jffs2_alloc_inode() and jffs2_i_init_once()
  [MTD] Delete long-unused jedec.h header file.
  [MTD] [NAND] at91_nand: use at91_nand_{en,dis}able consistently.

16 years ago[MTD][NOR] Add physical address to point() method
Jared Hulbert [Wed, 30 Apr 2008 06:26:49 +0000 (23:26 -0700)]
[MTD][NOR] Add physical address to point() method

Adding the ability to get a physical address from point() in addition
to virtual address.  This physical address is required for XIP of
userspace code from flash.

Signed-off-by: Jared Hulbert <jaredeh@gmail.com>
Reviewed-by: Jörn Engel <joern@logfs.org>
Acked-by: Nicolas Pitre <nico@cam.org>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years agofirewire: fw-sbp2: log scsi_target ID at release
Stefan Richter [Thu, 24 Apr 2008 21:17:47 +0000 (23:17 +0200)]
firewire: fw-sbp2: log scsi_target ID at release

Makes the good-by message more informative.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jarod Wilson <jwilson@redhat.com>
16 years agoieee1394: fix NULL pointer dereference in sysfs access
Stefan Richter [Thu, 1 May 2008 08:43:04 +0000 (10:43 +0200)]
ieee1394: fix NULL pointer dereference in sysfs access

Regression since "ieee1394: prevent device binding of raw1394,
video1394, dv1394", commit d2ace29fa44589da51fedc06a67b3f05301f3bfd:
$ cat /sys/bus/ieee1394/drivers/raw1394/device_ids
triggers a NULL pointer dereference in fw_show_drv_device_ids.
Reported by Miles Lane.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Tested-by: Miles Lane <miles.lane@gmail.com>
16 years ago[JFFS2] Track parent inode for directories (for NFS export)
David Woodhouse [Thu, 1 May 2008 17:47:17 +0000 (18:47 +0100)]
[JFFS2] Track parent inode for directories (for NFS export)

To support NFS export, we need to know the parent inode of directories.
Rather than growing the jffs2_inode_cache structure, share space with
the nlink field -- which was always set to 1 for directories anyway.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years agokbuild: fix vmlinux.o link
Sam Ravnborg [Thu, 1 May 2008 17:31:35 +0000 (19:31 +0200)]
kbuild: fix vmlinux.o link

We always linked vmliux.o.
Remove init/built-in.o dependency so we avoid this

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
16 years agokconfig: made check-lxdialog more portable
Sam Ravnborg [Thu, 1 May 2008 17:29:47 +0000 (19:29 +0200)]
kconfig: made check-lxdialog more portable

OS-X shell did not like 'echo -e' so implement
suggestion from Al Viro to use a more portable construct.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Acked-By: Timur Tabi <timur@freescale.com>
16 years agomake generic sys_ptrace unconditional
Christoph Hellwig [Thu, 1 May 2008 16:43:12 +0000 (18:43 +0200)]
make generic sys_ptrace unconditional

With s390 the last arch switched to the generic sys_ptrace yesterday so
we can now kill the ifdef around it to enforce every new port it using
it instead of introducing new weirdo versions.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[PATCH] fix sysctl_nr_open bugs
Al Viro [Mon, 28 Apr 2008 00:04:15 +0000 (20:04 -0400)]
[PATCH] fix sysctl_nr_open bugs

* if luser with root sets it to something that is not a multiple of
  BITS_PER_LONG, the system is screwed.
* if it gets decreased at the wrong time, we can get expand_files()
  returning success and _not_ increasing the size of table as asked.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] sanitize anon_inode_getfd()
Al Viro [Sat, 23 Feb 2008 11:46:49 +0000 (06:46 -0500)]
[PATCH] sanitize anon_inode_getfd()

a) none of the callers even looks at inode or file returned by anon_inode_getfd()
b) any caller that would try to look at those would be racy, since by the time
it returns we might have raced with close() from another thread and that
file would be pining for fjords.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] split linux/file.h
Al Viro [Thu, 24 Apr 2008 11:44:08 +0000 (07:44 -0400)]
[PATCH] split linux/file.h

Initial splitoff of the low-level stuff; taken to fdtable.h

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] make osf_select() use core_sys_select()
Al Viro [Wed, 23 Apr 2008 18:05:15 +0000 (14:05 -0400)]
[PATCH] make osf_select() use core_sys_select()

... instead of open-coding it

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] remove horrors with irix tty ioctls handling
Al Viro [Wed, 23 Apr 2008 04:49:25 +0000 (00:49 -0400)]
[PATCH] remove horrors with irix tty ioctls handling

Existing code in there (get_tty(), etc.) is both severely
racy *and* pointless: ioctls in question have Linux equivalents
and there's no need to play silly buggers in irix_ioctl() -
just need to replace arguments and, in case of TIOCGSID,
deal with API differences - Linux one expects pid_t __user *
while Irix one does unsigned long __user *.  BFD...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] fix file and descriptor handling in perfmon
Al Viro [Tue, 22 Apr 2008 23:46:10 +0000 (19:46 -0400)]
[PATCH] fix file and descriptor handling in perfmon

Races galore...  General rule: as soon as it's in descriptor table,
it's over; another thread might have started IO on it/dup2() it
elsewhere/dup2() something *over* it/etc.  fd_install() is the very
last step one should take - it's a point of no return.

Besides, the damn thing leaked on failure exits...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[JFFS2] Invert last argument of jffs2_gc_fetch_inode(), make it boolean.
David Woodhouse [Thu, 1 May 2008 15:59:24 +0000 (16:59 +0100)]
[JFFS2] Invert last argument of jffs2_gc_fetch_inode(), make it boolean.

We don't actually care about nlink; we only care whether the inode in
question is unlinked or not.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>