]> bbs.cooldavid.org Git - net-next-2.6.git/log
net-next-2.6.git
14 years agoCAPI: Call a controller 'controller', not 'card'
Jan Kiszka [Mon, 8 Feb 2010 10:12:10 +0000 (10:12 +0000)]
CAPI: Call a controller 'controller', not 'card'

At least for our internal use, fix the misnomers that refer to a CAPI
controller as 'card'. No functional changes.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Reduce chattiness during module loading/removal
Jan Kiszka [Mon, 8 Feb 2010 10:12:09 +0000 (10:12 +0000)]
CAPI: Reduce chattiness during module loading/removal

The CVS revisions dumped by all CAPI modules are meaningless today. And
that some CAPI module is loaded or removed does not necessarily deserve
a message. Just keep the message of the central module, capi.ko, drop
the rest.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Pin capifs instead of mounting it
Jan Kiszka [Mon, 8 Feb 2010 10:12:08 +0000 (10:12 +0000)]
CAPI: Pin capifs instead of mounting it

Auto-mounting the capifs during module init prevents unloading its
module. Instead, pin the filesystem as long as some NCCI node exists.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Eliminate capifs_root variable
Jan Kiszka [Mon, 8 Feb 2010 10:12:07 +0000 (10:12 +0000)]
CAPI: Eliminate capifs_root variable

capifs_mnt->mnt_sb->s_root already contains what we need.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Sanitize capifs API
Jan Kiszka [Mon, 8 Feb 2010 10:12:06 +0000 (10:12 +0000)]
CAPI: Sanitize capifs API

Instead of looking up the dentry of an NCCI node again in
capifs_free_ncci pass the pointer via the capifs user.

This patch also reduces the #ifdef mess in capi.c a bit as far as capifs
was causing it.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Fix leaks in capifs_new_ncci
Jan Kiszka [Mon, 8 Feb 2010 10:12:05 +0000 (10:12 +0000)]
CAPI: Fix leaks in capifs_new_ncci

When something went wrong during capifs_new_ncci, the looked up dentry
was not properly released. Neither was the allocated inode. Refactor the
function to avoid leaks.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoserial: 8250: add serial transmitter fully empty test
Dick Hollenbeck [Wed, 9 Dec 2009 20:31:34 +0000 (12:31 -0800)]
serial: 8250: add serial transmitter fully empty test

When controlling an industrial radio modem it can be necessary to
manipulate the handshake lines in order to control the radio modem's
transmitter, from userspace.

The transmitter should not be turned off before all characters have been
transmitted.  serial8250_tx_empty() was reporting that all characters were
transmitted before they actually were.

===

Discovered in parallel with more testing and analysis by Kees Schoenmakers
as follows:

I ran into an NetMos 9835 serial pci board which behaves a little
different than the standard.  This type of expansion board is very common.

"Standard" 8250 compatible devices clear the 'UART_LST_TEMT" bit together
with the "UART_LSR_THRE" bit when writing data to the device.

The NetMos device does it slightly different

I believe that the TEMT bit is coupled to the shift register.  The problem
is that after writing data to the device and very quickly after that one
does call serial8250_tx_empty, it returns the wrong information.

My patch makes the test more robust (and solves the problem) and it does
not affect the already correct devices.

Alan:

  We may yet need to quirk this but now we know which chips we have a
  way to do that should we find this breaks some other 8250 clone with
  dodgy THRE.

Signed-off-by: Dick Hollenbeck <dick@softplc.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: Kees Schoenmakers <k.schoenmakers@sigmae.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agonet neigh: Decouple per interface neighbour table controls from binary sysctls
Eric W. Biederman [Sun, 14 Feb 2010 03:27:03 +0000 (03:27 +0000)]
net neigh: Decouple per interface neighbour table controls from binary sysctls

Stop computing the number of neighbour table settings we have by
counting the number of binary sysctls.  This behaviour was silly
and meant that we could not add another neighbour table setting
without also adding another binary sysctl.

Don't pass the binary sysctl path for neighour table entries
into neigh_sysctl_register.  These parameters are no longer
used and so are just dead code.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet ipv4: Decouple ipv4 interface parameters from binary sysctl numbers
Eric W. Biederman [Sun, 14 Feb 2010 03:25:51 +0000 (03:25 +0000)]
net ipv4: Decouple ipv4 interface parameters from binary sysctl numbers

Stop using the binary sysctl enumeartion in sysctl.h as an index into
a per interface array.  This leads to unnecessary binary sysctl number
allocation, and a fragility in data structure and implementation
because of unnecessary coupling.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/pcnet32.c: Checkpatch cleaning
Joe Perches [Mon, 15 Feb 2010 08:34:26 +0000 (08:34 +0000)]
drivers/net/pcnet32.c: Checkpatch cleaning

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/pcnet32.c: Use (pr|netdev|netif)_<levels> macro helpers
Joe Perches [Mon, 15 Feb 2010 08:34:25 +0000 (08:34 +0000)]
drivers/net/pcnet32.c: Use (pr|netdev|netif)_<levels> macro helpers

Make the output logging messages a bit more consistent.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/tehuti.c: trivial checkpatch cleanups
Joe Perches [Mon, 15 Feb 2010 08:34:24 +0000 (08:34 +0000)]
drivers/net/tehuti.c: trivial checkpatch cleanups

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/tehuti.c: Hoist assigns out of ifs
Joe Perches [Mon, 15 Feb 2010 08:34:23 +0000 (08:34 +0000)]
drivers/net/tehuti.c: Hoist assigns out of ifs

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/tehuti.c: Use (pr|netdev|netif)_<levels> macro helpers
Joe Perches [Mon, 15 Feb 2010 08:34:22 +0000 (08:34 +0000)]
drivers/net/tehuti.c: Use (pr|netdev|netif)_<levels> macro helpers

Make the output logging messages a bit more consistent.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/sky2: Convert to use netif_printk macros
Joe Perches [Mon, 15 Feb 2010 08:34:21 +0000 (08:34 +0000)]
drivers/net/sky2: Convert to use netif_printk macros

Some unlikely(netif_msg_<foo>(sky2)) tests are also
removed by this change.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/ixgb: Use netif_printk macros
Joe Perches [Mon, 15 Feb 2010 08:34:20 +0000 (08:34 +0000)]
drivers/net/ixgb: Use netif_printk macros

Convert private DPRINTK macro uses to netif_<level> equivalents
Remove #define DPRINTK

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoclass: Free the class private data in class_release
Laurent Pinchart [Wed, 10 Feb 2010 12:32:49 +0000 (13:32 +0100)]
class: Free the class private data in class_release

Fix a memory leak by freeing the memory allocated in __class_register
for the class private data.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agosysfs: sysfs_sd_setattr set iattrs unconditionally
Eric W. Biederman [Thu, 4 Feb 2010 07:13:24 +0000 (23:13 -0800)]
sysfs: sysfs_sd_setattr set iattrs unconditionally

There is currently a bug in sysfs_sd_setattr inherited from
sysfs_setattr in 2.6.32 where the first time we set the attributes
on a sysfs file we allocate backing store but do not set the
backing store attributes.  Resulting in overly restrictive
permissions on sysfs files.

The fix is to simply modify the code so that it always executes
when we update the sysfs attributes, as we did in 2.6.31 and earlier.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Tested-by: Jean Delvare <khali@linux-fr.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agosparc64: Kill bogus ip_tables.h include.
David S. Miller [Tue, 16 Feb 2010 23:23:23 +0000 (15:23 -0800)]
sparc64: Kill bogus ip_tables.h include.

Fixes the following build failure:

  CC      arch/sparc/kernel/sys_sparc32.o
In file included from include/linux/netfilter_ipv4/ip_tables.h:28,
                 from arch/sparc/kernel/sys_sparc32.c:46:
include/linux/netfilter/x_tables.h:525: error: expected declaration specifiers or ‘...’ before ‘nf_hookfn’

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2: Update firmwares and update version to 2.0.8.
Michael Chan [Tue, 16 Feb 2010 23:19:42 +0000 (15:19 -0800)]
bnx2: Update firmwares and update version to 2.0.8.

- Increase FTQ depth to 256 to ehnabce performance.
- Fix RV2P context corruption on 5709 when flow control is enabled.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2: Fix bug when saving statistics.
Patrick Rabau [Mon, 15 Feb 2010 19:42:11 +0000 (19:42 +0000)]
bnx2: Fix bug when saving statistics.

This fixes the problem of dropping the carry when adding 2 32-bit values.
Switch to use array indexing for better readability.

Reported by and fix provided by Patrick Rabau.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2: Allow user-specified multiple advertisement speed values.
Michael Chan [Mon, 15 Feb 2010 19:42:10 +0000 (19:42 +0000)]
bnx2: Allow user-specified multiple advertisement speed values.

Remove unnecessary code that works around older versions of ethtool
that can pass down invalid advertisement speed values.  This old
code prevents the user from specifying multiple advertisement values.
The new code uses simple masking to mask out invalid advertisment bits.

Reported-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2: Adjust flow control water marks.
Michael Chan [Mon, 15 Feb 2010 19:42:09 +0000 (19:42 +0000)]
bnx2: Adjust flow control water marks.

The current water marks are too high and can cause unnecessary flow
control frames.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2: Need to call cnic_setup_cnic_irq_info() after MTU change.
Michael Chan [Mon, 15 Feb 2010 19:42:08 +0000 (19:42 +0000)]
bnx2: Need to call cnic_setup_cnic_irq_info() after MTU change.

New status blocks are allocated during MTU change so we need to
update this information for the cnic driver.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2: Check BNX2_FLAG_USING_MSIX flag when setting up MSIX.
Michael Chan [Mon, 15 Feb 2010 19:42:07 +0000 (19:42 +0000)]
bnx2: Check BNX2_FLAG_USING_MSIX flag when setting up MSIX.

Checking the flag is more correct than checking bp->irq_nvecs. By
accident it is not a problem because we always have more than 1
vectors when using MSIX mode.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoatl1c: Add support for Atheros AR8152 and AR8152
Luis R. Rodriguez [Tue, 16 Feb 2010 23:16:45 +0000 (15:16 -0800)]
atl1c: Add support for Atheros AR8152 and AR8152

AR8151 is a Gigabit Ethernet device. AR8152 devices are
Fast Ethernet devices, there are two revisions, a 1.0
and a 2.0 revision.

This has been tested against these devices:

Driver Model-name vendor:device Type
atl1c  AR8131 1969:1063 Gigabit Ethernet
atl1c AR8132 1969:1062 Fast Ethernet
atl1c AR8151(v1.0) 1969:1073 Gigabit Ethernet
atl1c AR8152(v1.1) 1969:2060 Fast Ethernet

This device has no hardware available yet so it goes untested,
but it should work:

atl1c AR8152(v2.0) 1969:2062 Fast Ethernet

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoUSB: gadget: fix EEM gadget CRC usage
Brian Niebuhr [Mon, 25 Jan 2010 20:45:40 +0000 (14:45 -0600)]
USB: gadget: fix EEM gadget CRC usage

eem_wrap() is sending a sentinel CRC, but it didn't indicate that to
the host, it should zero bit 14 (bmCRC) in the EEM packet header,
instead of setting it.

Also remove a redundant crc calculation in eem_unwrap().

Signed-off-by: Steve Longerbeam <stevel@netspectrum.com>
Acked-by: Brian Niebuhr <bniebuhr@efjohnson.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: otg Kconfig: let USB_OTG_UTILS select USB_ULPI option
Valentin Longchamp [Wed, 20 Jan 2010 19:06:31 +0000 (20:06 +0100)]
USB: otg Kconfig: let USB_OTG_UTILS select USB_ULPI option

With CONFIG_USB_ULPI=y, CONFIG_USB<=m, CONFIG_PCI=n and
CONFIG_USB_OTG_UTILS=n, which is the default used for mx31moboard,
the build for all mx3 platforms fails because drivers/usb/otg/ulpi.c
where otg_ulpi_create is defined is not compiled.

Build error:
arch/arm/mach-mx3/built-in.o: In function `mxc_board_init':
kzmarm11.c:(.init.text+0x73c): undefined reference to `otg_ulpi_create'
kzmarm11.c:(.init.text+0x1020): undefined reference to `otg_ulpi_create'

This isn't a strong dependency as drivers/usb/otg/ulpi.c doesn't
use functions defined in drivers/usb/otg/otg.o and is only needed
to get ulpi.o linked into the kernel image.

Signed-off-by: Valentin Longchamp <valentin.longchamp@epfl.ch>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: g_multi: fix CONFIG_USB_G_MULTI_RNDIS usage
Michal Nazarewicz [Fri, 22 Jan 2010 14:18:21 +0000 (15:18 +0100)]
USB: g_multi: fix CONFIG_USB_G_MULTI_RNDIS usage

g_multi used CONFIG_USB_ETH_RNDIS to check if RNDIS option was requested
where it should check for CONFIG_USB_G_MULTI_RNDIS.  As a result, RNDIS
was never present in g_multi regardless of configuration.

This fixes changes made in commit 396cda90d228d0851f3d64c7c85a1ecf6b8ae1e8.

Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agokfifo: Don't use integer as NULL pointer
Anton Vorontsov [Wed, 27 Jan 2010 14:09:38 +0000 (17:09 +0300)]
kfifo: Don't use integer as NULL pointer

This patch fixes following sparse warnings:

include/linux/kfifo.h:127:25: warning: Using plain integer as NULL pointer
kernel/kfifo.c:83:21: warning: Using plain integer as NULL pointer

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Stefani Seibold <stefani@seibold.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: FHCI: Fix build after kfifo rework
Anton Vorontsov [Wed, 27 Jan 2010 14:09:36 +0000 (17:09 +0300)]
USB: FHCI: Fix build after kfifo rework

After kfifo rework FHCI fails to build:

  CC      drivers/usb/host/fhci-tds.o
drivers/usb/host/fhci-tds.c: In function 'fhci_ep0_free':
drivers/usb/host/fhci-tds.c:108: error: used struct type value where scalar is required
drivers/usb/host/fhci-tds.c:118: error: used struct type value where scalar is required
drivers/usb/host/fhci-tds.c:128: error: used struct type value where scalar is required

This is because kfifos are no longer pointers in the ep struct.
So, instead of checking the pointers, we should now check if kfifo
is initialized.

Reported-by: Josh Boyer <jwboyer@gmail.com>
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Stefani Seibold <stefani@seibold.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agokfifo: Make kfifo_initialized work after kfifo_free
Anton Vorontsov [Wed, 27 Jan 2010 14:09:34 +0000 (17:09 +0300)]
kfifo: Make kfifo_initialized work after kfifo_free

After kfifo rework it's no longer possible to reliably know if kfifo is
usable, since after kfifo_free(), kfifo_initialized() would still return
true. The correct behaviour is needed for at least FHCI USB driver.

This patch fixes the issue by resetting the kfifo to zero values (the
same approach is used in kfifo_alloc() if allocation failed).

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Stefani Seibold <stefani@seibold.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: add usbid for dell wwan card to sierra.c
Richard Farina [Wed, 20 Jan 2010 21:42:33 +0000 (16:42 -0500)]
USB: serial: add usbid for dell wwan card to sierra.c

This patch adds support for Dell Computer Corp. Wireless 5720 VZW Mobile
Broadband (EVDO Rev-A) Minicard GPS Port.  I stole the name from lsusb,
but my card does not have a GPS on it (at least not that I can make
function). I'm sure the patch is whitespace damaged but the one line
addition should be fairly straightforward nonetheless.

Tested-by: Rick Farina <sidhayn@gmail.com>
Signed-off-by: Rick Farina <sidhayn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: SIS USB2VGA DRIVER: support KAIREN's USB VGA adaptor USB20SVGA-MB-PLUS
Tanaka Akira [Wed, 20 Jan 2010 17:31:09 +0000 (02:31 +0900)]
USB: SIS USB2VGA DRIVER: support KAIREN's USB VGA adaptor USB20SVGA-MB-PLUS

This patch adds the USB product ID of KAIREN's USB VGA Adaptor,
USB20SVGA-MB-PLUS, to sisusbvga work with it.

Signed-off-by: Tanaka Akira <akr@fsij.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ehci: phy low power mode bug fixing
Alek Du [Tue, 19 Jan 2010 08:31:31 +0000 (16:31 +0800)]
USB: ehci: phy low power mode bug fixing

1. There are two msleep calls inside two spin lock sections, need to unlock
   and lock again after msleep.
2. Save a extra status reg setting.

Signed-off-by: Alek Du <alek.du@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: s3c-hsotg: Export usb_gadget_register_driver()
Mark Brown [Mon, 18 Jan 2010 13:18:34 +0000 (13:18 +0000)]
USB: s3c-hsotg: Export usb_gadget_register_driver()

USB gadget controller drivers normally export their driver registration
function, allowing modular builds of the individual gadget drivers so
do so for s3c-hsotg, fixing builds.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: r8a66597-udc: Prototype IS_ERR() and PTR_ERR()
Mark Brown [Mon, 18 Jan 2010 12:03:18 +0000 (12:03 +0000)]
USB: r8a66597-udc: Prototype IS_ERR() and PTR_ERR()

The build of r8a66597-udc was failing on ARM since IS_ERR() and
PTR_ERR() weren't protyped.  Presumably err.h is being pulled in by
another header on other platforms.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ftdi_sio: add device IDs (several ELV, one Mindstorms NXT)
Andreas Mohr [Sun, 17 Jan 2010 10:45:38 +0000 (11:45 +0100)]
USB: ftdi_sio: add device IDs (several ELV, one Mindstorms NXT)

- add FTDI device IDs for several ELV devices and NXTCam of Lego Mindstorms NXT
- add hopefully helpful new_id comment
- remove less helpful "Due to many user requests for multiple ELV devices we enable
  them by default." comment (we simply add _all_ known devices - an
  enduser shouldn't have to fiddle with obscure module parameters...).
- add myself to DRIVER_AUTHOR

The missing NXTCam ID has been found at
http://www.unixboard.de/vb3/showthread.php?t=44155
, ELV devices taken from ELV Windows .inf file.

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: storage: Remove unneeded SC/PR from unusual_devs.h
Phil Dibowitz [Sat, 16 Jan 2010 18:52:17 +0000 (19:52 +0100)]
USB: storage: Remove unneeded SC/PR from unusual_devs.h

This patch removes the subclass and protocol entries from a Microtech
entry in unusual_devs.h. This was reported by <ryck@pacbell.net>.

Greg, please apply.

Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ftdi_sio: new device id for papouch AD4USB
Radek Liboska [Wed, 27 Jan 2010 14:38:34 +0000 (15:38 +0100)]
USB: ftdi_sio: new device id for papouch AD4USB

added new device pid (PAPOUCH_AD4USB_PID) to ftdi_sio.h and ftdi_sio.c

AD4USB measuring converter is a 4-input A/D converter which enables the
user to measure to four current inputs ranging from 0(4) to 20 mA or
voltage between 0 and 10 V. The measured values are then transferred to
a superior system in digital form. The AD4USB communicates via USB.
Powered is also via USB.  datasheet in english is here:
http://www.papouch.com/shop/scripts/pdf/ad4usb_en.pdf

Signed-off-by: Radek Liboska <liboska@uochb.cas.cz>
14 years agoUSB: usbfs: properly clean up the as structure on error paths
Linus Torvalds [Tue, 16 Feb 2010 20:35:07 +0000 (12:35 -0800)]
USB: usbfs: properly clean up the as structure on error paths

I notice that the processcompl_compat() function seems to be leaking the
'struct async *as' in the error paths.

I think that the calling convention is fundamentally buggered. The
caller is the one that did the "reap_as()" to get the as thing, the
caller should be the one to free it too.

Freeing it in the caller also means that it very clearly always gets
freed, and avoids the need for any "free in the error case too".

From: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Marcus Meissner <meissner@suse.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: usbfs: only copy the actual data received
Greg KH [Mon, 15 Feb 2010 17:37:46 +0000 (09:37 -0800)]
USB: usbfs: only copy the actual data received

We need to only copy the data received by the device to userspace, not
the whole kernel buffer, which can contain "stale" data.

Thanks to Marcus Meissner for pointing this out and testing the fix.

Reported-by: Marcus Meissner <meissner@suse.de>
Tested-by: Marcus Meissner <meissner@suse.de>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotunnels: fix netns vs proto registration ordering
Alexey Dobriyan [Tue, 16 Feb 2010 09:05:04 +0000 (09:05 +0000)]
tunnels: fix netns vs proto registration ordering

Same stuff as in ip_gre patch: receive hook can be called before netns
setup is done, oopsing in net_generic().

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogre: fix netns vs proto registration ordering
Alexey Dobriyan [Tue, 16 Feb 2010 07:57:44 +0000 (07:57 +0000)]
gre: fix netns vs proto registration ordering

GRE protocol receive hook can be called right after protocol addition is done.
If netns stuff is not yet initialized, we're going to oops in
net_generic().

This is remotely oopsable if ip_gre is compiled as module and packet
comes at unfortunate moment of module loading.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: set proper value to version field in req hdr
Ajit Khaparde [Tue, 16 Feb 2010 00:18:46 +0000 (00:18 +0000)]
be2net: set proper value to version field in req hdr

Before sending a command to the ASIC, set version properly.
This is necessary for the ARM firmware to send correct data to the driver.
This also fixes a bug in certain skews of the ASIC where the statistics
are misreported.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoxfrm: Fix xfrm_state_clone leak
Herbert Xu [Mon, 15 Feb 2010 20:00:51 +0000 (20:00 +0000)]
xfrm: Fix xfrm_state_clone leak

xfrm_state_clone calls kfree instead of xfrm_state_put to free
a failed state.  Depending on the state of the failed state, it
can cause leaks to things like module references.

All states should be freed by xfrm_state_put past the point of
xfrm_init_state.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipcomp: Avoid duplicate calls to ipcomp_destroy
Herbert Xu [Mon, 15 Feb 2010 19:24:30 +0000 (19:24 +0000)]
ipcomp: Avoid duplicate calls to ipcomp_destroy

When ipcomp_tunnel_attach fails we will call ipcomp_destroy twice.
This may lead to double-frees on certain structures.

As there is no reason to explicitly call ipcomp_destroy, this patch
removes it from ipcomp*.c and lets the standard xfrm_state destruction
take place.

This is based on the discovery and patch by Alexey Dobriyan.

Tested-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoethtool: allow non-admin user to read GRO settings.
stephen hemminger [Thu, 11 Feb 2010 13:48:29 +0000 (13:48 +0000)]
ethtool: allow non-admin user to read GRO settings.

Looks like an oversight in GRO design.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm
Linus Torvalds [Tue, 16 Feb 2010 20:22:15 +0000 (12:22 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm

* git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm:
  dm: sysfs revert add empty release function to avoid debug warning
  dm mpath: fix stall when requeueing io
  dm raid1: fix null pointer dereference in suspend
  dm raid1: fail writes if errors are not handled and log fails
  dm log: userspace fix overhead_size calcuations
  dm snapshot: persistent annotate work_queue as on stack
  dm stripe: avoid divide by zero with invalid stripe count

14 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Tue, 16 Feb 2010 19:59:01 +0000 (11:59 -0800)]
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] preserve personality flag bits across exec

14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
David S. Miller [Tue, 16 Feb 2010 19:15:13 +0000 (11:15 -0800)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6

14 years agodm: sysfs revert add empty release function to avoid debug warning
Alasdair G Kergon [Tue, 16 Feb 2010 18:43:04 +0000 (18:43 +0000)]
dm: sysfs revert add empty release function to avoid debug warning

Revert commit d2bb7df8cac647b92f51fb84ae735771e7adbfa7 at Greg's request.

    Author: Milan Broz <mbroz@redhat.com>
    Date:   Thu Dec 10 23:51:53 2009 +0000

    dm: sysfs add empty release function to avoid debug warning

    This patch just removes an unnecessary warning:
     kobject: 'dm': does not have a release() function,
     it is broken and must be fixed.

    The kobject is embedded in mapped device struct, so
    code does not need to release memory explicitly here.

Cc: Greg KH <gregkh@suse.de>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
14 years agodm mpath: fix stall when requeueing io
Kiyoshi Ueda [Tue, 16 Feb 2010 18:43:01 +0000 (18:43 +0000)]
dm mpath: fix stall when requeueing io

This patch fixes the problem that system may stall if target's ->map_rq
returns DM_MAPIO_REQUEUE in map_request().
E.g. stall happens on 1 CPU box when a dm-mpath device with queue_if_no_path
     bounces between all-paths-down and paths-up on I/O load.

When target's ->map_rq returns DM_MAPIO_REQUEUE, map_request() requeues
the request and returns to dm_request_fn().  Then, dm_request_fn()
doesn't exit the I/O dispatching loop and continues processing
the requeued request again.
This map and requeue loop can be done with interrupt disabled,
so 1 CPU system can be stalled if this situation happens.

For example, commands below can stall my 1 CPU box within 1 minute or so:
  # dmsetup table mp
  mp: 0 2097152 multipath 1 queue_if_no_path 0 1 1 service-time 0 1 2 8:144 1 1
  # while true; do dd if=/dev/mapper/mp of=/dev/null bs=1M count=100; done &
  # while true; do \
  > dmsetup message mp 0 "fail_path 8:144" \
  > dmsetup suspend --noflush mp \
  > dmsetup resume mp \
  > dmsetup message mp 0 "reinstate_path 8:144" \
  > done

To fix the problem above, this patch changes dm_request_fn() to exit
the I/O dispatching loop once if a request is requeued in map_request().

Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Cc: stable@kernel.org
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
14 years agodm raid1: fix null pointer dereference in suspend
Takahiro Yasui [Tue, 16 Feb 2010 18:42:58 +0000 (18:42 +0000)]
dm raid1: fix null pointer dereference in suspend

When suspending a failed mirror, bios are completed by mirror_end_io() and
__rh_lookup() in dm_rh_dec() returns NULL where a non-NULL return value is
required by design.  Fix this by not changing the state of the recovery failed
region from DM_RH_RECOVERING to DM_RH_NOSYNC in dm_rh_recovery_end().

Issue

On 2.6.33-rc1 kernel, I hit the bug when I suspended the failed
mirror by dmsetup command.

BUG: unable to handle kernel NULL pointer dereference at 00000020
IP: [<f94f38e2>] dm_rh_dec+0x35/0xa1 [dm_region_hash]
...
EIP: 0060:[<f94f38e2>] EFLAGS: 00010046 CPU: 0
EIP is at dm_rh_dec+0x35/0xa1 [dm_region_hash]
EAX: 00000286 EBX: 00000000 ECX: 00000286 EDX: 00000000
ESI: eff79eac EDI: eff79e80 EBP: f6915cd4 ESP: f6915cc4
 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process dmsetup (pid: 2849, ti=f6914000 task=eff03e80 task.ti=f6914000)
 ...
Call Trace:
 [<f9530af6>] ? mirror_end_io+0x53/0x1b1 [dm_mirror]
 [<f9413104>] ? clone_endio+0x4d/0xa2 [dm_mod]
 [<f9530aa3>] ? mirror_end_io+0x0/0x1b1 [dm_mirror]
 [<f94130b7>] ? clone_endio+0x0/0xa2 [dm_mod]
 [<c02d6bcb>] ? bio_endio+0x28/0x2b
 [<f952f303>] ? hold_bio+0x2d/0x62 [dm_mirror]
 [<f952f942>] ? mirror_presuspend+0xeb/0xf7 [dm_mirror]
 [<c02aa3e2>] ? vmap_page_range+0xb/0xd
 [<f9414c8d>] ? suspend_targets+0x2d/0x3b [dm_mod]
 [<f9414ca9>] ? dm_table_presuspend_targets+0xe/0x10 [dm_mod]
 [<f941456f>] ? dm_suspend+0x4d/0x150 [dm_mod]
 [<f941767d>] ? dev_suspend+0x55/0x18a [dm_mod]
 [<c0343762>] ? _copy_from_user+0x42/0x56
 [<f9417fb0>] ? dm_ctl_ioctl+0x22c/0x281 [dm_mod]
 [<f9417628>] ? dev_suspend+0x0/0x18a [dm_mod]
 [<f9417d84>] ? dm_ctl_ioctl+0x0/0x281 [dm_mod]
 [<c02c3c4b>] ? vfs_ioctl+0x22/0x85
 [<c02c422c>] ? do_vfs_ioctl+0x4cb/0x516
 [<c02c42b7>] ? sys_ioctl+0x40/0x5a
 [<c0202858>] ? sysenter_do_call+0x12/0x28

Analysis

When recovery process of a region failed, dm_rh_recovery_end() function
changes the state of the region from RM_RH_RECOVERING to DM_RH_NOSYNC.
When recovery_complete() is executed between dm_rh_update_states() and
dm_writes() in do_mirror(), bios are processed with the region state,
DM_RH_NOSYNC. However, the region data is freed without checking its
pending count when dm_rh_update_states() is called next time.

When bios are finished by mirror_end_io(), __rh_lookup() in dm_rh_dec()
returns NULL even though a valid return value are expected.

Solution

Remove the state change of the recovery failed region from DM_RH_RECOVERING
to DM_RH_NOSYNC in dm_rh_recovery_end(). We can remove the state change
because:

  - If the region data has been released by dm_rh_update_states(),
    a new region data is created with the state of DM_RH_NOSYNC, and
    bios are processed according to the DM_RH_NOSYNC state.

  - If the region data has not been released by dm_rh_update_states(),
    a state of the region is DM_RH_RECOVERING and bios are put in the
    delayed_bio list.

The flag change from DM_RH_RECOVERING to DM_RH_NOSYNC in dm_rh_recovery_end()
was added in the following commit:
  dm raid1: handle resync failures
  author  Jonathan Brassow <jbrassow@redhat.com>
    Thu, 12 Jul 2007 16:29:04 +0000 (17:29 +0100)
  http://git.kernel.org/linus/f44db678edcc6f4c2779ac43f63f0b9dfa28b724

Signed-off-by: Takahiro Yasui <tyasui@redhat.com>
Reviewed-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
14 years agodm raid1: fail writes if errors are not handled and log fails
Mikulas Patocka [Tue, 16 Feb 2010 18:42:55 +0000 (18:42 +0000)]
dm raid1: fail writes if errors are not handled and log fails

If the mirror log fails when the handle_errors option was not selected
and there is no remaining valid mirror leg, writes return success even
though they weren't actually written to any device.  This patch
completes them with EIO instead.

This code path is taken:
do_writes:
bio_list_merge(&ms->failures, &sync);
do_failures:
if (!get_valid_mirror(ms)) (false)
else if (errors_handled(ms)) (false)
else bio_endio(bio, 0);

The logic in do_failures is based on presuming that the write was already
tried: if it succeeded at least on one leg (without handle_errors) it
is reported as success.

Reference: https://bugzilla.redhat.com/show_bug.cgi?id=555197

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
14 years agodm log: userspace fix overhead_size calcuations
Jonathan Brassow [Tue, 16 Feb 2010 18:42:53 +0000 (18:42 +0000)]
dm log: userspace fix overhead_size calcuations

This patch fixes two bugs that revolve around the miscalculation and
misuse of the variable 'overhead_size'.  'overhead_size' is the size of
the various header structures used during communication.

The first bug is the use of 'sizeof' with the pointer of a structure
instead of the structure itself - resulting in the wrong size being
computed.  This is then used in a check to see if the payload
(data_size) would be to large for the preallocated structure.  Since the
bug produces a smaller value for the overhead, it was possible for the
structure to be breached.  (Although the current users of the code do
not currently send enough data to trigger this bug.)

The second bug is that the 'overhead_size' value is used to compute how
much of the preallocated space should be cleared before populating it
with fresh data.  This should have simply been 'sizeof(struct cn_msg)'
not overhead_size.  The fact that 'overhead_size' was computed
incorrectly made this problem "less bad" - leaving only a pointer's
worth of space at the end uncleared.  Thus, this bug was never producing
a bad result, but still needs to be fixed - especially now that the
value is computed correctly.

Cc: stable@kernel.org
Signed-off-by: Jonathan Brassow <jbrassow@redhat.com
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
14 years agodm snapshot: persistent annotate work_queue as on stack
Mike Snitzer [Tue, 16 Feb 2010 18:42:51 +0000 (18:42 +0000)]
dm snapshot: persistent annotate work_queue as on stack

chunk_io() declares its 'struct mdata_req' on the stack and then
initializes its 'struct work_struct' member.  Annotate the
initialization of this workqueue with INIT_WORK_ON_STACK to suppress a
debugobjects warning seen when CONFIG_DEBUG_OBJECTS_WORK is enabled.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
14 years agodm stripe: avoid divide by zero with invalid stripe count
Nikanth Karthikesan [Tue, 16 Feb 2010 18:42:47 +0000 (18:42 +0000)]
dm stripe: avoid divide by zero with invalid stripe count

If a table containing zero as stripe count is passed into stripe_ctr
the code attempts to divide by zero.

This patch changes DM_TABLE_LOAD to return -EINVAL if the stripe count
is zero.

We now get the following error messages:
  device-mapper: table: 253:0: striped: Invalid stripe count
  device-mapper: ioctl: error adding target to table

Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>
Cc: stable@kernel.org
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
14 years agox86: ELF_PLAT_INIT() shouldn't worry about TIF_IA32
Oleg Nesterov [Tue, 16 Feb 2010 14:24:01 +0000 (15:24 +0100)]
x86: ELF_PLAT_INIT() shouldn't worry about TIF_IA32

The 64-bit version of ELF_PLAT_INIT() clears TIF_IA32, but at this point
it has already been cleared by SET_PERSONALITY == set_personality_64bit.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agox86: set_personality_ia32() misses force_personality32
Oleg Nesterov [Tue, 16 Feb 2010 14:02:13 +0000 (15:02 +0100)]
x86: set_personality_ia32() misses force_personality32

05d43ed8a "x86: get rid of the insane TIF_ABI_PENDING bit" forgot about
force_personality32.  Fix.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoixgbe: fix WOL register setup for 82599
Don Skidmore [Thu, 11 Feb 2010 04:14:08 +0000 (04:14 +0000)]
ixgbe: fix WOL register setup for 82599

We need to have the WUS register set to all 1's in order for the hardware
to be capable of ever waking up.  Set it here in the ixgbe_probe().

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: Fix - Do not allow Rx FC on 82598 at 1G due to errata
Don Skidmore [Thu, 11 Feb 2010 04:13:49 +0000 (04:13 +0000)]
ixgbe: Fix - Do not allow Rx FC on 82598 at 1G due to errata

The 82598 has an erratum that receipt of pause frames at 1G
could lead to a Tx Hang.  To avoid this this patch disables
Rx FC while at 1G speed for all 82598 parts.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoethtool: reduce stack usage
Eric Dumazet [Tue, 16 Feb 2010 05:51:33 +0000 (21:51 -0800)]
ethtool: reduce stack usage

dev_ethtool() is currently using 604 bytes of stack, even with gcc-4.4.2

objdump -d vmlinux | scripts/checkstack.pl
...
0xc04bbc33 dev_ethtool [vmlinux]: 604
...
Adding noinline attributes to selected functions can reduce stack usage.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: emaclite: adding MDIO and phy lib support
John Linn [Tue, 16 Feb 2010 05:51:00 +0000 (21:51 -0800)]
net: emaclite: adding MDIO and phy lib support

These changes add MDIO and phy lib support to the driver as the
IP core now supports the MDIO bus.

The MDIO bus and phy are added as a child to the emaclite in the device
tree as illustrated below.

mdio {
#address-cells = <1>;
#size-cells = <0>;
phy0: phy@7 {
compatible = "marvell,88e1111";
reg = <7>;
} ;
}

Signed-off-by: Sadanand Mutyala <Sadanand.Mutyala@xilinx.com>
Signed-off-by: John Linn <john.linn@xilinx.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoX25: Dont let x25_bind use addresses containing characters
andrew hendry [Sun, 14 Feb 2010 02:00:45 +0000 (02:00 +0000)]
X25: Dont let x25_bind use addresses containing characters

Addresses should be all digits.
Stops x25_bind using addresses containing characters.

Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoX25: Fix x25_create errors for bad protocol and ENOBUFS
andrew hendry [Sun, 14 Feb 2010 02:00:11 +0000 (02:00 +0000)]
X25: Fix x25_create errors for bad protocol and ENOBUFS

alloc_socket failures should return -ENOBUFS
a bad protocol should return -EINVAL

Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: implement EEH pci error recovery handlers
Sathya Perla [Sun, 14 Feb 2010 21:22:01 +0000 (21:22 +0000)]
be2net: implement EEH pci error recovery handlers

The code has been tested on IBM pSeries server.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoxfrm: Flushing empty SPD generates false events
jamal [Thu, 11 Feb 2010 00:53:13 +0000 (00:53 +0000)]
xfrm: Flushing empty SPD generates false events

Observed similar behavior on SPD as previouly seen on SAD flushing..
This fixes it.

cheers,
jamal
commit 428b20432dc31bc2e01a94cd451cf5a2c00d2bf4
Author: Jamal Hadi Salim <hadi@cyberus.ca>
Date:   Thu Feb 11 05:49:38 2010 -0500

    xfrm: Flushing empty SPD generates false events

    To see the effect make sure you have an empty SPD.
    On window1 "ip xfrm mon" and on window2 issue "ip xfrm policy flush"
    You get prompt back in window1 and you see the flush event on window2.
    With this fix, you still get prompt on window1 but no event on window2.

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoxfrm: Flushing empty SAD generates false events
jamal [Wed, 10 Feb 2010 23:51:27 +0000 (23:51 +0000)]
xfrm: Flushing empty SAD generates false events

To see the effect make sure you have an empty SAD.
-On window1 "ip xfrm mon"
-on window2 issue "ip xfrm state flush"
You get prompt back in window1
and you see the flush event on window2.
With this fix, you still get prompt on window1 but no
event on window2.

I was tempted to return -ESRCH on window1 (which would
show "RTNETLINK answers: No such process") but didnt want
to change current behavior.

cheers,
jamal
commit 5f3dd4a772326166e1bcf54acc2391df00dc7ab5
Author: Jamal Hadi Salim <hadi@cyberus.ca>
Date:   Thu Feb 11 04:41:36 2010 -0500

    xfrm: Flushing empty SAD generates false events

    To see the effect make sure you have an empty SAD.
    On window1 "ip xfrm mon" and on window2 issue "ip xfrm state flush"
    You get prompt back in window1 and you see the flush event on window2.
    With this fix, you still get prompt on window1 but no event on window2.

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoIPv6: Delete redundant counter of IPSTATS_MIB_REASMFAILS
Shan Wei [Thu, 11 Feb 2010 00:12:45 +0000 (00:12 +0000)]
IPv6: Delete redundant counter of IPSTATS_MIB_REASMFAILS

When no more memory can be allocated, fq_find() will return NULL and
increase the value of IPSTATS_MIB_REASMFAILS. In this case,
ipv6_frag_rcv() also increase the value of IPSTATS_MIB_REASMFAILS.

So, the patch deletes redundant counter of IPSTATS_MIB_REASMFAILS in fq_find().
and deletes the unused parameter of idev.

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/macvtap: fix reference counting
Arnd Bergmann [Thu, 11 Feb 2010 05:55:39 +0000 (05:55 +0000)]
net/macvtap: fix reference counting

The RCU usage in the original code was broken because
there are cases where we possibly sleep with rcu_read_lock
held. As a fix, change the macvtap_file_get_queue to
get a reference on the socket and the netdev instead of
taking the full rcu_read_lock.

Also, change macvtap_file_get_queue failure case to
not require a subsequent macvtap_file_put_queue, as
pointed out by Ed Swierk.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Ed Swierk <eswierk@aristanetworks.com>
Cc: Sridhar Samudrala <sri@us.ibm.com>
Acked-by: Sridhar Samudrala <sri@us.ibm.com>
Acked-by: Ed Swierk <eswierk@aristanetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocxgb3: fix link flap
Divy Le Ray [Sat, 13 Feb 2010 09:44:35 +0000 (09:44 +0000)]
cxgb3: fix link flap

The driver is expected to report that the link is up
when the phy Rx signal is established and the mac
has not detected a link fault.
The code is however broken, the driver does not check the link fault
status when the phy link status changes.
The link fault status being checked within a short period of time,
it leads to link up/link down events.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocxgb3: FIx VLAN over Jumbo frames
Divy Le Ray [Sat, 13 Feb 2010 09:44:30 +0000 (09:44 +0000)]
cxgb3: FIx VLAN over Jumbo frames

The mac is expected to auto-inflate the Maximum Frame size for VLAN
tagged frames. It however does not work with jumbo frames.
Work around the bug adding 4 to the Maximum Frame for MTUs
greater than 1536.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: Cleanup incorrect header comments
Peter Waskiewicz [Fri, 12 Feb 2010 13:48:44 +0000 (13:48 +0000)]
ixgbe: Cleanup incorrect header comments

The recent n-tuple patches added some comments to the headers
of the Flow Director functions that aren't accurate.  This
cleans them up, and is a purely cosmetic patch.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoethtool: Move n-tuple capability check into set_flags
Peter Waskiewicz [Fri, 12 Feb 2010 13:48:25 +0000 (13:48 +0000)]
ethtool: Move n-tuple capability check into set_flags

set_flags should check if the underlying device supports
n-tuple filter programming before setting the device flags
on the netdevice.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoethtool: Fix filter addition when caching n-tuple filters
Peter Waskiewicz [Fri, 12 Feb 2010 13:48:05 +0000 (13:48 +0000)]
ethtool: Fix filter addition when caching n-tuple filters

We can allow a filter to be added successfully to the underlying
hardware, but still return an error if the cached list memory
allocation fails.  This patch fixes that condition.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
Linus Torvalds [Tue, 16 Feb 2010 03:56:21 +0000 (19:56 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable

* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
  Btrfs: btrfs_mark_extent_written uses the wrong slot

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
Linus Torvalds [Tue, 16 Feb 2010 03:54:54 +0000 (19:54 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  firewire: ohci: retransmit isochronous transmit packets on cycle loss
  firewire: net: fix panic in fwnet_write_complete

14 years agoMerge branch 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Tue, 16 Feb 2010 03:54:18 +0000 (19:54 -0800)]
Merge branch 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6

* 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Correct ASUA blacklist for MSI brokenness

14 years agoNFS: Too many GETATTR and ACCESS calls after direct I/O
Chuck Lever [Mon, 15 Feb 2010 17:19:53 +0000 (12:19 -0500)]
NFS: Too many GETATTR and ACCESS calls after direct I/O

The cached read and write paths initialize fattr->time_start in their
setup procedures.  The value of fattr->time_start is propagated to
read_cache_jiffies by nfs_update_inode().  Subsequent calls to
nfs_attribute_timeout() will then use a good time stamp when
computing the attribute cache timeout, and squelch unneeded GETATTR
calls.

Since the direct I/O paths erroneously leave the inode's
fattr->time_start field set to zero, read_cache_jiffies for that inode
is set to zero after any direct read or write operation.  This
triggers an otw GETATTR or ACCESS call to update the file's attribute
and access caches properly, even when the NFS READ or WRITE replies
have usable post-op attributes.

Make sure the direct read and write setup code performs the same fattr
initialization as the cached I/O paths to prevent unnecessary GETATTR
calls.

This was likely introduced by commit 0e574af1 in 2.6.15, which appears
to add new nfs_fattr_init() call sites in the cached read and write
paths, but not in the equivalent places in fs/nfs/direct.c.  A
subsequent commit in the same series, 33801147, introduces the
fattr->time_start field.

Interestingly, the direct write reschedule path already has a call to
nfs_fattr_init() in the right place.

Reported-by: Quentin Barnes <qbarnes@yahoo-inc.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Cc: stable@kernel.org
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 16 Feb 2010 03:52:12 +0000 (19:52 -0800)]
Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  hrtimer, softirq: Fix hrtimer->softirq trampoline

14 years agoMerge branch 'reiserfs/kill-bkl' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 16 Feb 2010 03:51:45 +0000 (19:51 -0800)]
Merge branch 'reiserfs/kill-bkl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing

* 'reiserfs/kill-bkl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing:
  reiserfs: Fix softlockup while waiting on an inode

14 years agoMerge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Tue, 16 Feb 2010 03:51:15 +0000 (19:51 -0800)]
Merge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6

* 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/radeon/kms: make sure retry count increases.
  drm/radeon/kms/atom: use get_unaligned_le32() for ctx->ps
  drm/ttm: Fix a bug occuring when validating a buffer object in a range.
  drm: Fix a bug in the range manager.

14 years agoMerge branch 'sh/for-2.6.33' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal...
Linus Torvalds [Tue, 16 Feb 2010 03:50:34 +0000 (19:50 -0800)]
Merge branch 'sh/for-2.6.33' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6

* 'sh/for-2.6.33' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh64: fix tracing of signals.

14 years agoMerge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 16 Feb 2010 03:47:59 +0000 (19:47 -0800)]
Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  tracing/kprobes: Fix probe parsing
  tracing: Fix circular dead lock in stack trace

14 years agoMerge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 16 Feb 2010 03:47:48 +0000 (19:47 -0800)]
Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  perf top: Fix help text alignment
  perf: Fix hypervisor sample reporting
  perf: Make bp_len type to u64 generic across the arch

14 years agonetfilter: CONFIG_COMPAT: allow delta to exceed 32767
Florian Westphal [Mon, 15 Feb 2010 17:17:10 +0000 (18:17 +0100)]
netfilter: CONFIG_COMPAT: allow delta to exceed 32767

with 32 bit userland and 64 bit kernels, it is unlikely but possible
that insertion of new rules fails even tough there are only about 2000
iptables rules.

This happens because the compat delta is using a short int.
Easily reproducible via "iptables -m limit" ; after about 2050
rules inserting new ones fails with -ELOOP.

Note that compat_delta included 2 bytes of padding on x86_64, so
structure size remains the same.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agonetfilter: ebtables: avoid explicit XT_ALIGN() in match/targets
Florian Westphal [Mon, 15 Feb 2010 17:16:26 +0000 (18:16 +0100)]
netfilter: ebtables: avoid explicit XT_ALIGN() in match/targets

This will cause trouble once CONFIG_COMPAT support is added to ebtables.
xt_compat_*_offset() calculate the kernel/userland structure size delta
using:

XT_ALIGN(size) - COMPAT_XT_ALIGN(size)

If the match/target sizes are aligned at registration time,
delta is always zero.

Should have zero effect for existing systems: xtables uses
XT_ALIGN() whenever it deals with match/target sizes.

Signed-off-by: Florian Westphal <fwestphal@astaro.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agonetfilter: ebtables: abort if next_offset is too small
Florian Westphal [Mon, 15 Feb 2010 17:15:55 +0000 (18:15 +0100)]
netfilter: ebtables: abort if next_offset is too small

next_offset must be > 0, otherwise this loops forever.
The offset also contains the size of the ebt_entry structure
itself, so anything smaller is invalid.

Signed-off-by: Florian Westphal <fwestphal@astaro.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agonetfilter: ctnetlink: add zone support
Patrick McHardy [Mon, 15 Feb 2010 17:14:57 +0000 (18:14 +0100)]
netfilter: ctnetlink: add zone support

Parse and dump the conntrack zone in ctnetlink.

Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agonetfilter: nf_conntrack: add support for "conntrack zones"
Patrick McHardy [Mon, 15 Feb 2010 17:13:33 +0000 (18:13 +0100)]
netfilter: nf_conntrack: add support for "conntrack zones"

Normally, each connection needs a unique identity. Conntrack zones allow
to specify a numerical zone using the CT target, connections in different
zones can use the same identity.

Example:

iptables -t raw -A PREROUTING -i veth0 -j CT --zone 1
iptables -t raw -A OUTPUT -o veth1 -j CT --zone 1

Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agonetfilter: nf_conntrack: pass template to l4proto ->error() handler
Patrick McHardy [Mon, 15 Feb 2010 16:45:08 +0000 (17:45 +0100)]
netfilter: nf_conntrack: pass template to l4proto ->error() handler

The error handlers might need the template to get the conntrack zone
introduced in the next patches to perform a conntrack lookup.

Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agoALSA: hda - Correct ASUA blacklist for MSI brokenness
Takashi Iwai [Mon, 15 Feb 2010 16:05:28 +0000 (17:05 +0100)]
ALSA: hda - Correct ASUA blacklist for MSI brokenness

The MSI blacklist entry for ASUS mobo added in the commit
8ce28d6abff34886d3797b25324c940471b99164 was based on the alsa-info
output wrongly posted.  Fix the id to the right one now.

Reported-by: Sid Boyce <sboyce@blueyonder.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agonetfilter: xtables: add const qualifiers
Jan Engelhardt [Fri, 26 Jun 2009 05:51:59 +0000 (07:51 +0200)]
netfilter: xtables: add const qualifiers

This should make it easier to remove redundant arguments later.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
14 years agonetfilter: xtables: constify args in compat copying functions
Jan Engelhardt [Fri, 26 Jun 2009 06:23:19 +0000 (08:23 +0200)]
netfilter: xtables: constify args in compat copying functions

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
14 years agonetfilter: xtables: print details on size mismatch
Jan Engelhardt [Thu, 25 Jun 2009 16:32:12 +0000 (18:32 +0200)]
netfilter: xtables: print details on size mismatch

Print which revision has been used and which size are which
(kernel/user) for easier debugging.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
14 years agonetfilter: get rid of the grossness in netfilter.h
Jan Engelhardt [Sat, 13 Jun 2009 02:13:26 +0000 (04:13 +0200)]
netfilter: get rid of the grossness in netfilter.h

GCC is now smart enough to follow the inline trail correctly.
vmlinux size remain the same.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
14 years agonetfilter: reduce NF_HOOK by one argument
Jan Engelhardt [Fri, 5 Jun 2009 15:31:46 +0000 (17:31 +0200)]
netfilter: reduce NF_HOOK by one argument

No changes in vmlinux filesize.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
14 years agonetfilter: iptables: remove unused function arguments
Jan Engelhardt [Sat, 31 Oct 2009 23:36:40 +0000 (00:36 +0100)]
netfilter: iptables: remove unused function arguments

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
14 years agonetfilter: xt_recent: inform user when hitcount is too large
Jan Engelhardt [Mon, 15 Feb 2010 15:31:35 +0000 (16:31 +0100)]
netfilter: xt_recent: inform user when hitcount is too large

It is one of these things that iptables cannot catch and which can
cause "Invalid argument" to be printed. Without a hint in dmesg, it is
not going to be helpful.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>