David Brownell [Fri, 15 Aug 2008 07:40:44 +0000 (00:40 -0700)]
spi: bugfix spi_add_device() with duplicate chipselects
When reviewing a recent patch I noticed a potential trouble spot in the
registration of new SPI devices. The SPI master driver is told to set
the device up before adding it to the driver model, so that it's always
properly set up when probe() is called. (This is important, because in
the case of inverted chipselects, this device can make the bus misbehave
until it's properly deselected. It's got to be set up even if no driver
binds to the device.)
The trouble spot is that it doesn't first verify that no other device
has been added using that chipselect. If such a device has been added,
its configuration gets trashed. (Fortunately this has not been a common
error!)
The fix here adds an explicit check, and a mutex to protect the relevant
critical region.
[akpm@linux-foundation.org: make the lock local to spi_add_device()]
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Chris Mason [Fri, 15 Aug 2008 07:40:43 +0000 (00:40 -0700)]
fs/inode.c: properly init address_space->writeback_index
write_cache_pages() uses i_mapping->writeback_index to pick up where it
left off the last time a given inode was found by pdflush or
balance_dirty_pages (or anyone else who sets wbc->range_cyclic)
alloc_inode() should set it to a sane value so that writeback doesn't
start in the middle of a file. It is somewhat difficult to notice the bug
since write_cache_pages will loop around to the start of the file and the
elevator helps hide the resulting seeks.
For whatever reason, Btrfs hits this often. Unpatched, untarring 30
copies of the linux kernel in series runs at 47MB/s on a single sata
drive. With this fix, it jumps to 62MB/s.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jack Steiner [Fri, 15 Aug 2008 07:40:42 +0000 (00:40 -0700)]
MAINTAINERS: add maintainers for GRU, XPC, XPNET and XP
Add MAINTAINERS for GRU, XPNET, XPC and XP drivers.
Signed-off-by: Jack Steiner <steiner@sgi.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Darrick J. Wong [Fri, 15 Aug 2008 07:40:41 +0000 (00:40 -0700)]
coretemp: recognize Nehalem CPUs
Add in the CPUID for Nehalem chips.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Cc: Kent Liu <kent.liu@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Darrick J. Wong [Fri, 15 Aug 2008 07:40:41 +0000 (00:40 -0700)]
ibmaem: don't query the entire sensor repository when reading energy meter
Currently, all sensors are read when the energy meter is queried via
sysfs. This introduces a considerable amount of delay and variation in
the sysfs reading, which is not desirable when trying to profile energy
use. Therefore, read only the energy meters when a sysfs query comes in
for them, and don't cache the results so that we always get the latest
reading.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Darrick J. Wong [Fri, 15 Aug 2008 07:40:40 +0000 (00:40 -0700)]
ibmaem: prevent infinite probing loop on x3650 M2 systems
On older machines, probing for a nonexistent AEM interface returned an
IPMI error; when we saw this, we'd stop probing. On the x3650 M2 and
(presumably) later, we are returned a value indicating success and a
buffer full of garbage or zeroes. This causes the probe function to run
in an infinite loop. To fix this, we add one last check--if the
interface number we're looking for is higher than the number of
interfaces that AEM claims to have, stop probing.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Darrick J. Wong [Fri, 15 Aug 2008 07:40:40 +0000 (00:40 -0700)]
ibmaem: update the documentation to reflect the current name
Minor documentation update to reflect the current full name of the power
management hardware interface and reflows the text a bit.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Alistair John Strachan [Fri, 15 Aug 2008 07:40:39 +0000 (00:40 -0700)]
abituguru3: prefer DMI probing to manual probing
Previously the driver was only using DMI to prevent smbus probing on
non-Abit motherboards. However, since the manual probing method is
brittle and prone to failure on some Abit motherboards (esp. the Abit
IP35 Pro) it is better to use DMI to also read the board name and then
decide whether or not to probe the bus.
At the moment, we do not have a list of valid DMI name strings to use
for existing and supported motherboards. This patch only implements DMI
probing for the IP35 Pro. For motherboards that can not yet use DMI
probing, a warning will be printed to the kernel log asking those users
to email me their dmidecode output.
The existing manual probing mechanism will be used if CONFIG_DMI is not
enabled, if DMI probing fails (for DMI-unsupported motherboards), or if
DMI probing fails and the "force" option is set (for DMI-supported
motherboards). Ideally in the longer term this manual probing method
would be removed.
This patch should be safe to apply as it does not change the probing
behaviour for most of the supported motherboards, just the IP35 Pro,
which already has regressions filed against it in 2.6.26.
Addresses http://bugzilla.kernel.org/show_bug.cgi?id=11212
Signed-off-by: Alistair John Strachan <alistair@devzero.co.uk>
Acked-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Alistair John Strachan [Fri, 15 Aug 2008 07:40:37 +0000 (00:40 -0700)]
abituguru3: update MAINTAINERS
Hans passed maintainership of the abituguru3 hwmon driver onto me. Add
a new entry to the MAINTAINERS file for the abituguru3 driver and assign
it to me. Also update the existing UGURU entry to indicate that Hans is
only responsible for the abituguru driver.
Signed-off-by: Alistair John Strachan <alistair@devzero.co.uk>
Acked-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Darrick J. Wong [Fri, 15 Aug 2008 07:40:36 +0000 (00:40 -0700)]
i5k_amb: provide labels for temperature sensors
Export the sensor -> channel/dimm mapping in tempX_label.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Marc Pignat [Fri, 15 Aug 2008 07:40:34 +0000 (00:40 -0700)]
hwmon: ADC124S501 generic driver
SPI driver for analog to digital converters national semiconductor
ADC081S101, ADC124S501, ...
Code for 8 channels by Tobias Himmer.
This driver adds support for National Semiconductor ADC<bb><c>S<sss> chip
family, where:
* bb is the resolution in number of bits (8, 10, 12)
* c is the number of channels (1, 2, 4, 8)
* sss is the maximum conversion speed (021 for 200 kSPS, 051 for 500
kSPS and 101 for 1 MSPS)
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Marc Pignat <marc.pignat@hevs.ch>
Cc: Tobias Himmer <tobias@himmer-online.de>
Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Michael Borisov [Fri, 15 Aug 2008 07:40:32 +0000 (00:40 -0700)]
drivers/hwmon/w83791d.c: fix unused var warning
drivers/hwmon/w83791d.c: In function `w83791d_probe':
drivers/hwmon/w83791d.c:1049: warning: unused variable `val1'
Signed-off-by: Michael Borisov <niro@tut.by>
Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Guilherme M. Schroeder [Fri, 15 Aug 2008 07:40:32 +0000 (00:40 -0700)]
applesmc: add support for Macbook
Add support for Macbook v3 (sensors and accelerometer).
Signed-off-by: Nicolas Boichat <nicolas@boichat.ch>
Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Roberto De Ioris [Fri, 15 Aug 2008 07:40:30 +0000 (00:40 -0700)]
applesmc: support for Intel iMac
This adds support for fans and temperature sensors on intel iMac.
Tested on iMac 24" 2.8ghz (iMac8,1), it supports the following sensors:
cpu A
ambient
gpu
gpu diode
gpu heatsink
hd bay 1
memory controller
optical drive
power
Signed-off-by: Roberto De Ioris <roberto@unbit.it>
Cc: Nicolas Boichat <nicolas@boichat.ch>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
York Sun [Fri, 15 Aug 2008 07:40:29 +0000 (00:40 -0700)]
freescale DIU: bug fix: add sanity check for AOI position
AOI position cannot be negative.
Signed-off-by: York Sun <yorksun@freescale.com>
Cc: Kumar Gala <galak@gate.crashing.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
York Sun [Fri, 15 Aug 2008 07:40:28 +0000 (00:40 -0700)]
freescale DIU: add virtual resolution and panning support
Application can now have the virtual resoltuion and use FBIOPAN_DISPLAY
ioctl to pan.
Signed-off-by: York Sun <yorksun@freescale.com>
Cc: Kumar Gala <galak@gate.crashing.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andrew Morton [Fri, 15 Aug 2008 07:40:27 +0000 (00:40 -0700)]
kexec: use a mutex for locking rather than xchg()
Functionally the same, but more conventional.
Cc: Huang Ying <ying.huang@intel.com>
Tested-by: Vivek Goyal <vgoyal@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Huang Ying [Fri, 15 Aug 2008 07:40:26 +0000 (00:40 -0700)]
kexec jump: fix for ftrace
Ftrace depends on some processor state that we destroyed during kexec and
restored by restore_processor_state(). So save_processor_state() and
restore_processor_state() are moved into machine_kexec() and ftrace is
restored after restore_processor_state().
Signed-off-by: Huang Ying <ying.huang@intel.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Huang Ying [Fri, 15 Aug 2008 07:40:25 +0000 (00:40 -0700)]
kexec jump: __ftrace_enabled_save/restore
Add __ftrace_enabled_save/restore, used to disable ftrace for a while.
Now, this is used by kexec jump, which need a version without lock, for
general situation, a locked version should be used.
Signed-off-by: Huang Ying <ying.huang@intel.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Huang Ying [Fri, 15 Aug 2008 07:40:24 +0000 (00:40 -0700)]
kexec jump: in sync with hibernation implementation
Add device_pm_lock() and device_pm_unlock() in kernel_kexec() in sync with
current hibernation implementation.
Signed-off-by: Huang Ying <ying.huang@intel.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Huang Ying [Fri, 15 Aug 2008 07:40:24 +0000 (00:40 -0700)]
kexec jump: remove duplication of kexec_restart_prepare()
Call kernel_restart_prepare() in kernel_kexec() instead of duplicating the
code.
Signed-off-by: Huang Ying <ying.huang@intel.com>
Acked-by: Pavel Machek <pavel@suse.cz>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Huang Ying [Fri, 15 Aug 2008 07:40:23 +0000 (00:40 -0700)]
kexec jump: check code size in control page
Kexec/Kexec-jump require code size in control page is less than
PAGE_SIZE/2. This patch add link-time checking for this.
ASSERT() of ld link script is used as the link-time checking mechanism.
[akpm@linux-foundation.org: build fix]
Signed-off-by: Huang Ying <ying.huang@intel.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Huang Ying [Fri, 15 Aug 2008 07:40:22 +0000 (00:40 -0700)]
kexec jump: rename KEXEC_CONTROL_CODE_SIZE to KEXEC_CONTROL_PAGE_SIZE
Rename KEXEC_CONTROL_CODE_SIZE to KEXEC_CONTROL_PAGE_SIZE, because control
page is used for not only code on some platform. For example in kexec
jump, it is used for data and stack too.
[akpm@linux-foundation.org: unbreak powerpc and arm, finish conversion]
Signed-off-by: Huang Ying <ying.huang@intel.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Huang Ying [Fri, 15 Aug 2008 07:40:21 +0000 (00:40 -0700)]
kexec jump: clean up #ifdef and comments
Move if (kexec_image->preserve_context) { ... } into #ifdef
CONFIG_KEXEC_JUMP to make code looks cleaner.
Fix no longer correct comments of kernel_kexec().
Signed-off-by: Huang Ying <ying.huang@intel.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Huang Ying [Fri, 15 Aug 2008 07:40:20 +0000 (00:40 -0700)]
kexec: fix compilation warning on xchg(&kexec_lock, 0) in kernel_kexec()
kernel/kexec.c: In function 'kernel_kexec':
kernel/kexec.c:1506: warning: value computed is not used
Signed-off-by: Huang Ying <ying.huang@intel.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Marcin Slusarz [Fri, 15 Aug 2008 07:40:19 +0000 (00:40 -0700)]
suspend: fix section mismatch warning - register_nosave_region
WARNING: vmlinux.o(.text+0xe684): Section mismatch in reference from the function register_nosave_region() to the function .init.text:__register_nosave_region()
The function register_nosave_region() references
the function __init __register_nosave_region().
This is often because register_nosave_region lacks a __init
annotation or the annotation of __register_nosave_region is wrong.
register_nosave_region calls __init function and is called only from
__init functions
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Michael Kerrisk [Fri, 15 Aug 2008 07:40:18 +0000 (00:40 -0700)]
Documentation/vm/page_migration: update reference to numa_maps + fix download URI
With man-pages-3.07, the numa_maps documentation home is now proc(5), so
the reference in Documentation/vm/page_migration needs updating.
(Cliff/Lee are removing numa_maps.5 from the numactl package.) Also, the
download location for the numactl package changed a while back. This
patch fixes both things, as well as a typo (provided-->provides).
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Cliff Wickman <cpw@sgi.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Mikulas Patocka [Fri, 15 Aug 2008 07:40:17 +0000 (00:40 -0700)]
bootmem allocator: alloc_bootmem_core(): page-align the end offset
This is the minimal sequence that jams the allocator:
void *p, *q, *r;
p = alloc_bootmem(PAGE_SIZE);
q = alloc_bootmem(64);
free_bootmem(p, PAGE_SIZE);
p = alloc_bootmem(PAGE_SIZE);
r = alloc_bootmem(64);
after this sequence (assuming that the allocator was empty or page-aligned
before), pointer "q" will be equal to pointer "r".
What's hapenning inside the allocator:
p = alloc_bootmem(PAGE_SIZE);
in allocator: last_end_off == PAGE_SIZE, bitmap contains bits 10000...
q = alloc_bootmem(64);
in allocator: last_end_off == PAGE_SIZE + 64, bitmap contains 11000...
free_bootmem(p, PAGE_SIZE);
in allocator: last_end_off == PAGE_SIZE + 64, bitmap contains 01000...
p = alloc_bootmem(PAGE_SIZE);
in allocator: last_end_off == PAGE_SIZE, bitmap contains 11000...
r = alloc_bootmem(64);
and now:
it finds bit "2", as a place where to allocate (sidx)
it hits the condition
if (bdata->last_end_off && PFN_DOWN(bdata->last_end_off) + 1 == sidx))
start_off = ALIGN(bdata->last_end_off, align);
-you can see that the condition is true, so it assigns start_off =
ALIGN(bdata->last_end_off, align); (that is PAGE_SIZE) and allocates
over already allocated block.
With the patch it tries to continue at the end of previous allocation only
if the previous allocation ended in the middle of the page.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Acked-by: Johannes Weiner <hannes@saeurebad.de>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Thu, 14 Aug 2008 03:50:10 +0000 (20:50 -0700)]
Merge git://git./linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (47 commits)
usb: musb: pass configuration specifics via pdata
usb: musb: fix hanging when rmmod gadget driver
USB: Add MUSB and TUSB support
USB: serial: remove CONFIG_USB_DEBUG from sierra and option drivers
USB: Add vendor/product id of ZTE MF628 to option
USB: quirk PLL power down mode
USB: omap_udc: fix compilation with debug enabled
usb: cdc-acm: drain writes on close
usb: cdc-acm: stop dropping tx buffers
usb: cdc-acm: bugfix release()
usb gadget: issue notifications from ACM function
usb gadget: remove needless struct members
USB: sh: r8a66597-hcd: fix disconnect regression
USB: isp1301: fix compilation
USB: fix compiler warning fix
usb-storage: unusual_devs entry for Nokia 5300
USB: cdc-acm.c: Fix compile warnings
USB: BandRich BandLuxe C150/C250 HSPA Data Card Driver
USB: ftdi_sio: add support for PHI Fisco data cable (FT232BM based, VID/PID 0403:e40b)
usb: isp1760: don't be noisy about short packets.
...
Linus Torvalds [Thu, 14 Aug 2008 03:49:37 +0000 (20:49 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/security-testing-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
CRED: Introduce credential access wrappers
Linus Torvalds [Thu, 14 Aug 2008 03:48:46 +0000 (20:48 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (56 commits)
netns: Fix crash by making igmp per namespace
bnx2x: Version update
bnx2x: Checkpatch compliance
bnx2x: Spelling mistakes
bnx2x: Minor code improvements
bnx2x: Driver info
bnx2x: 1G LED does not turn off
bnx2x: 8073 PHY changes
bnx2x: Change GPIO for any port
bnx2x: Pause settings
bnx2x: Link order with external PHY
bnx2x: No LRO without Rx checksum
bnx2x: Wrong structure size
bnx2x: WoL capability
bnx2x: Clearing MAC addresses filters
bnx2x: Delay in while loops
bnx2x: PBA Table Page Alignment Workaround
bnx2x: Self-test false positive
bnx2x: Memory allocation
bnx2x: HW attention lock
...
Linus Torvalds [Thu, 14 Aug 2008 03:48:25 +0000 (20:48 -0700)]
Merge git://git./linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
sparc64: Handle stack trace attempts before irqstacks are setup.
sparc64: Implement IRQ stacks.
sparc: remove include of linux/of_device.h from asm/of_device.h
sparc64: Fix recursion in stack overflow detection handling.
sparc/drivers: use linux/of_device.h instead of asm/of_device.h
sparc64: Don't MAGIC_SYSRQ ifdef smp_fetch_global_regs and support code.
Felipe Balbi [Fri, 8 Aug 2008 09:40:54 +0000 (12:40 +0300)]
usb: musb: pass configuration specifics via pdata
Use platform_data to pass musb configuration-specific
details to musb driver.
This patch will prevent that other platforms selecting
HAVE_CLK and enabling musb won't break tree building.
The other parts of it will come when linux-omap merge
up more omap2/3 board-files.
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Felipe Balbi [Mon, 4 Aug 2008 10:53:52 +0000 (13:53 +0300)]
usb: musb: fix hanging when rmmod gadget driver
If we try to modprobe a second gadget driver before
rmmoding the first one, the reference for the first
gadget driver would get NULLed avoiding usb to change
gadget drivers later.
Cc: David Brownell <david-b@pacbell.net>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Felipe Balbi [Thu, 24 Jul 2008 09:27:36 +0000 (12:27 +0300)]
USB: Add MUSB and TUSB support
This patch adds support for MUSB and TUSB controllers
integrated into omap2430 and davinci. It also adds support
for external tusb6010 controller.
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Tue, 12 Aug 2008 05:04:50 +0000 (12:04 +0700)]
USB: serial: remove CONFIG_USB_DEBUG from sierra and option drivers
These drivers should not be relying on CONFIG_USB_DEBUG. By doing this,
it prevents users of kernels that do not enable this option from
enabling debugging in these drivers, unlike all other usb-serial
drivers.
Cc: Matthias Urlichs <smurf@smurf.noris.de>
Cc: Kevin Lloyd <klloyd@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Oliver Martin [Sat, 9 Aug 2008 02:49:26 +0000 (04:49 +0200)]
USB: Add vendor/product id of ZTE MF628 to option
This adds the vendor and product id (19d2:0015) of the ZTE MF628 HSDPA
modem to the option driver. It still needs a mode switch command issued
beforehand, this is currently handled by a userspace tool.
Signed-off-by: Oliver Martin <oliver.martin@student.tuwien.ac.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Libin Yang [Fri, 8 Aug 2008 07:03:31 +0000 (15:03 +0800)]
USB: quirk PLL power down mode
On some AMD 700 series southbridges, ISO OUT transfers (such as audio
playback through speakers) on the USB OHCI controller may be corrupted
when an A-Link express power saving feature is active.
PLL power down mode in conjunction with link power management feature
L1 being enabled is the bad combination ... this patch prevents them
from being enabled when ISO transfers are pending.
Signed-off-by: Crane Cai <crane.cai@amd.com>
Signed-off-by: Libin Yang <libin.yang@amd.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Dmitry Baryshkov [Thu, 7 Aug 2008 12:29:25 +0000 (16:29 +0400)]
USB: omap_udc: fix compilation with debug enabled
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Thu, 7 Aug 2008 01:46:10 +0000 (18:46 -0700)]
usb: cdc-acm: drain writes on close
Add a mechanism to let the write queue drain naturally before
closing the TTY, rather than always losing that data. There
is a timeout, so it can't wait too long.
Provide missing locking inside acm_wb_is_avail(); it matters
more now. Note, this presumes an earlier patch was applied,
removing a call to this routine where the lock was held.
Slightly improved diagnostics on write URB completion, so we
can tell when a write URB gets killed and, if so, how much
data it wrote first ... and so that I/O path is normally
silent (and can't much change timings).
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Thu, 7 Aug 2008 01:44:12 +0000 (18:44 -0700)]
usb: cdc-acm: stop dropping tx buffers
The "increase cdc-acm write throughput" patch left in place two
now-obsolete mechanisms, either of which can make the cdc-acm
driver drop TX data (nasty!). This patch removes them:
- The write_ready flag ... if an URB and buffer were found,
they can (and should!) always be used.
- TX path acm_wb_is_used() ... used when the buffer was just
allocated, so that check is pointless.
Also fix a won't-yet-matter leak of a write buffer on a disconnect path.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: David Engraf <david.engraf@netcom.eu>
Acked-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Thu, 7 Aug 2008 01:41:12 +0000 (18:41 -0700)]
usb: cdc-acm: bugfix release()
Bugfixes to the usb_driver_release_interface() usage;
(a) make sure releasing *either* interface first will release
the other, instead of insisting it be the control interface;
(b) remove the recently-added self-deadlock.
(The "fix disconnect bug in cdc-acm" patch was incomplete and incorrect.)
Plus a small "sparse" fix: rename a local variable so it doesn't
shadow a function parameter.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Thu, 7 Aug 2008 01:49:57 +0000 (18:49 -0700)]
usb gadget: issue notifications from ACM function
Update the CDC-ACM gadget code to support the peripheral-to-host
notifications when the tty is opened or closed, or issues a BREAK.
The serial framework code calls new generic hooks; right now only
CDC-ACM uses those hooks. This resolves several REVISIT comments
in the code. (Based on a patch from Felipe Balbi.)
Note that this doesn't expose USB_CDC_CAP_BRK to the host, since
this code still rejects USB_CDC_REQ_SEND_BREAK control requests
for host-to-peripheral BREAK signaling (received via /dev/ttyGS*).
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Thu, 7 Aug 2008 01:48:52 +0000 (18:48 -0700)]
usb gadget: remove needless struct members
This removes some unused members from the various USB functions.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Yoshihiro Shimoda [Fri, 11 Jul 2008 09:53:45 +0000 (18:53 +0900)]
USB: sh: r8a66597-hcd: fix disconnect regression
fix the regression in commit
29fab0cd897519be9009ba8c898410ab83b378e9
that this driver executed reconnection processing when disconnected
some devices.
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Dmitry Baryshkov [Thu, 7 Aug 2008 12:29:24 +0000 (16:29 +0400)]
USB: isp1301: fix compilation
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Thu, 7 Aug 2008 17:04:51 +0000 (13:04 -0400)]
USB: fix compiler warning fix
This patch (as1123b) fixes a compiler warning: do_unbind_rebind() is
defined but not used if CONFIG_PM=n.
Problem originally found and initial patch submitted by Alexander
Beregalov <a.beregalov@gmail.com>.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Thu, 7 Aug 2008 17:02:40 +0000 (13:02 -0400)]
usb-storage: unusual_devs entry for Nokia 5300
This patch (as1120) adds an unusual_devs entry for the Nokia 5300.
Maybe once Nokia releases the Symbian code we'll be able to fix all
the problems it has with the USB mass-storage protocol.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Cedric Godin <cedric@belbone.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Takashi Iwai [Thu, 31 Jul 2008 17:06:13 +0000 (19:06 +0200)]
USB: cdc-acm.c: Fix compile warnings
The irq flags should be unsigned long.
CC [M] drivers/usb/class/cdc-acm.o
drivers/usb/class/cdc-acm.c: In function 'acm_waker':
drivers/usb/class/cdc-acm.c:527: warning: comparison of distinct pointer types lacks a cast
drivers/usb/class/cdc-acm.c:529: warning: comparison of distinct pointer types lacks a cast
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Leon Leong [Fri, 1 Aug 2008 03:40:12 +0000 (11:40 +0800)]
USB: BandRich BandLuxe C150/C250 HSPA Data Card Driver
This patch adds the Product ID for the BandLuxe C150/C250 3.5G data
card series from BandRich Inc.
After detection, the data card works fine.
It was patched against kernel 2.6.27-rc1 with -mm patch
Signed-off-by: Leon Leong <upleong@bandrich.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Lex Ross [Wed, 6 Aug 2008 12:25:08 +0000 (16:25 +0400)]
USB: ftdi_sio: add support for PHI Fisco data cable (FT232BM based, VID/PID 0403:e40b)
Support for PHI Fisco USB to Serial data cable (FTDI FT232BM based).
PHI Fisco cable is supplied for connecting Philips Xenium 9@9++ mobile phones.
PIDs were missing.
Tested successfully with PHI Fisco Data Cable (VID/PID 0403:e40b)
Signed-off-by: Lex V. Ross <lross@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sebastian Siewior [Thu, 17 Jul 2008 18:09:29 +0000 (20:09 +0200)]
usb: isp1760: don't be noisy about short packets.
According to Alan Stern, short packets are quite normal under
certain circumstances. This printk was triggered by usb to
serial converters on every packet and some usb sticks triggered
a few of those while plugging the stick.
This printks are now hidden unless USB debug mode is activated.
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Enrico Scholz [Thu, 17 Jul 2008 18:09:30 +0000 (20:09 +0200)]
usb: ISP1760: improve pre-fetch timing
ISP1760 requires a delay of 90ns between programming the address and
reading the data. Current driver solves this by a mdelay(1) which is
very heavy weighted and slow. This patch applies the workaround from
the ISP1760 FAQ by using two different banks for PTD and payload data
and using a common wait for them. This wait is done by an additional
ISP1760 access (whose timing constraints guarantee the 90ns delay).
This improves speed when reading from an USB stick from:
$ time dd if=/dev/sda of=/dev/zero bs=65536 count=1638
real 1m 15.43s
user 0m 0.44s
sys 0m 39.46s
to
$ time dd if=/dev/sda of=/dev/zero bs=65536 count=1638
real 0m 18.53s
user 0m 0.16s
sys 0m 12.97s
[bigeasy@linutronix.de: fixed comment formating, moved define into
header file, obey 80 char rule]
Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sebastian Siewior [Thu, 17 Jul 2008 18:09:28 +0000 (20:09 +0200)]
usb: return error code instead of 0 in the enqueue function.
if the enqueue function returns -ESHUTDOWN or -ENOMEM then
we return 0 instead of an error. This leads to a timeout and
then to a dequeue request of an not enqueued urb.
Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Mon, 7 Jul 2008 19:16:08 +0000 (12:16 -0700)]
USB: serial gadget: rx path data loss fixes
Update RX path handling in new serial gadget code to cope better with
RX blockage: queue every RX packet until its contents can safely be
passed up to the ldisc. Most of the RX path work is now done in the
RX tasklet, instead of just the final "push to ldisc" step. This
addresses some cases of data loss:
- A longstanding serial gadget bug: when tty_insert_flip_string()
didn't copy the entire buffer, the rest of the characters were
dropped! Now that packet stays queued until the rest of its data
is pushed to the ldisc.
- Another longstanding issue: in the unlikely case that an RX
transfer returns data and also reports a fault, that data is
no longer discarded.
- In the recently added RX throttling logic: it needs to stop
pushing data into the TTY layer, instead of just not submitting
new USB read requests. When the TTY is throttled long enough,
backpressure will eventually make the OUT endpoint NAK.
Also: an #ifdef is removed (no longer necessary); and start switching
to a better convention for debug messages (prefix them with tty name).
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Dmitry Baryshkov [Sun, 6 Jul 2008 10:26:30 +0000 (14:26 +0400)]
USB: Hook start_hnp into ohci struct
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Dmitry Baryshkov [Sun, 6 Jul 2008 19:35:01 +0000 (23:35 +0400)]
USB: ohci: make distrust_firmware a quirk
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Oliver Neukum [Fri, 4 Jul 2008 08:10:53 +0000 (10:10 +0200)]
USB: update to Documentation
this mentions a new deadlock due to advanced power management.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Simon Arlott [Sat, 12 Jul 2008 21:19:48 +0000 (22:19 +0100)]
USB: cxacru: Fix printk format flag in error message
"#%x" should have been "%#x"
Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jost Diederichs [Sun, 13 Jul 2008 05:37:05 +0000 (22:37 -0700)]
USB: usb-storage Motorola Phone Razr v3xx US_FL_FIX_CAPACITY patch
add razr v3xx US_FL_FIX_CAPACITY flag to unusual_devs.h in usb-storage
This is another Motorola phone that incorrectly reports the sector count
(off by one).
Problem Description: io errors when mounting phone's sd-card via the
phones usb port
Steps to reproduce: mount Motorola Razr v3xx phones sd-card on Linux Desktop
via usb cable. Phones USB port must be in memory card mode.
DEBUG output:
Jul 9 19:32:41 micky kernel: Buffer I/O error on device sdd, logical block
3970048
Jul 9 19:32:41 micky kernel: sd 11:0:0:0: [sdd] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE,SUGGEST_OK
Jul 9 19:32:41 micky kernel: sd 11:0:0:0: [sdd] Sense Key : Medium Error [current]
Jul 9 19:32:41 micky kernel: sd 11:0:0:0: [sdd] Add. Sense: No additional sense information
Jul 9 19:32:41 micky kernel: end_request: I/O error, dev sdd, sector
3970048
From: Jost Diederichs <jost@qdusa.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kevin Lloyd [Thu, 10 Jul 2008 21:14:57 +0000 (14:14 -0700)]
USB Storage Sierra: TRU-Install feature update
This patch upgrades the support for the Sierra Wireless TRU-Install
feature (i.e. zeroCD) to allow for future support of Linux enabled
TRU-Install devices.
By default all devices that do not have a Linux enabled TRU-Install
device (i.e. the device does not have a Linux package on the virtual CD
partition) will be switched into "modem mode." Devices that do contain a
Linux package in the TRU-Install virtual CD will be allowed to enumerate
as a CD-Rom so that either (a) a user can install the packaged software
or (b) a user-space application (e.g. udev) can switch it to modem mode.
This patch does allow for manual override by adding a usb-storage module
parameter 'swi_tru_install' which can force the modem into either mode
regardless of what packages it contains.
Signed-off-by: Kevin Lloyd <klloyd@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kevin Lloyd [Thu, 10 Jul 2008 21:14:54 +0000 (14:14 -0700)]
USB Serial Sierra: TRU-Install feature update
Moves responsbility of TRU-Install (i.e. ZeroCD) to the usb-storage
driver. See patch 04/04 of this set.
Signed-off-by: Kevin Lloyd <klloyd@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kevin Lloyd [Thu, 10 Jul 2008 21:14:51 +0000 (14:14 -0700)]
USB Serial Sierra: Dynamic interface detection
This patch changes the method by which the number of ports per interface is
assigned so that it is more dynamic and calculated on the fly (as opposed to
hard coding it). This will allow for faster and easier addition of products.
Signed-off-by: Kevin Lloyd <klloyd@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kevin Lloyd [Thu, 10 Jul 2008 21:14:47 +0000 (14:14 -0700)]
USB Serial Sierra: clean-up
Very minor changes to clean up sierra code. Adds a prefix to debug messages so
that Sierra messages are easily recognized. Removes extraneous code.
This targets kernel 2.6.26-rc9
Signed-off-by: Kevin Lloyd <klloyd@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Tollef Fog Heen [Tue, 22 Jul 2008 07:28:05 +0000 (09:28 +0200)]
USB: pl2023: Remove USB id (4348:5523) handled by ch341
USB ID 4348:5523 is handled by the ch341 driver. Remove it from the
pl2023 driver.
Reverts
002e8f2c80c6be76bb312940bc278fc10b2b2487.
Signed-off-by: Tollef Fog Heen <tfheen@err.no>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Mon, 21 Jul 2008 14:08:28 +0000 (10:08 -0400)]
usb-storage: unusual_devs entries for iRiver T10 and Datafab CF+SM reader
This patch (as1115) adds unusual_devs entries with the IGNORE_RESIDE
flag for the iRiver T10 and the Simple Tech/Datafab CF+SM card
reader. Apparently these devices provide reasonable residue values
for READ and WRITE operations, but not for others like INQUIRY or READ
CAPACITY.
This fixes the iRiver T10 problem reported in Bugzilla #11125.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Simon Arlott [Mon, 21 Jul 2008 19:44:50 +0000 (20:44 +0100)]
USB: Move usb/mon/ up to misc options in Kconfig
This makes "USB Monitor" appear under "Miscellaneous USB options"
section instead of in the middle of device specific drivers in the
"USB Imaging devices" section.
Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Tue, 29 Jul 2008 15:58:06 +0000 (11:58 -0400)]
usb-storage: automatically recognize bad residues
This patch (as1119) will help to reduce the clutter of usb-storage's
unusual_devs file by automatically detecting some devices that need
the IGNORE_RESIDUE flag. The idea is that devices should never return
a non-zero residue for an INQUIRY or a READ CAPACITY command unless
they failed to transfer all the requested data. So if one of these
commands transfers a standard amount of data but there is a positive
residue, we know that the residue is bogus and we can set the flag.
This fixes the problems reported in Bugzilla #11125.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Wed, 30 Jul 2008 15:31:50 +0000 (11:31 -0400)]
USB: fix interface unregistration logic
This patch (as1122) fixes a bug: When an interface is unregistered,
its children (sysfs files and endpoint devices) are unregistered after
it instead of before.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Kay Sievers <kay.sievers@vrfy.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Tue, 29 Jul 2008 16:01:04 +0000 (12:01 -0400)]
usb-serial: don't release unregistered minors
This patch (as1121) fixes a bug in the USB serial core. When a device
is unregistered, the core will give back its minors -- even if the
device hasn't been assigned any!
The patch reserves the highest minor value (255) to mean that no minor
was assigned. It also removes some dead code and does a small style
fixup.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Felipe Balbi [Thu, 17 Jul 2008 14:26:49 +0000 (17:26 +0300)]
usb: gadget: protect gadget_chips.h from been included twice
Without it, we might have trouble when trying to write
some composite gadget drivers.
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Dave Jones [Mon, 14 Jul 2008 17:28:34 +0000 (13:28 -0400)]
USB: usb-storage: quirk around v1.11 firmware on Nikon D4
usb-storage: quirk around v1.11 firmware on Nikon D40
https://bugzilla.redhat.com/show_bug.cgi?id=454028
Just as in earlier firmware versions, we need to perform this
quirk for the latest version too.
Speculatively do the entry for the D80 too, as they seem to
have the same firmware problems historically.
Signed-off-by: Dave Jones <davej@redhat.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Mon, 21 Jul 2008 13:56:26 +0000 (09:56 -0400)]
USB: OHCI: fix system hang caused by earlier patch
This patch (as1114) fixes a problem that was revealed by an earlier
patch (as1069b). Some broken controllers seem never to turn off their
RHCS interrupt status bit, even when told to do so. As a result they
generate an interrupt storm and hang the system.
The patch avoids enabling RHSC interrupt requests when the RHCS status
bit is already set. This should have no adverse affects on normal
controllers, since they won't set the status bit until a root-hub
status change actually occurs, in which case we wouldn't enable RHSC
interrupt requests anyway -- we would wait until the status change had
been processed and cleared.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested by: Andrey Borzenkov <arvidjaar@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alexander Beregalov [Tue, 29 Jul 2008 01:54:31 +0000 (05:54 +0400)]
usb/core/driver: fix warning
usb/core/driver: fix warning:
drivers/usb/core/driver.c:834: warning: 'do_unbind_rebind' defined but not used
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Mon, 28 Jul 2008 14:39:28 +0000 (10:39 -0400)]
USB: add missing kerneldoc line for "needs_binding"
This patch (as1117) adds a kerneldoc line for the "needs_binding"
field in struct usb_interface. It was accidentally omitted when the
field was added.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Frederik Kriewitz [Wed, 30 Jul 2008 14:53:41 +0000 (16:53 +0200)]
USB: ftdi_sio: add support for Luminance Stellaris Evaluation/Development Kits
The Patch adds support for Luminance Stellaris Evaluation/Development
Kits (FTDI 2232C based).
The PIDs were missing.
Successfully tested with a Stellaris LM3S8962 Evaluation kit.
Signed-off-by: Frederik Kriewitz <frederik@kriewitz.eu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
André Schenk [Mon, 28 Jul 2008 13:48:46 +0000 (15:48 +0200)]
USB: ftdi_sio: Add USB Product Id for ELV HS485
USB product id registration for the ELV HS485 USB adapter (www.elv.de) to
their home automation bus system. Applies to 2.6.26.
Signed-off-by: Andre Schenk <andre@melior.s.bawue.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Sat, 26 Jul 2008 15:06:24 +0000 (08:06 -0700)]
USB: fix USB boot crash, ecm_do_notify(), list_add corruption. prev->next should be next (
ffff88003b8f82f8)
This fixes a BUG() turned up by Ingo via randconfig testing, where
CONFIG_LIST_DEBUG turned up list corruption. The corruption was
caused by the dummy_hcd (single-machine test harness for gadget and
HCD code) trashing the request queue when driven by the new CDC
composite gadget an I/O pattern that was previously uncommon.
Fix suggested by Alan Stern.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Tested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Wolfgang Mües [Tue, 29 Jul 2008 09:54:43 +0000 (11:54 +0200)]
usb: auerswald: remove driver (obsolete)
This patch removes the auerswald USB driver from the linux kernel
2.6.26.
This driver was included into the kernel mainly to connect to the ISDN
framework. This was done in linux 2.4.x. For 2.6.x, due to the fragile
and moving ISDN support, this connection was never realized, and the
only use of this driver was for device configuration. In the age of DSL,
the demand of ISDN support is getting very low.
Meanwhile, with the advent of libusb, an userspace driver was done for
the device configuration which works fine for linux and mac. (Thanks to
the libusb developers!). The userspace driver is downloadable from the
auerswald web site.
So this driver is obsolete now and has to be removed. Many thanks to all
developers which helped me to bring this driver up and working.
Signed-off-by: Wolfgang Muees <wolfgang@iksw-muees.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David S. Miller [Thu, 14 Aug 2008 00:17:52 +0000 (17:17 -0700)]
sparc64: Handle stack trace attempts before irqstacks are setup.
Things like lockdep can try to do stack backtraces before
the irqstack blocks have been setup. So don't try to match
their ranges so early on.
Also, remove unused variable in save_stack_trace().
Signed-off-by: David S. Miller <davem@davemloft.net>
David Howells [Wed, 13 Aug 2008 15:20:04 +0000 (16:20 +0100)]
CRED: Introduce credential access wrappers
The patches that are intended to introduce copy-on-write credentials for 2.6.28
require abstraction of access to some fields of the task structure,
particularly for the case of one task accessing another's credentials where RCU
will have to be observed.
Introduced here are trivial no-op versions of the desired accessors for current
and other tasks so that other subsystems can start to be converted over more
easily.
Wrappers are introduced into a new header (linux/cred.h) for UID/GID,
EUID/EGID, SUID/SGID, FSUID/FSGID, cap_effective and current's subscribed
user_struct. These wrappers are macros because the ordering between header
files mitigates against making them inline functions.
linux/cred.h is #included from linux/sched.h.
Further, XFS is modified such that it no longer defines and uses parameterised
versions of current_fs[ug]id(), thus getting rid of the namespace collision
otherwise incurred.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
Daniel Lezcano [Wed, 13 Aug 2008 23:15:57 +0000 (16:15 -0700)]
netns: Fix crash by making igmp per namespace
This patch makes the multicast socket to be per namespace.
When a network namespace is created, other than the init_net and a
multicast packet is received, the kernel goes to a hang or a kernel panic.
How to reproduce ?
* create a child network namespace
* create a pair virtual device veth
* ip link add type veth
* move one side to the pair network device to the child namespace
* ip link set netns <childpid> dev veth1
* ping -I veth0 224.0.0.1
The bug appears because the function ip_mc_init_dev does not initialize
the different multicast fields as it exits because it is not the init_net.
BUG: soft lockup - CPU#0 stuck for 61s! [avahi-daemon:2695]
Modules linked in:
irq event stamp: 50350
hardirqs last enabled at (50349): [<
c03ee949>] _spin_unlock_irqrestore+0x34/0x39
hardirqs last disabled at (50350): [<
c03ec639>] schedule+0x9f/0x5ff
softirqs last enabled at (45712): [<
c0374d4b>] ip_setsockopt+0x8e7/0x909
softirqs last disabled at (45710): [<
c03ee682>] _spin_lock_bh+0x8/0x27
Pid: 2695, comm: avahi-daemon Not tainted (
2.6.27-rc2-00029-g0872073 #3)
EIP: 0060:[<
c03ee47c>] EFLAGS:
00000297 CPU: 0
EIP is at __read_lock_failed+0x8/0x10
EAX:
c4f38810 EBX:
c4f38810 ECX:
00000000 EDX:
c04cc22e
ESI:
fb0000e0 EDI:
00000011 EBP:
0f02000a ESP:
c4e3faa0
DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
CR0:
8005003b CR2:
44618a40 CR3:
04e37000 CR4:
000006d0
DR0:
00000000 DR1:
00000000 DR2:
00000000 DR3:
00000000
DR6:
ffff0ff0 DR7:
00000400
[<
c02311f8>] ? _raw_read_lock+0x23/0x25
[<
c0390666>] ? ip_check_mc+0x1c/0x83
[<
c036d478>] ? ip_route_input+0x229/0xe92
[<
c022e2e4>] ? trace_hardirqs_on_thunk+0xc/0x10
[<
c0104c9c>] ? do_IRQ+0x69/0x7d
[<
c0102e64>] ? restore_nocheck_notrace+0x0/0xe
[<
c036fdba>] ? ip_rcv+0x227/0x505
[<
c0358764>] ? netif_receive_skb+0xfe/0x2b3
[<
c03588d2>] ? netif_receive_skb+0x26c/0x2b3
[<
c035af31>] ? process_backlog+0x73/0xbd
[<
c035a8cd>] ? net_rx_action+0xc1/0x1ae
[<
c01218a8>] ? __do_softirq+0x7b/0xef
[<
c0121953>] ? do_softirq+0x37/0x4d
[<
c035b50d>] ? dev_queue_xmit+0x3d4/0x40b
[<
c0122037>] ? local_bh_enable+0x96/0xab
[<
c035b50d>] ? dev_queue_xmit+0x3d4/0x40b
[<
c012181e>] ? _local_bh_enable+0x79/0x88
[<
c035fcb8>] ? neigh_resolve_output+0x20f/0x239
[<
c0373118>] ? ip_finish_output+0x1df/0x209
[<
c0373364>] ? ip_dev_loopback_xmit+0x62/0x66
[<
c0371db5>] ? ip_local_out+0x15/0x17
[<
c0372013>] ? ip_push_pending_frames+0x25c/0x2bb
[<
c03891b8>] ? udp_push_pending_frames+0x2bb/0x30e
[<
c038a189>] ? udp_sendmsg+0x413/0x51d
[<
c038a1a9>] ? udp_sendmsg+0x433/0x51d
[<
c038f927>] ? inet_sendmsg+0x35/0x3f
[<
c034f092>] ? sock_sendmsg+0xb8/0xd1
[<
c012d554>] ? autoremove_wake_function+0x0/0x2b
[<
c022e6de>] ? copy_from_user+0x32/0x5e
[<
c022e6de>] ? copy_from_user+0x32/0x5e
[<
c034f238>] ? sys_sendmsg+0x18d/0x1f0
[<
c0175e90>] ? pipe_write+0x3cb/0x3d7
[<
c0170347>] ? do_sync_write+0xbe/0x105
[<
c012d554>] ? autoremove_wake_function+0x0/0x2b
[<
c03503b2>] ? sys_socketcall+0x176/0x1b0
[<
c01085ea>] ? syscall_trace_enter+0x6c/0x7b
[<
c0102e1a>] ? syscall_call+0x7/0xb
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eilon Greenstein [Wed, 13 Aug 2008 22:59:45 +0000 (15:59 -0700)]
bnx2x: Version update
Version update
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eilon Greenstein [Wed, 13 Aug 2008 22:59:25 +0000 (15:59 -0700)]
bnx2x: Checkpatch compliance
Checkpatch compliance
The latest version of checkpatch found the following style errors in the
code
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eilon Greenstein [Wed, 13 Aug 2008 22:59:08 +0000 (15:59 -0700)]
bnx2x: Spelling mistakes
Spelling mistakes
Spelling has to L's in it...
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eilon Greenstein [Wed, 13 Aug 2008 22:58:49 +0000 (15:58 -0700)]
bnx2x: Minor code improvements
Minor code improvements
Small changes to make the code a little bit more efficient and mostly
more readable:
- Using unified macros for EMAC_RD/WR which looks like normal REG_RD/WR
- Removing the NIG_WR since it did nothing and was only confusing
- On bnx2x_panic_dump, print only the used parts of the rings
- define parameters only on the branch they are needed and not at the
beginning of the function
- using NETIF_MSG_INTR and not private BNX2X_MSG_SP for debug prints
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eilon Greenstein [Wed, 13 Aug 2008 22:58:30 +0000 (15:58 -0700)]
bnx2x: Driver info
Driver info
The internal FW which is downloaded by the driver should not be
displayed - it is only causing confusion and it is redundant since it
can be concluded from the driver version. Display only FW which is
burned on the board nvram
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eilon Greenstein [Wed, 13 Aug 2008 22:58:12 +0000 (15:58 -0700)]
bnx2x: 1G LED does not turn off
1G LED does not turn off
The 1G LED was not switched to off when the link was lost
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yaniv Rosner [Wed, 13 Aug 2008 22:57:28 +0000 (15:57 -0700)]
bnx2x: 8073 PHY changes
8073 PHY changes
The initial support we had for this PHY needs some serious changing. The
major change is that this PHY should be initialized only when the first
function is loaded and not for each function. The official SPI-ROM of
this PHY was released and it requires some changes in the initialization
code as well
Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eilon Greenstein [Wed, 13 Aug 2008 22:56:59 +0000 (15:56 -0700)]
bnx2x: Change GPIO for any port
Change GPIO for any port
The set GPIO function should receive the port index to allow changing
the GPIO of another port. This is needed for the common init phase (one
the first driver is loaded for the chip)
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yaniv Rosner [Wed, 13 Aug 2008 22:56:17 +0000 (15:56 -0700)]
bnx2x: Pause settings
Pause settings
- 1G pause was not working due to missing write to the emac block
(TX_MODE_FLOW_EN)
- The flow control should use the negotiated result (after autoneg) so
we should save both the requested autoneg and the result
- The HW credits with flow control at 1G speed were not optimized and
caused low throughput
- It is recommended to turn off flow control if the MTU is bigger than
5000B due to internal buffers size
Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yaniv Rosner [Wed, 13 Aug 2008 22:55:28 +0000 (15:55 -0700)]
bnx2x: Link order with external PHY
Link order with external PHY
When external PHY exists (second chip with the PHY to translate to
another physical medium) the link with the eternal PHY and the network
should be established before setting the link between the 5771x and the
PHY. This is the right order and it is important when using autoneg -
the link to the network should use the autoneg and the link between the
two chips should be forced to the network result.
Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Vladislav Zolotarov [Wed, 13 Aug 2008 22:53:38 +0000 (15:53 -0700)]
bnx2x: No LRO without Rx checksum
No LRO without Rx checksum
Disabling LRO when Rx checksum is disabled
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yitchak Gertner [Wed, 13 Aug 2008 22:53:12 +0000 (15:53 -0700)]
bnx2x: Wrong structure size
Wrong structure size
The wrong structure was used in the sizeof to clear (luckily both
structures have the same size in this version...)
Signed-off-by: Yitchak Gertner <gertner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eilon Greenstein [Wed, 13 Aug 2008 22:52:46 +0000 (15:52 -0700)]
bnx2x: WoL capability
WoL capability
All designs reported WoL capability regardless of HW limitations - check
if this device is actually capable of WoL
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yitchak Gertner [Wed, 13 Aug 2008 22:52:28 +0000 (15:52 -0700)]
bnx2x: Clearing MAC addresses filters
Clearing MAC addresses filters
When the driver unloads, it should clear the MAC addresses filters in
the HW - this prevents packets from entering the chip when the driver is
re-loaded before initializing the right filters
Signed-off-by: Yitchak Gertner <gertner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yitchak Gertner [Wed, 13 Aug 2008 22:52:08 +0000 (15:52 -0700)]
bnx2x: Delay in while loops
Delay in while loops
The delay in the loop should be after the change. This has very little
effect (can save one delay) but it is the right thing to do
Signed-off-by: Yitchak Gertner <gertner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eilon Greenstein [Wed, 13 Aug 2008 22:51:48 +0000 (15:51 -0700)]
bnx2x: PBA Table Page Alignment Workaround
PBA Table Page Alignment Workaround
The PBA table starts on the middle of the page and that's causing very
low performance with virtualization. The solution is not to update via
the BAR directly but via chip access to the same memory
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yitchak Gertner [Wed, 13 Aug 2008 22:51:28 +0000 (15:51 -0700)]
bnx2x: Self-test false positive
Self-test false positive
- The memory test should use a mask according to the chip type
- In the register test, check the port only once and not inside the for
loop (not causing a failure - just ugly)
Signed-off-by: Yitchak Gertner <gertner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eilon Greenstein [Wed, 13 Aug 2008 22:51:07 +0000 (15:51 -0700)]
bnx2x: Memory allocation
Memory allocation
- The CQE ring was allocated to the max size even for a chip that does
not support it. Fixed to allocate according to the chip type to save
memory
- The rx_page_ring was not freed on driver unload
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>