firefly-linux-kernel-4.4.55.git
15 years agodlm: fix length calculation in compat code
David Teigland [Wed, 4 Mar 2009 17:17:23 +0000 (11:17 -0600)]
dlm: fix length calculation in compat code

Using offsetof() to calculate name length does not work because
it does not produce consistent results with with structure packing.
This caused memcpy to corrupt memory by copying 4 extra bytes off
the end of the buffer on 64 bit kernels with 32 bit userspace
(the only case where this 32/64 compat code is used).

The fix is to calculate name length directly from the start instead
of trying to derive it later using count and offsetof.

Signed-off-by: David Teigland <teigland@redhat.com>
15 years agodlm: ignore cancel on granted lock
David Teigland [Fri, 27 Feb 2009 21:23:28 +0000 (15:23 -0600)]
dlm: ignore cancel on granted lock

Return immediately from dlm_unlock(CANCEL) if the lock is
granted and not being converted; there's nothing to cancel.

Signed-off-by: David Teigland <teigland@redhat.com>
15 years agodlm: clear defunct cancel state
David Teigland [Wed, 28 Jan 2009 20:37:54 +0000 (14:37 -0600)]
dlm: clear defunct cancel state

When a conversion completes successfully and finds that a cancel
of the convert is still in progress (which is now a moot point),
preemptively clear the state associated with outstanding cancel.
That state could cause a subsequent conversion to be ignored.

Also, improve the consistency and content of error and debug
messages in this area.

Signed-off-by: David Teigland <teigland@redhat.com>
15 years agodlm: replace idr with hash table for connections
Christine Caulfield [Wed, 28 Jan 2009 18:57:40 +0000 (12:57 -0600)]
dlm: replace idr with hash table for connections

Integer nodeids can be too large for the idr code; use a hash
table instead.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
15 years agodlm: comment typo fixes
Joe Perches [Thu, 22 Jan 2009 21:26:47 +0000 (13:26 -0800)]
dlm: comment typo fixes

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David Teigland <teigland@redhat.com>
15 years agodlm: use ipv6_addr_copy
Joe Perches [Thu, 22 Jan 2009 21:24:49 +0000 (13:24 -0800)]
dlm: use ipv6_addr_copy

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David Teigland <teigland@redhat.com>
15 years agodlm: Change rwlock which is only used in write mode to a spinlock
Steven Whitehouse [Fri, 16 Jan 2009 16:21:12 +0000 (16:21 +0000)]
dlm: Change rwlock which is only used in write mode to a spinlock

The ls_dirtbl[].lock was an rwlock, but since it was only used in write
mode a spinlock will suffice.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
15 years agosmackfs load append mode fix
Casey Schaufler [Wed, 28 Jan 2009 03:56:30 +0000 (19:56 -0800)]
smackfs load append mode fix

Given just how hard it is to find the code that uses MAY_APPEND
it's probably not a big surprise that this went unnoticed for so
long. The Smack rules loading code is incorrectly setting the
MAY_READ bit when MAY_APPEND is requested.

Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Reviewed-by: James Morris <jmorris@namei.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Wed, 28 Jan 2009 00:08:04 +0000 (16:08 -0800)]
Merge git://git./linux/kernel/git/gregkh/usb-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (36 commits)
  USB: Driver for Freescale QUICC Engine USB Host Controller
  USB: option: add QUANTA HSDPA Data Card device ids
  USB: storage: Add another unusual_dev for off-by-one bug
  USB: unusual_dev: usb-storage needs to ignore a device
  USB: GADGET: fix !x & y
  USB: new id for ti_usb_3410_5052 driver
  USB: cdc-acm: Add another conexant modem to the quirks
  USB: 'option' driver - onda device MT503HS has wrong id
  USB: Remove ZTE modem from unusual_devices
  USB: storage: support of Dane-Elec MediaTouch USB device
  USB: usbmon: Implement compat_ioctl
  USB: add kernel-doc for wusb_dev in struct usb_device
  USB: ftdi_sio driver support of bar code scanner from Diebold
  USB: ftdi_sio: added Alti-2 VID and Neptune 3 PID
  USB: cp2101 device
  USB: usblp.c: add USBLP_QUIRK_BIDIR to Brother HL-1440
  USB: remove vernier labpro from ldusb
  USB: CDC-ACM quirk for MTK GPS
  USB: cdc-acm: support some gps data loggers
  USB: composite: Fix bug: low byte of w_index is the usb interface number not the whole 2 bytes of w_index
  ...

15 years agoUSB: Driver for Freescale QUICC Engine USB Host Controller
Anton Vorontsov [Sat, 10 Jan 2009 02:03:21 +0000 (05:03 +0300)]
USB: Driver for Freescale QUICC Engine USB Host Controller

This patch adds support for the FHCI USB controller, as found
in the Freescale MPC836x and MPC832x processors. It can support
Full or Low speed modes.

Quite a lot the hardware is doing by itself (SOF generation, CRC
generation and checking), though scheduling and retransmission is on
software's shoulders.

This controller does not integrate the root hub, so this driver also
fakes one-port hub. External hub is required to support more than
one device.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: option: add QUANTA HSDPA Data Card device ids
Alex.Cheng@quantatw.com [Thu, 22 Jan 2009 08:01:57 +0000 (16:01 +0800)]
USB: option: add QUANTA HSDPA Data Card device ids

This patch adds the support  for the QUANTA Q101 series HSDPA Data Card.
With the vendor and product IDs are set properly,
the data card can be detected and works fine.

Signed-off-by: Alex Cheng <alex.cheng@quantatw.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: storage: Add another unusual_dev for off-by-one bug
Phil Dibowitz [Tue, 20 Jan 2009 22:42:52 +0000 (23:42 +0100)]
USB: storage: Add another unusual_dev for off-by-one bug

Argosy has released another device with the off-by-one sector. This is a
harddrive with an internal cardreader which is affected.

Based on a patch written by Martijn Hijdra <martijn.hijdra@gmail.com>

Signed-off-by: Phil Dibowitz <phil@ipom.com>
Cc: Martijn Hijdra <martijn.hijdra@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: unusual_dev: usb-storage needs to ignore a device
Phil Dibowitz [Tue, 20 Jan 2009 22:48:36 +0000 (23:48 +0100)]
USB: unusual_dev: usb-storage needs to ignore a device

This patch adds an unusual_devs entry for a Sony Ericsson modem. Like many
other modems, we have to ignore the storage device in order to access the
modem.

At this time usb_modeswitch does not work with this device.

Reported-by: The Solutor <thesolutor@gmail.com>.
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: GADGET: fix !x & y
Roel Kluin [Sat, 17 Jan 2009 15:52:17 +0000 (16:52 +0100)]
USB: GADGET: fix !x & y

! has a higher precedence than &

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: new id for ti_usb_3410_5052 driver
Oliver Neukum [Mon, 12 Jan 2009 12:31:16 +0000 (13:31 +0100)]
USB: new id for ti_usb_3410_5052 driver

This adds a new device id

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: cdc-acm: Add another conexant modem to the quirks
Alan Cox [Sun, 11 Jan 2009 19:53:10 +0000 (19:53 +0000)]
USB: cdc-acm: Add another conexant modem to the quirks

Another Conexant, another device with the same quirk

Signed-off-by: Alan Cox <alan@redhat.com>
Acked-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: 'option' driver - onda device MT503HS has wrong id
Marcel Sebek [Sun, 28 Dec 2008 13:06:50 +0000 (14:06 +0100)]
USB: 'option' driver - onda device MT503HS has wrong id

While trying to make GSM modem Onda MT503HS working, I found a mismatch
between device id in the driver code (0x0200) and id in the lsusb
output (0x2000).

This patch fixed it for me, but I don't know if the original device id was
also correct and the new ID should be added instead of replacing the
old one.

Signed-off-by: Marcel Sebek <sebek64@post.cz>
Acked-by: Domenico Riccio <domenico.riccio@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: Remove ZTE modem from unusual_devices
Phil Dibowitz [Sun, 11 Jan 2009 17:46:20 +0000 (18:46 +0100)]
USB: Remove ZTE modem from unusual_devices

The ZTE modem entry causes usb-storage to ignore the device, but for some
versions of the device, usb-storage mode is required to get to modem ode. For
both kinds the tool: http://www.draisberghof.de/usb_modeswitch/ should work.

Note that the various versions of the device have the same ProductId,
VendorId, and bcdDevice number, so we cannot have the entry for some and not
others.

Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: storage: support of Dane-Elec MediaTouch USB device
Jean-Baptiste Onofre [Sat, 20 Dec 2008 19:11:55 +0000 (20:11 +0100)]
USB: storage: support of Dane-Elec MediaTouch USB device

This adds another unusual_devs.h entry for a device that can't handle more
than 64k reads/writes in a single command.

Signed-off-by: Jean-Baptiste Onofre <jb@nanthrax.net>
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: usbmon: Implement compat_ioctl
Pete Zaitcev [Sat, 20 Dec 2008 19:56:08 +0000 (12:56 -0700)]
USB: usbmon: Implement compat_ioctl

Running a 32-bit usbmon(8) on 2.6.28-rc9 produces the following:
ioctl32(usbmon:28563): Unknown cmd fd(3) cmd(400c9206){t:ffffff92;sz:12} arg(ffd3f458) on /dev/usbmon0

It happens because the compatibility mode was implemented for 2.6.18
and not updated for the fsops.compat_ioctl API.

This patch relocates the pieces from under #ifdef CONFIG_COMPAT into
compat_ioctl with no other changes except one new whitespace.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: add kernel-doc for wusb_dev in struct usb_device
Inaky Perez-Gonzalez [Thu, 8 Jan 2009 20:52:19 +0000 (12:52 -0800)]
USB: add kernel-doc for wusb_dev in struct usb_device

Reported by Randy Dunlap from a warning on the v2.6.29 merge window.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Cc: David Vrabel <david.vrabel@csr.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: ftdi_sio driver support of bar code scanner from Diebold
Mhayk Whandson [Fri, 9 Jan 2009 10:48:16 +0000 (06:48 -0400)]
USB: ftdi_sio driver support of bar code scanner from Diebold

Added the product id of bcs(bar code scanner) from Diebold Procomp Brazil.

Signed-off-by: Mhayk Whandson <eu@mhayk.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: ftdi_sio: added Alti-2 VID and Neptune 3 PID
Robie Basak [Mon, 12 Jan 2009 23:05:59 +0000 (23:05 +0000)]
USB: ftdi_sio: added Alti-2 VID and Neptune 3 PID

This patch adds the vendor and product ID for the Alti-2 Neptune 3
(http://www.alti-2.com) which uses the FTDI chip.

Signed-off-by: Robie Basak <rb-oss-1@justgohome.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: cp2101 device
Tomasz K [Sun, 4 Jan 2009 11:47:11 +0000 (12:47 +0100)]
USB: cp2101 device

My girl use modem GSM (EDGE) Commanader 2 on iPlus Polsih provider,

PLEASE add this vendor=0x10C4 and product=0x822B to USB serial driver cp2101.c

From: Tomasz K <eros81@o2.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: usblp.c: add USBLP_QUIRK_BIDIR to Brother HL-1440
Brandon Philips [Mon, 5 Jan 2009 16:30:39 +0000 (08:30 -0800)]
USB: usblp.c: add USBLP_QUIRK_BIDIR to Brother HL-1440

My Brother HL-1440 would print one document before CUPS would stop
printing with the error "Printer not connected; will retry in 30
seconds...". I traced this down to the CUPS usb backend getting an EIO
out of usblp on the IOCNR_GET_DEVICE_ID IOCTL. Adding the
USBLP_QUIRK_BIDIR fixes the problem but is it the right solution?

output from strace /usr/lib/cups/backend/usb after printing a document
(Note: SNDCTL_DSP_SYNC == IOCNR_GET_DEVICE_ID):

before patch

open("/dev/usb/lp0", O_RDWR|O_EXCL)     = 3
ioctl(3, SNDCTL_DSP_SYNC, 0x7fff2478cef0) = -1 EIO (Input/output error)

after patch

open("/dev/usb/lp0", O_RDWR|O_EXCL)     = 3
ioctl(3, SNDCTL_DSP_SYNC, 0x7fffb8d474c0) = 0

Possibly related bug: https://bugs.launchpad.net/ubuntu/+source/cupsys/+bug/35638

Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: remove vernier labpro from ldusb
sware [Wed, 7 Jan 2009 23:35:55 +0000 (15:35 -0800)]
USB: remove vernier labpro from ldusb

Labpro device is in both ldusb and vstusb device tables.
Should only be a vstusb device.

Signed-off-by: stephen ware <stephen.ware@eqware.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: CDC-ACM quirk for MTK GPS
Andrew Lunn [Tue, 23 Dec 2008 16:31:23 +0000 (17:31 +0100)]
USB: CDC-ACM quirk for MTK GPS

This patch adds a device quirk for a MediaTek Inc GPS chipset. The
device implements USB CDC ACM, but is missing the union descriptor, so
the ACM class driver fails to probe the device.

I've tested this patch with an iBlue A+ GPS which uses this chipset
and using kernel 2.6.28-rc9.

Signed-off-by: Andrew Lunn, <andrew@lunn.ch>
Acked-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: cdc-acm: support some gps data loggers
James A. Treacy [Sun, 25 Jan 2009 04:37:43 +0000 (23:37 -0500)]
USB: cdc-acm: support some gps data loggers

Below is a patch which allows a number of GPS loggers to work
under linux. It is known to support the i-Blue 747 (all models),
i-Blue 757, Qstarz BT-Q1000, i.Trek Z1, Konet BGL-32, and the Holux
M-241.

From: James A. Treacy <treacy@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: composite: Fix bug: low byte of w_index is the usb interface number not the...
Bryan Wu [Wed, 7 Jan 2009 16:21:19 +0000 (00:21 +0800)]
USB: composite: Fix bug: low byte of w_index is the usb interface number not the whole 2 bytes of w_index

In some usb gadget driver, for example usb audio class device, the high
byte of w_index is the entity id and low byte is the interface number.
If we use the 2 bytes of w_index as the array number, we will get a
wrong pointer or NULL pointer.

This patch fixes this issue.

Signed-off-by: Bryan Wu <cooloney@kernel.org>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: composite: Fix bug: should test set_alt function pointer before use it
Bryan Wu [Wed, 7 Jan 2009 16:21:18 +0000 (00:21 +0800)]
USB: composite: Fix bug: should test set_alt function pointer before use it

Signed-off-by: Bryan Wu <cooloney@kernel.org>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: musb: Kconfig fix
David Brownell [Mon, 26 Jan 2009 10:05:43 +0000 (02:05 -0800)]
USB: musb: Kconfig fix

The Blackfin MUSB Kconfig text didn't properly parenthesise its
dependencies.  This was visible in non-Blackfin configs by the
way the user interfaces lost track of dependencies, when doing
a bunch of test builds.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: musb cppi dma fix
Swaminathan S [Sun, 25 Jan 2009 01:57:37 +0000 (17:57 -0800)]
USB: musb cppi dma fix

Initializes the actual_len field to 0 before every DMA transaction.

Signed-off-by: Swaminathan S <swami.iyer@ti.com>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: musb cppi bugfixes
Hugo Villeneuve [Sun, 25 Jan 2009 01:57:30 +0000 (17:57 -0800)]
USB: musb cppi bugfixes

These compilation errors are related to incorrect
debugging macro and variable names and generated the
following errors:

  drivers/usb/musb/cppi_dma.c:437:5: warning: "MUSB_DEBUG" is not defined
  drivers/usb/musb/cppi_dma.c: In function 'cppi_next_rx_segment':
  drivers/usb/musb/cppi_dma.c:884: error: 'debug' undeclared (first use in this function)

Signed-off-by: Hugo Villeneuve <hugo@hugovil.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: musb uses endpoint functions
Julia Lawall [Sun, 25 Jan 2009 01:57:24 +0000 (17:57 -0800)]
USB: musb uses endpoint functions

This set of patches introduces calls to the following set of functions:

usb_endpoint_dir_in(epd)
usb_endpoint_dir_out(epd)
usb_endpoint_is_bulk_in(epd)
usb_endpoint_is_bulk_out(epd)
usb_endpoint_is_int_in(epd)
usb_endpoint_is_int_out(epd)
usb_endpoint_num(epd)
usb_endpoint_type(epd)
usb_endpoint_xfer_bulk(epd)
usb_endpoint_xfer_control(epd)
usb_endpoint_xfer_int(epd)
usb_endpoint_xfer_isoc(epd)

In some cases, introducing one of these functions is not possible, and it
just replaces an explicit integer value by one of the following constants:

USB_ENDPOINT_XFER_BULK
USB_ENDPOINT_XFER_CONTROL
USB_ENDPOINT_XFER_INT
USB_ENDPOINT_XFER_ISOC

An extract of the semantic patch that makes these changes is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r1@ struct usb_endpoint_descriptor *epd; @@

- ((epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) ==
- \(USB_ENDPOINT_XFER_CONTROL\|0\))
+ usb_endpoint_xfer_control(epd)

@r5@ struct usb_endpoint_descriptor *epd; @@

- ((epd->bEndpointAddress & \(USB_ENDPOINT_DIR_MASK\|0x80\)) ==
-  \(USB_DIR_IN\|0x80\))
+ usb_endpoint_dir_in(epd)

@inc@
@@

#include <linux/usb.h>

@depends on !inc && (r1||r5)@
@@

+ #include <linux/usb.h>
  #include <linux/usb/...>
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: musb: tusb6010 buildfix
Kalle Valo [Sun, 25 Jan 2009 01:57:15 +0000 (17:57 -0800)]
USB: musb: tusb6010 buildfix

drivers/usb/musb/tusb6010_omap.c:18:26: error: asm/arch/dma.h:
  No such file or directory
drivers/usb/musb/tusb6010_omap.c:19:26: error: asm/arch/mux.h:
  No such file or directory

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: musb free_irq bugfix
Ajay Kumar Gupta [Sun, 25 Jan 2009 01:56:39 +0000 (17:56 -0800)]
USB: musb free_irq bugfix

Fixes insert module failure as free_irq() was not
done in previous rmmod.

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: musb_hdrc: another davinci buildfix (otg related)
David Brownell [Sun, 25 Jan 2009 01:56:25 +0000 (17:56 -0800)]
USB: musb_hdrc: another davinci buildfix (otg related)

The DaVinci code had an implementation of the OTG transceiver glue
too; make it use the new-standard one.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: musb davinci buildfix
David Brownell [Sun, 25 Jan 2009 01:56:17 +0000 (17:56 -0800)]
USB: musb davinci buildfix

Trying once more to get this merged.  The original was submitted
for 2.6.27-rc2 or so, and never got correctly merged.  Neither
were any of the numerous subsequent resends.  Sigh.

  CC      drivers/usb/musb/davinci.o
drivers/usb/musb/davinci.c:35:32: error: mach/arch/hardware.h: No such file or directory
drivers/usb/musb/davinci.c:36:30: error: mach/arch/memory.h: No such file or directory
drivers/usb/musb/davinci.c:37:28: error: mach/arch/gpio.h: No such file or directory
drivers/usb/musb/davinci.c:373: error: redefinition of 'musb_platform_set_mode'
drivers/usb/musb/davinci.c:368: error: previous definition of 'musb_platform_set_mode' was here

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: omap1 ohci buildfix (otg related)
David Brownell [Sun, 25 Jan 2009 01:55:57 +0000 (17:55 -0800)]
USB: omap1 ohci buildfix (otg related)

> > drivers/built-in.o: In function `ohci_omap_init':
 > > hid-quirks.c:(.text+0x6c608): undefined reference to `otg_get_transceiver'
 > > drivers/built-in.o: In function `omap_udc_probe':
 > > hid-quirks.c:(.init.text+0x34c0): undefined reference to `otg_get_transceiver'
 > > hid-quirks.c:(.init.text+0x3d40): undefined reference to `otg_put_transceiver'

Reported-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: fix char-device disconnect handling
Alan Stern [Tue, 13 Jan 2009 16:33:42 +0000 (11:33 -0500)]
USB: fix char-device disconnect handling

This patch (as1198) fixes a conceptual bug: Somewhere along the line
we managed to confuse USB class devices with USB char devices.  As a
result, the code to send a disconnect signal to userspace would not be
built if both CONFIG_USB_DEVICE_CLASS and CONFIG_USB_DEVICEFS were
disabled.

The usb_fs_classdev_common_remove() routine has been renamed to
usbdev_remove() and it is now called whenever any USB device is
removed, not just when a class device is unregistered.  The notifier
registration and unregistration calls are no longer conditionally
compiled.  And since the common removal code will always be called as
part of the char device interface, there's no need to call it again as
part of the usbfs interface; thus the invocation of
usb_fs_classdev_common_remove() has been taken out of
usbfs_remove_device().

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Alon Bar-Lev <alon.barlev@gmail.com>
Tested-by: Alon Bar-Lev <alon.barlev@gmail.com>
Cc: stable <stable@kernel.org>
15 years agoUSB: Fix suspend-resume of PCI USB controllers
Rafael J. Wysocki [Tue, 20 Jan 2009 00:26:56 +0000 (01:26 +0100)]
USB: Fix suspend-resume of PCI USB controllers

Commit a0d4922da2e4ccb0973095d8d29f36f6b1b5f703
(USB: fix up suspend and resume for PCI host controllers) attempted
to fix the suspend-resume of PCI USB controllers, but unfortunately
it did that incorrectly and interrupts are left enabled by the USB
controllers' ->suspend_late() callback as a result.  This leads to
serious problems during suspend which are very difficult to debug.

Fix the issue by removing the ->suspend_late() callback of PCI
USB controllers and moving the code from there to the ->suspend()
callback executed with interrupts enabled.  Additionally, make
the ->resume() callback of PCI USB controllers execute
pci_enable_wake(dev, PCI_D0, false) to disable wake-up from the
full power state (PCI_D0).

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Tested-by: Andrey Borzenkov <arvidjaar@mail.ru>
Tested-by: "Jeff Chua" <jeff.chua.linux@gmail.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: "Zdenek Kabelac" <zdenek.kabelac@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: don't enable wakeup by default for PCI host controllers
Alan Stern [Tue, 13 Jan 2009 16:35:54 +0000 (11:35 -0500)]
USB: don't enable wakeup by default for PCI host controllers

This patch (as1199) changes the initial wakeup settings for PCI USB
host controllers.  The controllers are marked as capable of waking the
system, but wakeup is not enabled by default.

It turns out that enabling wakeup for USB host controllers has a lot
of bad consequences.  As the simplest example, if a USB mouse or
keyboard is unplugged immediately after the computer is put to sleep,
the unplug will cause the system to wake back up again!  We are better
off marking them as wakeup-capable and leaving wakeup disabled.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Rafael J. Wysocki <rjw@sisk.pl>
CC: David Brownell <david-b@pacbell.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: storage: add unusual devs entry
Oliver Neukum [Wed, 14 Jan 2009 15:17:19 +0000 (16:17 +0100)]
USB: storage: add unusual devs entry

This adds an unusual devs entry for 2116:0320

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: fix toggle mismatch in disable_endpoint paths
Alan Stern [Thu, 15 Jan 2009 22:03:33 +0000 (17:03 -0500)]
USB: fix toggle mismatch in disable_endpoint paths

This patch (as1200) finishes some fixes that were left incomplete by
an earlier patch.

Although nobody has addressed this issue in the past, it turns out
that we need to distinguish between two different modes of disabling
and enabling endpoints.  In one mode only the data structures in
usbcore are affected, and in the other mode the host controller and
device hardware states are affected as well.

The earlier patch added an extra argument to the routines in the
enable_endpoint pathways to reflect this difference.  This patch adds
corresponding arguments to the disable_endpoint pathways.  Without
this change, the endpoint toggle state can get out of sync between
the host and the device.  The exact mechanism depends on the details
of the host controller (whether or not it stores its own copy of the
toggle values).

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Dan Streetman <ddstreet@ieee.org>
Tested-by: Dan Streetman <ddstreet@ieee.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: cp2101: add fasttrax GPS evaluation kit vendor/product ID
Wolfgang Glas [Thu, 15 Jan 2009 22:11:53 +0000 (23:11 +0100)]
USB: cp2101: add fasttrax GPS evaluation kit vendor/product ID

This adds the vendor/product ID of the fasttrax GPS evaluation kit from:
http://www.fastraxgps.com/products/evaluationtools/evaluationkit/

to the cp2101 module since this device is actually equipped with a
CP210x USB to serial bridge.

The vendor/product ID is: 0x10c4/0x826b.

Signed-off-by: Wolfgang Glas <wolfgang.glas@ev-i.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoMerge branch 'for-2.6.29' of git://linux-nfs.org/~bfields/linux
Linus Torvalds [Wed, 28 Jan 2009 00:07:44 +0000 (16:07 -0800)]
Merge branch 'for-2.6.29' of git://linux-nfs.org/~bfields/linux

* 'for-2.6.29' of git://linux-nfs.org/~bfields/linux:
  nfsd: only set file_lock.fl_lmops in nfsd4_lockt if a stateowner is found
  nfsd: fix cred leak on every rpc
  nfsd: fix null dereference on error path
  nfs: note that CONFIG_SUNRPC_XPRT_RDMA turns on server side support too
  update port number in NFS/RDMA documentation

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
Linus Torvalds [Wed, 28 Jan 2009 00:07:24 +0000 (16:07 -0800)]
Merge git://git./linux/kernel/git/jejb/scsi-rc-fixes-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] ibmvfc: Fix DMA mapping leak on memory allocation failure
  [SCSI] qla2xxx: Update version number to 8.03.00-k2.
  [SCSI] qla2xxx: Add checks for a valid fcport in dev-loss-tmo/terminate_rport_io callbacks.
  [SCSI] qla2xxx: Correct regression in DMA-mask setting prior to allocations.
  [SCSI] qla2xxx: Correct descriptions in flash manipulation routines.
  [SCSI] qla2xxx: Correct regression in EH abort handling.
  [SCSI] qla2xxx: Correct endianness issue during flash manipulation.
  [SCSI] qla2xxx: Correct MSI-X vector allocation for single queue mode.
  [SCSI] qla2xxx: Modify firmware-load order precedence for ISP81XX parts.
  [SCSI] qla2xxx: Always serialize mailbox command execution.
  [SCSI] qla2xxx: Ensure RISC-interrupt-enabled consistency for IS_NOPOLLING_TYPE() ISPs.
  [SCSI] qla2xxx: Simplify sector-mask calculation in preparation for larger flash parts.
  [SCSI] qla2xxx: Fix memory leak in error path
  [SCSI] qla4xxx: do not reuse session when connecting to different target port
  [SCSI] libiscsi: fix iscsi pool leak

15 years agocpumask fallout: Initialize irq_default_affinity earlier
David Daney [Tue, 27 Jan 2009 17:53:22 +0000 (09:53 -0800)]
cpumask fallout: Initialize irq_default_affinity earlier

Move the initialization of irq_default_affinity to early_irq_init as
core_initcall is too late.

irq_default_affinity can be used in init_IRQ and potentially timer and
SMP init as well.  All of these happen before core_initcall.  Moving
the initialization to early_irq_init ensures that it is initialized
before it is used.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Acked-by: Mike Travis <travis@sgi.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMake irq_*_affinity depend on CONFIG_GENERIC_HARDIRQS too.
David Daney [Tue, 27 Jan 2009 17:53:21 +0000 (09:53 -0800)]
Make irq_*_affinity depend on CONFIG_GENERIC_HARDIRQS too.

In interrupt.h these functions are declared only if
CONFIG_GENERIC_HARDIRQS is set.  We should define them under identical
conditions.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoFix longstanding "error: storage size of '__mod_dmi_device_table' isn't known"
Alexey Dobriyan [Wed, 21 Jan 2009 22:58:36 +0000 (01:58 +0300)]
Fix longstanding "error: storage size of '__mod_dmi_device_table' isn't known"

gcc 3.4.6 doesn't like MODULE_DEVICE_TABLE(dmi, x) expansion enough to
error out.  Shut it up in a most simple way.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agonfsd: only set file_lock.fl_lmops in nfsd4_lockt if a stateowner is found
Jeff Layton [Thu, 22 Jan 2009 19:16:04 +0000 (14:16 -0500)]
nfsd: only set file_lock.fl_lmops in nfsd4_lockt if a stateowner is found

nfsd4_lockt does a search for a lockstateowner when building the lock
struct to test. If one is found, it'll set fl_owner to it. Regardless of
whether that happens, it'll also set fl_lmops. Given that this lock is
basically a "lightweight" lock that's just used for checking conflicts,
setting fl_lmops is probably not appropriate for it.

This behavior exposed a bug in DLM's GETLK implementation where it
wasn't clearing out the fields in the file_lock before filling in
conflicting lock info. While we were able to fix this in DLM, it
still seems pointless and dangerous to set the fl_lmops this way
when we may have a NULL lockstateowner.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@pig.fieldses.org>
15 years agonfsd: fix cred leak on every rpc
J. Bruce Fields [Wed, 21 Jan 2009 00:34:22 +0000 (19:34 -0500)]
nfsd: fix cred leak on every rpc

Since override_creds() took its own reference on new, we need to release
our own reference.

(Note the put_cred on the return value puts the *old* value of
current->creds, not the new passed-in value).

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
15 years agonfsd: fix null dereference on error path
J. Bruce Fields [Wed, 21 Jan 2009 00:32:59 +0000 (19:32 -0500)]
nfsd: fix null dereference on error path

We're forgetting to check the return value from groups_alloc().

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
15 years agonfs: note that CONFIG_SUNRPC_XPRT_RDMA turns on server side support too
J. Bruce Fields [Sun, 2 Nov 2008 21:18:08 +0000 (16:18 -0500)]
nfs: note that CONFIG_SUNRPC_XPRT_RDMA turns on server side support too

We forgot to update this when adding server-side support.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
15 years agoupdate port number in NFS/RDMA documentation
James Lentini [Thu, 8 Jan 2009 18:13:26 +0000 (13:13 -0500)]
update port number in NFS/RDMA documentation

Update the NFS/RDMA documentation to use the new port number assigned
by IANA.

Signed-off-by: James Lentini <jlentini@netapp.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
15 years agoMerge branch 'hibern_fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Tue, 27 Jan 2009 15:50:41 +0000 (07:50 -0800)]
Merge branch 'hibern_fixes' of git://git./linux/kernel/git/jgarzik/libata-dev

* 'hibern_fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  SATA PIIX: Blacklist system that spins off disks during ACPI power off
  SATA Sil: Blacklist system that spins off disks during ACPI power off
  SATA AHCI: Blacklist system that spins off disks during ACPI power off
  SATA: Blacklisting of systems that spin off disks during ACPI power off
  DMI: Introduce dmi_first_match to make the interface more flexible
  Hibernation: Introduce system_entering_hibernation

15 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Tue, 27 Jan 2009 15:47:22 +0000 (07:47 -0800)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  pata-rb532-cf: remove set_irq_type from finish_io
  [libata] pata_via: support VX855, future chips whose IDE controller use 0x0571
  sata_mv: no longer experimental (v2)
  sata_mv: msi masking fix (v2)
  sata_mv: Properly initialize main irq mask
  sata_mv: remove bogus nsect restriction
  sata_mv: don't read hc_irq_cause
  sata_mv: fix 8-port timeouts on 508x/6081 chips
  sata_nv: fix MCP5x reset
  sata_nv: rename nv_nf2_hardreset()
  libata: set NODEV_HINT for 0x7f status
  libata-sff: fix incorrect EH message

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Tue, 27 Jan 2009 15:46:29 +0000 (07:46 -0800)]
Merge git://git./linux/kernel/git/herbert/crypto-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: ccm - Fix handling of null assoc data
  crypto: blkcipher - Fix WARN_ON handling in walk_done
  crypto: authenc - Fix zero-length IV crash

15 years agoAdd support for '8-port RS-232 MIC-3620 from advantech'
Michael Bramer [Tue, 27 Jan 2009 11:51:16 +0000 (11:51 +0000)]
Add support for '8-port RS-232 MIC-3620 from advantech'

This Patch add the device information for the
MIC-3620 8-port RS-232 cPCI card from Advantech Co. Ltd.

Signed-off-by: Michael Bramer <grisu@deb-support.de>
Signed-off-by: Alan Cox <number6@the-village.bc.nu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMove jsm_remove_one to .devexit.text
Uwe Kleine-König [Tue, 27 Jan 2009 11:51:06 +0000 (11:51 +0000)]
Move jsm_remove_one to .devexit.text

The function jsm_remove_one is used only wrapped by __devexit_p so define
it using __devexit.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Alan Cox <number6@the-village.bc.nu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMIPS: enable serial UART support on PNX833X devices.
Ihar Hrachyshka [Tue, 27 Jan 2009 11:50:46 +0000 (11:50 +0000)]
MIPS: enable serial UART support on PNX833X devices.

Enabled serial UART driver for PNX833X devices.

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
Signed-off-by: Alan Cox <number6@the-village.bc.nu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty_open can return to userspace holding tty_mutex
Eric Paris [Tue, 27 Jan 2009 11:50:37 +0000 (11:50 +0000)]
tty_open can return to userspace holding tty_mutex

__tty_open could return (to userspace) holding the tty_mutex thanks to a
regression introduced by 4a2b5fddd53b80efcb3266ee36e23b8de28e761a ("Move
tty lookup/reopen to caller").

This was found by bisecting an fsfuzzer problem.  Admittedly I have no
idea how it managed to tickle this 100% reliably, but it is clearly a
regression and when hit leaves the box in a completely unusable state.
This patch lets the fsfuzzer test complete every time.

Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoSATA PIIX: Blacklist system that spins off disks during ACPI power off
Rafael J. Wysocki [Mon, 19 Jan 2009 19:59:22 +0000 (20:59 +0100)]
SATA PIIX: Blacklist system that spins off disks during ACPI power off

Some notebooks from HP have the problem that their BIOSes attempt to
spin down hard drives before entering ACPI system states S4 and S5.
This leads to a yo-yo effect during system power-off shutdown and the
last phase of hibernation when the disk is first spun down by the
kernel and then almost immediately turned on and off by the BIOS.
This, in turn, may result in shortening the disk's life times.

To prevent this from happening we can blacklist the affected systems
using DMI information.

Blacklist HP 2510p that uses the ata_piix driver.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agoSATA Sil: Blacklist system that spins off disks during ACPI power off
Rafael J. Wysocki [Mon, 19 Jan 2009 19:58:29 +0000 (20:58 +0100)]
SATA Sil: Blacklist system that spins off disks during ACPI power off

Some notebooks from HP have the problem that their BIOSes attempt to
spin down hard drives before entering ACPI system states S4 and S5.
This leads to a yo-yo effect during system power-off shutdown and the
last phase of hibernation when the disk is first spun down by the
kernel and then almost immediately turned on and off by the BIOS.
This, in turn, may result in shortening the disk's life times.

To prevent this from happening we can blacklist the affected systems
using DMI information.

Blacklist HP nx6325 that uses the sata_sil driver.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agoSATA AHCI: Blacklist system that spins off disks during ACPI power off
Rafael J. Wysocki [Mon, 19 Jan 2009 19:57:36 +0000 (20:57 +0100)]
SATA AHCI: Blacklist system that spins off disks during ACPI power off

Some notebooks from HP have the problem that their BIOSes attempt to
spin down hard drives before entering ACPI system states S4 and S5.
This leads to a yo-yo effect during system power-off shutdown and the
last phase of hibernation when the disk is first spun down by the
kernel and then almost immediately turned on and off by the BIOS.
This, in turn, may result in shortening the disk's life times.

To prevent this from happening we can blacklist the affected systems
using DMI information.

Blacklist HP nx6310 that uses the AHCI driver.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agoSATA: Blacklisting of systems that spin off disks during ACPI power off
Rafael J. Wysocki [Mon, 19 Jan 2009 19:56:43 +0000 (20:56 +0100)]
SATA: Blacklisting of systems that spin off disks during ACPI power off

Introduce new libata flags ATA_FLAG_NO_POWEROFF_SPINDOWN and
ATA_FLAG_NO_HIBERNATE_SPINDOWN that, if set, will prevent disks from
being spun off during system power off and hibernation, respectively
(to handle the hibernation case we need the new system state
SYSTEM_HIBERNATE_ENTER that can be checked against by libata, in
analogy with SYSTEM_POWER_OFF).

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agoDMI: Introduce dmi_first_match to make the interface more flexible
Rafael J. Wysocki [Mon, 19 Jan 2009 19:55:50 +0000 (20:55 +0100)]
DMI: Introduce dmi_first_match to make the interface more flexible

Some notebooks from HP have the problem that their BIOSes attempt to
spin down hard drives before entering ACPI system states S4 and S5.
This leads to a yo-yo effect during system power-off shutdown and the
last phase of hibernation when the disk is first spun down by the
kernel and then almost immediately turned on and off by the BIOS.
This, in turn, may result in shortening the disk's life times.

To prevent this from happening we can blacklist the affected systems
using DMI information.  However, only the on-board controlles should
be blacklisted and their PCI slot numbers can be used for this
purpose.  Unfortunately the existing interface for checking DMI
information of the system is not very convenient for this purpose,
because to use it, we would have to define special callback functions
or create a separate struct dmi_system_id table for each blacklisted
system.

To overcome this difficulty introduce a new function
dmi_first_match() returning a pointer to the first entry in an array
of struct dmi_system_id elements that matches the system DMI
information.  Then, we can use this pointer to access the entry's
.driver_data field containing the additional information, such as
the PCI slot number, allowing us to do the desired blacklisting.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agoHibernation: Introduce system_entering_hibernation
Rafael J. Wysocki [Mon, 19 Jan 2009 19:54:54 +0000 (20:54 +0100)]
Hibernation: Introduce system_entering_hibernation

Introduce boolean function system_entering_hibernation() returning
'true' during the last phase of hibernation, in which devices are
being put into low power states and the sleep state (for example,
ACPI S4) is finally entered.

Some device drivers need such a function to check if the system is
in the final phase of hibernation.  In particular, some SATA drivers
are going to use it for blacklisting systems in which the disks
should not be spun down during the last phase of hibernation (the
BIOS will do that anyway).

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agopata-rb532-cf: remove set_irq_type from finish_io
Phil Sutter [Tue, 20 Jan 2009 16:40:56 +0000 (17:40 +0100)]
pata-rb532-cf: remove set_irq_type from finish_io

The driver has been tested without the call to set_irq_type at this
point and occurs to work fine, so it should be safe to remove it.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agocrypto: ccm - Fix handling of null assoc data
Jarod Wilson [Thu, 22 Jan 2009 08:58:15 +0000 (19:58 +1100)]
crypto: ccm - Fix handling of null assoc data

Its a valid use case to have null associated data in a ccm vector, but
this case isn't being handled properly right now.

The following ccm decryption/verification test vector, using the
rfc4309 implementation regularly triggers a panic, as will any
other vector with null assoc data:

* key: ab2f8a74b71cd2b1ff802e487d82f8b9
* iv: c6fb7d800d13abd8a6b2d8
* Associated Data: [NULL]
* Tag Length: 8
* input: d5e8939fc7892e2b

The resulting panic looks like so:

Unable to handle kernel paging request at ffff810064ddaec0 RIP:
 [<ffffffff8864c4d7>] :ccm:get_data_to_compute+0x1a6/0x1d6
PGD 8063 PUD 0
Oops: 0002 [1] SMP
last sysfs file: /module/libata/version
CPU 0
Modules linked in: crypto_tester_kmod(U) seqiv krng ansi_cprng chainiv rng ctr aes_generic aes_x86_64 ccm cryptomgr testmgr_cipher testmgr aead crypto_blkcipher crypto_a
lgapi des ipv6 xfrm_nalgo crypto_api autofs4 hidp l2cap bluetooth nfs lockd fscache nfs_acl sunrpc ip_conntrack_netbios_ns ipt_REJECT xt_state ip_conntrack nfnetlink xt_
tcpudp iptable_filter ip_tables x_tables dm_mirror dm_log dm_multipath scsi_dh dm_mod video hwmon backlight sbs i2c_ec button battery asus_acpi acpi_memhotplug ac lp sg
snd_intel8x0 snd_ac97_codec ac97_bus snd_seq_dummy snd_seq_oss joydev snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss ide_cd snd_pcm floppy parport_p
c shpchp e752x_edac snd_timer e1000 i2c_i801 edac_mc snd soundcore snd_page_alloc i2c_core cdrom parport serio_raw pcspkr ata_piix libata sd_mod scsi_mod ext3 jbd uhci_h
cd ohci_hcd ehci_hcd
Pid: 12844, comm: crypto-tester Tainted: G      2.6.18-128.el5.fips1 #1
RIP: 0010:[<ffffffff8864c4d7>]  [<ffffffff8864c4d7>] :ccm:get_data_to_compute+0x1a6/0x1d6
RSP: 0018:ffff8100134434e8  EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff8100104898b0 RCX: ffffffffab6aea10
RDX: 0000000000000010 RSI: ffff8100104898c0 RDI: ffff810064ddaec0
RBP: 0000000000000000 R08: ffff8100104898b0 R09: 0000000000000000
R10: ffff8100103bac84 R11: ffff8100104898b0 R12: ffff810010489858
R13: ffff8100104898b0 R14: ffff8100103bac00 R15: 0000000000000000
FS:  00002ab881adfd30(0000) GS:ffffffff803ac000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: ffff810064ddaec0 CR3: 0000000012a88000 CR4: 00000000000006e0
Process crypto-tester (pid: 12844, threadinfo ffff810013442000, task ffff81003d165860)
Stack:  ffff8100103bac00 ffff8100104898e8 ffff8100134436f8 ffffffff00000000
 0000000000000000 ffff8100104898b0 0000000000000000 ffff810010489858
 0000000000000000 ffff8100103bac00 ffff8100134436f8 ffffffff8864c634
Call Trace:
 [<ffffffff8864c634>] :ccm:crypto_ccm_auth+0x12d/0x140
 [<ffffffff8864cf73>] :ccm:crypto_ccm_decrypt+0x161/0x23a
 [<ffffffff88633643>] :crypto_tester_kmod:cavs_test_rfc4309_ccm+0x4a5/0x559
[...]

The above is from a RHEL5-based kernel, but upstream is susceptible too.

The fix is trivial: in crypto/ccm.c:crypto_ccm_auth(), pctx->ilen contains
whatever was in memory when pctx was allocated if assoclen is 0. The tested
fix is to simply add an else clause setting pctx->ilen to 0 for the
assoclen == 0 case, so that get_data_to_compute() doesn't try doing
things its not supposed to.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
15 years agocrypto: blkcipher - Fix WARN_ON handling in walk_done
Herbert Xu [Fri, 16 Jan 2009 03:40:54 +0000 (14:40 +1100)]
crypto: blkcipher - Fix WARN_ON handling in walk_done

When we get left-over bits from a slow walk, it means that the
underlying cipher has gone troppo.  However, as we're handling
that case we should ensure that the caller terminates the walk.

This patch does this by setting walk->nbytes to zero.

Reported-by: Roel Kluin <roel.kluin@gmail.com>
Reported-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
15 years agoFix "multiple definition of `debugfs_create_size_t'"
Linus Torvalds [Tue, 27 Jan 2009 03:21:26 +0000 (19:21 -0800)]
Fix "multiple definition of `debugfs_create_size_t'"

Introduced by 8adb711f3668b034e7b956fac951ed08b53e0d55 ("debugfs:
introduce stub for debugfs_create_size_t() when DEBUG_FS=n") and due to
a simple missing "static inline".

Reported-and-tested-by: Jeff Chua <jeff.chua.linux@gmail.com>
Acked-by: Greg KH <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Mon, 26 Jan 2009 23:12:47 +0000 (15:12 -0800)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm: (22 commits)
  [ARM] fix section-based ioremap
  [NET] am79c961a: fix spin_lock usage
  [ARM] omap: usb: thou shalt not provide empty release functions
  [ARM] omap: watchdog: allow OMAP watchdog driver on OMAP34xx platforms
  [ARM] 5369/1: omap mmc: Add new omap hsmmc controller for 2430 and 34xx, v3
  [ARM] clkdev: fix clock matching
  [ARM] 5370/1: at91: fix rm9200 watchdog
  [ARM] 5368/1: arch/arm/mach-davinci/usb.c buildfix
  [ARM] 5365/1: s3cmci: Use new include path of dma.h
  [ARM] fix StrongARM-11x0 page copy implementation
  [ARM] omap: ensure OMAP drivers pass a struct device to clk_get()
  ARM: OMAP: Fix compile for h3 MMC
  ARM: OMAP: Remove unused platform devices, v3
  ARM: OMAP: Fix ASoC by enabling writes to XCCR and RCCR McBSP registers, v3
  ARM: OMAP: Fix OSK ASoC by registering I2C board info for tlvaic23
  ARM: OMAP: remove duplicated #include's
  ARM: OMAP: Fix DMA CCR programming for request line > 63, v3
  ARM: OMAP: Fix gpio.c compile on 15xx with CONFIG_DEBUGFS
  ARM: OMAP: Fix compile for beagle
  ARM: OMAP: Fix gpio by switching to generic gpio calls, v2
  ...

15 years agoMerge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
Linus Torvalds [Mon, 26 Jan 2009 23:11:41 +0000 (15:11 -0800)]
Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6

* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
  i2c: Warn on deprecated binding model use
  eeprom: More consistent symbol names
  eeprom: Move 93cx6 eeprom driver to /drivers/misc/eeprom
  spi: Move at25 (for SPI eeproms) to /drivers/misc/eeprom
  i2c: Move old eeprom driver to /drivers/misc/eeprom
  i2c: Move at24 to drivers/misc/eeprom
  i2c: Quilt tree has moved
  i2c: Delete many unused adapter IDs
  i2c: Delete 10 unused driver IDs

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes
Linus Torvalds [Mon, 26 Jan 2009 23:10:37 +0000 (15:10 -0800)]
Merge git://git./linux/kernel/git/sam/kbuild-fixes

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
  kbuild: fix kbuild.txt typos
  kbuild: print usage with no arguments in scripts/config
  Revert "kbuild: strip generated symbols from *.ko"

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Mon, 26 Jan 2009 23:09:20 +0000 (15:09 -0800)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (92 commits)
  gianfar: Revive VLAN support
  vlan: Export symbols as non GPL symbols.
  bnx2x: tx_has_work should not wait for FW
  netxen: reduce memory footprint
  netxen: fix vlan tso/checksum offload
  net: Fix linux/if_frad.h's suitability for userspace.
  net: Move config NET_NS to from net/Kconfig to init/Kconfig
  isdn: Fix missing ifdef in isdn_ppp
  networking: document "nc" in addition to "netcat" in netconsole.txt
  e1000e: workaround hw errata
  af_key: initialize xfrm encap_oa
  virtio_net: Fix MAX_PACKET_LEN to support 802.1Q VLANs
  lcs: fix compilation for !CONFIG_IP_MULTICAST
  rtl8187: Add termination packet to prevent stall
  iwlwifi: fix rs_get_rate WARN_ON()
  p54usb: fix packet loss with first generation devices
  sctp: Fix another socket race during accept/peeloff
  sctp: Properly timestamp outgoing data chunks for rtx purposes
  sctp: Correctly start rtx timer on new packet transmissions.
  sctp: Fix crc32c calculations on big-endian arhes.
  ...

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Mon, 26 Jan 2009 23:08:07 +0000 (15:08 -0800)]
Merge git://git./linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc64: Fix DAX handling via userspace access from kernel.
  sparc64: Annotate sparc64 specific syscalls with SYSCALL_DEFINEx()
  [CVE-2009-0029] sparc: Enable syscall wrappers for 64-bit
  sparc64: Initialize FHC/CLOCK LED platform_device 'id' field correctly.
  sparc64: fix modpost failure
  sparc64: fix readout of cpu/fpu type

15 years agogianfar: Revive VLAN support
Anton Vorontsov [Mon, 26 Jan 2009 22:33:23 +0000 (14:33 -0800)]
gianfar: Revive VLAN support

commit 77ecaf2d5a8bfd548eed3f05c1c2e6573d5de4ba ("gianfar: Fix VLAN
HW feature related frame/buffer size calculation") wrongly removed
priv->vlgrp assignment, and now priv->vlgrp is always NULL.

This patch fixes the issue, plus fixes following sparse warning
introduced by the same commit:
gianfar.c:1406:13: warning: context imbalance in 'gfar_vlan_rx_register' - wrong count at exit

gfar_vlan_rx_register() checks for "if (old_grp == grp)" and tries
to return w/o dropping the lock.

According to net/8021q/vlan.c VLAN core issues rx_register() callback:
1. In register_vlan_dev() only on a newly created group;
2. In unregister_vlan_dev() only if the group becomes empty.

Thus the check in the gianfar driver isn't needed.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agovlan: Export symbols as non GPL symbols.
Ben Greear [Mon, 26 Jan 2009 20:37:53 +0000 (12:37 -0800)]
vlan: Export symbols as non GPL symbols.

In previous kernels, any kernel module could get access to the
'real-device' and the VLAN-ID for a particular VLAN.  In more recent
kernels, the code was restructured such that this is hard to do
without accessing private .h files for any module that cannot use
GPL-only symbols.

Attached is a patch to once again allow non-GPL modules the ability to
access the real-device and VLAN id for VLANs.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: tx_has_work should not wait for FW
Vladislav Zolotarov [Mon, 26 Jan 2009 20:36:42 +0000 (12:36 -0800)]
bnx2x: tx_has_work should not wait for FW

The current tx_has_work waited until all packets sent by the driver
are marked as completed by the FW. This is too greedy and it causes
the bnx2x_poll to spin in vain. The driver should only check that all
packets FW already completed are freed - only in unload flow the
driver should make sure that transmit queue is empty

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>
15 years agonetxen: reduce memory footprint
Dhananjay Phadke [Mon, 26 Jan 2009 20:35:19 +0000 (12:35 -0800)]
netxen: reduce memory footprint

o reduce rx ring size from 8192 to 4096.
o cut down old huge lro buffers.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetxen: fix vlan tso/checksum offload
Dhananjay Phadke [Mon, 26 Jan 2009 20:34:57 +0000 (12:34 -0800)]
netxen: fix vlan tso/checksum offload

o set netdev->vlan_features appropriately.
o fix tso descriptor initialization for vlan case.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: Fix linux/if_frad.h's suitability for userspace.
Krzysztof Hałasa [Mon, 26 Jan 2009 20:30:12 +0000 (12:30 -0800)]
net: Fix linux/if_frad.h's suitability for userspace.

The userspace interfaces are protected by CONFIG_* ifdefs
and that of course can't work.

Reported by Jaswinder Singh Rajput.

Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: Move config NET_NS to from net/Kconfig to init/Kconfig
Matt Helsley [Mon, 26 Jan 2009 20:25:55 +0000 (12:25 -0800)]
net: Move config NET_NS to from net/Kconfig to init/Kconfig

Make NET_NS available underneath the generic Namespaces config option
since all of the other namespace options are there.

Signed-off-by: Matt Helsley <matthltc@us.ibm.com>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoisdn: Fix missing ifdef in isdn_ppp
Daniele Venzano [Mon, 26 Jan 2009 20:24:38 +0000 (12:24 -0800)]
isdn: Fix missing ifdef in isdn_ppp

The following patch fixes a warning caused by a missing ifdef in
isdn_ppp.c. A function was defined, but never used if CONFIG_IPPP_FILTER
was not defined.

The warning was: 'get_filter' defined but not used
Patch is against 2.6.28.1

Signed-off-by: Daniele Venzano <venza@brownhat.org>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoi2c: Warn on deprecated binding model use
Jean Delvare [Mon, 26 Jan 2009 20:19:57 +0000 (21:19 +0100)]
i2c: Warn on deprecated binding model use

Let the kernel developers know that i2c_attach_client() and
i2c_detach_client() are deprecated and should no longer be used.
Drivers using these should be converted to the standard device
driver binding model (probe and remove methods.)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Ben Dooks <ben-linux@fluff.org>
15 years agoeeprom: More consistent symbol names
Jean Delvare [Mon, 26 Jan 2009 20:19:57 +0000 (21:19 +0100)]
eeprom: More consistent symbol names

Now that all EEPROM drivers live in the same place, let's harmonize
their symbol names.

Also fix eeprom's dependencies, it definitely needs sysfs, and is no
longer experimental after many years in the kernel tree.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: David Brownell <dbrownell@users.sourceforge.net>
15 years agoeeprom: Move 93cx6 eeprom driver to /drivers/misc/eeprom
Wolfram Sang [Mon, 26 Jan 2009 20:19:54 +0000 (21:19 +0100)]
eeprom: Move 93cx6 eeprom driver to /drivers/misc/eeprom

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years agospi: Move at25 (for SPI eeproms) to /drivers/misc/eeprom
Wolfram Sang [Mon, 26 Jan 2009 20:19:54 +0000 (21:19 +0100)]
spi: Move at25 (for SPI eeproms) to /drivers/misc/eeprom

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years agoi2c: Move old eeprom driver to /drivers/misc/eeprom
Wolfram Sang [Mon, 26 Jan 2009 20:19:53 +0000 (21:19 +0100)]
i2c: Move old eeprom driver to /drivers/misc/eeprom

Update Kconfig text to specify this driver as I2C.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years agoi2c: Move at24 to drivers/misc/eeprom
Wolfram Sang [Mon, 26 Jan 2009 20:19:53 +0000 (21:19 +0100)]
i2c: Move at24 to drivers/misc/eeprom

As drivers/i2c/chips is going to go away, move the driver to
drivers/misc/eeprom. Other eeprom drivers may be moved here later, too.
Update Kconfig text to specify this driver as I2C.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years agoi2c: Quilt tree has moved
Jean Delvare [Mon, 26 Jan 2009 20:19:53 +0000 (21:19 +0100)]
i2c: Quilt tree has moved

My i2c quilt tree will now be hosted on kernel.org, because I can
conveniently use rsync there.

Also list the new i2c wiki.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years agoi2c: Delete many unused adapter IDs
Jean Delvare [Mon, 26 Jan 2009 20:19:52 +0000 (21:19 +0100)]
i2c: Delete many unused adapter IDs

Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years agoi2c: Delete 10 unused driver IDs
Jean Delvare [Mon, 26 Jan 2009 20:19:52 +0000 (21:19 +0100)]
i2c: Delete 10 unused driver IDs

Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years agonetworking: document "nc" in addition to "netcat" in netconsole.txt
Jesse Barnes [Mon, 26 Jan 2009 20:19:23 +0000 (12:19 -0800)]
networking: document "nc" in addition to "netcat" in netconsole.txt

It always annoyed me that the netconsole documentation didn't give me the
correct command for my distro.  Update it with a command line that actually
works on my Fedora install.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000e: workaround hw errata
Jesse Brandeburg [Mon, 26 Jan 2009 20:16:26 +0000 (12:16 -0800)]
e1000e: workaround hw errata

There is a hardware errata in some revisions of the 82574 that needs
to be worked around in the driver by setting a register bit at init.

If this bit is not set A0 versions of the 82574 can generate
tx hangs.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge git://git.infradead.org/battery-2.6
Linus Torvalds [Mon, 26 Jan 2009 18:43:04 +0000 (10:43 -0800)]
Merge git://git.infradead.org/battery-2.6

* git://git.infradead.org/battery-2.6:
  power_supply: pda_power: Don't request shared IRQs w/ IRQF_DISABLED

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm
Linus Torvalds [Mon, 26 Jan 2009 18:42:05 +0000 (10:42 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/teigland/dlm

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm:
  dlm: initialize file_lock struct in GETLK before copying conflicting lock
  dlm: fix plock notify callback to lockd

15 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux...
Linus Torvalds [Mon, 26 Jan 2009 18:41:00 +0000 (10:41 -0800)]
Merge branch 'for_linus' of git://git./linux/kernel/git/jack/linux-quota-2.6

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-quota-2.6:
  ocfs2: Remove ocfs2_dquot_initialize() and ocfs2_dquot_drop()
  quota: Improve locking

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
Linus Torvalds [Mon, 26 Jan 2009 18:40:28 +0000 (10:40 -0800)]
Merge git://git./linux/kernel/git/gregkh/driver-core-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
  klist.c: bit 0 in pointer can't be used as flag
  debugfs: introduce stub for debugfs_create_size_t() when DEBUG_FS=n
  sysfs: fix problems with binary files
  PNP: fix broken pnp lowercasing for acpi module aliases
  driver core: Convert '/' to '!' in dev_set_name()