safe/jmp/linux-2.6
14 years agoUSB: serial: no unnecessary GFP_ATOMIC in oti6858
Oliver Neukum [Wed, 7 Oct 2009 16:07:10 +0000 (18:07 +0200)]
USB: serial: no unnecessary GFP_ATOMIC in oti6858

GFP_ATOMIC without good cause is evil.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: fix race between unthrottle and completion handler in visor
Oliver Neukum [Wed, 7 Oct 2009 09:01:38 +0000 (11:01 +0200)]
USB: serial: fix race between unthrottle and completion handler in visor

usb:usbserial:visor: fix race between unthrottle and completion handler

visor_unthrottle() mustn't resubmit the URB unconditionally
as the URB may still be running.

the same bug as opticon.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: fix assumption that throttle/unthrottle cannot sleep
Oliver Neukum [Wed, 7 Oct 2009 08:50:23 +0000 (10:50 +0200)]
USB: serial: fix assumption that throttle/unthrottle cannot sleep

many serial subdrivers are clearly written as if throttle/unthrottle
cannot sleep. This leads to unneeded atomic submissions. This
patch converts affected drivers in a way to makes very clear that
throttle/unthrottle can sleep. Thus future misdesigns can be avoided
and efficiency and reliability improved.

This removes any such assumption using GFP_KERNEL and spin_lock_irq()

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: fix race between unthrottle and completion handler in symbolserial
Oliver Neukum [Wed, 7 Oct 2009 07:30:49 +0000 (09:30 +0200)]
USB: serial: fix race between unthrottle and completion handler in symbolserial

usb:usbserial:symbolserial: fix race between unthrottle and completion handler

symbol_unthrottle() mustn't resubmit the URB unconditionally
as the URB may still be running.

the same bug as opticon.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: fix race between unthrottle and completion handler in opticon
Oliver Neukum [Wed, 7 Oct 2009 07:25:10 +0000 (09:25 +0200)]
USB: serial: fix race between unthrottle and completion handler in opticon

usb:usbserial:opticon: fix race between unthrottle and completion handler

opticon_unthrottle() mustn't resubmit the URB unconditionally
as the URB may still be running.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ehci: Fix isoc scheduling boundary checking.
Sarah Sharp [Tue, 6 Oct 2009 20:45:59 +0000 (13:45 -0700)]
USB: ehci: Fix isoc scheduling boundary checking.

The EHCI driver does some bounds checking when it's scheduling an iTD for
an active endpoint.  It sets the local variable start to
stream->next_uframe and moves that variable further in the schedule if
necessary.  However, the driver fails to do anything with start before
jumping to the ready label and setting the URB's starting frame to
stream->next_uframe.  Alan Stern confirms the EHCI driver should set
stream->next_uframe to start before jumping.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: storage: When a device returns no sense data, call it a Hardware Error
Alan Stern [Tue, 6 Oct 2009 18:07:57 +0000 (14:07 -0400)]
USB: storage: When a device returns no sense data, call it a Hardware Error

This patch (as1294) fixes a problem that has plagued users for several
kernel releases.  Some USB mass-storage devices don't return any sense
data when they encounter certain kinds of errors.  The SCSI layer
interprets this to mean that the operation should be retried, and the
same thing happens -- over and over again with no limit.  In some
circumstances (such as when a bus reset occurs) that is the right
thing to do, but not here.

The patch checks for this condition (a transport failure with no sense
data) and changes the result code to DID_ERROR and the sense code to
Hardware Error.  This does get only a limited number of retries, and
so the command will fail relatively quickly instead of getting stuck
in an infinite loop.

This fixes a large part of Bugzilla #14118.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Mantas Mikulenas <grawity@gmail.com>
CC: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: small fix in error case of suspend in generic usbserial code
Oliver Neukum [Thu, 1 Oct 2009 13:01:17 +0000 (15:01 +0200)]
USB: small fix in error case of suspend in generic usbserial code

usb:usbserial: fix flags in error case of suspension

suspended flag must be reset in error case

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: visor: fix trivial accounting bug in visor driver
Oliver Neukum [Thu, 1 Oct 2009 12:54:46 +0000 (14:54 +0200)]
USB: visor: fix trivial accounting bug in visor driver

usb:usbserial:visor: fix accounting in error case

data not pushed to the tty layer due to an error mustn't be counted

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: Fix throttling in generic usbserial driver
Joris van Rantwijk [Thu, 24 Sep 2009 18:20:20 +0000 (20:20 +0200)]
USB: Fix throttling in generic usbserial driver

The generic usbserial driver in Linux 2.6.31 halts its receiving
channel in response to throttle requests from the line discipline.
Unfortunately it drops the contents of the first URB received after
throttling takes effect. This patch corrects that problem.

Signed-off-by: Joris van Rantwijk <jorispubl@xs4all.nl>
Acked-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: cp210x: Add support for the DW700 UART
Éric Piel [Sun, 4 Oct 2009 11:45:07 +0000 (13:45 +0200)]
USB: cp210x: Add support for the DW700 UART

In the Dell inspiron mini 10, the GPS is connected via a cp2102. This patch
adds detection of this USB device. (I haven't managed to use the GPS under
Linux yet, though)

Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ipaq: fix oops when device is plugged in
Alan Stern [Mon, 5 Oct 2009 19:53:58 +0000 (15:53 -0400)]
USB: ipaq: fix oops when device is plugged in

This patch (as1293) fixes a problem with the ipaq serial driver.  It
tries to bind to all the interfaces, even those that don't have enough
endpoints.  The symptom is an invalid memory reference and oops when
the device is plugged in.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: stable <stable@kernel.org>
Tested-by: Matthias Geissert <geissert@mathematik.tu-darmstadt.de>
Tested-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: isp1362: fix build warnings on 64-bit systems
Mike Frysinger [Wed, 7 Oct 2009 08:29:31 +0000 (04:29 -0400)]
USB: isp1362: fix build warnings on 64-bit systems

A bunch of places assumed pointers were 32-bits in size (bit checking and
debug output), but none of these affected runtime functionality.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: gadget: imx_udc: Use resource size
Tobias Klauser [Fri, 18 Sep 2009 07:14:46 +0000 (09:14 +0200)]
USB: gadget: imx_udc: Use resource size

Use the resource_size function instead of manually calculating the
resource size. This reduces the chance of introducing off-by-one errors.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: storage: iRiver P7 UNUSUAL_DEV patch
Sergey Pinaev [Thu, 17 Sep 2009 13:26:50 +0000 (17:26 +0400)]
USB: storage: iRiver P7 UNUSUAL_DEV patch

Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: musb: make HAVE_CLK support optional
Mike Frysinger [Thu, 17 Sep 2009 01:10:53 +0000 (21:10 -0400)]
USB: musb: make HAVE_CLK support optional

The Blackfin port doesn't support HAVE_CLK and the musb driver works fine
with support stubbed out, so take the existing Blackfin clk stubs and move
them to common musb code so we can drop the Kconfig dependency.

Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: xhci: Fix dropping endpoints from the xHC schedule.
Sarah Sharp [Fri, 18 Sep 2009 15:55:12 +0000 (08:55 -0700)]
USB: xhci: Fix dropping endpoints from the xHC schedule.

When an endpoint is to be dropped from the hardware bandwidth schedule, we
want to clear its add flag.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: xhci: Don't wait for a disable slot cmd when HC dies.
Sarah Sharp [Wed, 16 Sep 2009 23:42:39 +0000 (16:42 -0700)]
USB: xhci: Don't wait for a disable slot cmd when HC dies.

When the host controller dies or is removed while a device is plugged in,
the USB core will attempt to deallocate the struct usb_device.  That will
call into xhci_free_dev().  This function used to attempt to submit a
disable slot command to the host controller and clean up the device
structures when that command returned.  Change xhci_free_dev() to skip the
command submission and just free the memory if the host controller died.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: xhci: Handle canceled URBs when HC dies.
Sarah Sharp [Tue, 29 Sep 2009 00:21:37 +0000 (17:21 -0700)]
USB: xhci: Handle canceled URBs when HC dies.

When the host controller dies (e.g. it is removed from a PCI card slot),
the xHCI driver cannot expect commands to complete.  The buggy code this
patch fixes would mark an URB as canceled and then expect the URB to be
completed when the stop endpoint command completed.  That would never
happen if the host controller was dead, so the USB core would just hang in
the disconnect code.

If the host controller died, and the driver asks to cancel an URB, free
any structures associated with that URB and immediately give it back.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: xhci: Stop debugging polling loop when HC dies.
Sarah Sharp [Wed, 16 Sep 2009 23:42:30 +0000 (16:42 -0700)]
USB: xhci: Stop debugging polling loop when HC dies.

If the host controller card is removed from the system, stop the timer
function to debug the xHCI rings.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: usbtmc: fix timeout increase
Gergely Imreh [Tue, 15 Sep 2009 08:03:31 +0000 (16:03 +0800)]
USB: usbtmc: fix timeout increase

The current 10ms timeout is too short for some normal USBTMC device
operation, increase it to a value which was tested with previously
affected Tektronix oscilloscopes.

Signed-off-by: Gergely Imreh <imrehg@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: option: Patch for Huawei Mobile Broadband E270+ Modem
Ronnie Furuskog [Mon, 21 Sep 2009 19:20:55 +0000 (21:20 +0200)]
USB: option: Patch for Huawei Mobile Broadband E270+ Modem

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: option: Toshiba G450 device id
Peter Magdina [Wed, 7 Oct 2009 14:22:17 +0000 (16:22 +0200)]
USB: option: Toshiba G450 device id

Signed-off-by: Peter Magdina <peter@magdina.sk>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: usblcd, fix memory leak
Jiri Slaby [Wed, 23 Sep 2009 14:09:56 +0000 (16:09 +0200)]
USB: usblcd, fix memory leak

Stanse found a memory leak in lcd_probe. Instead of returning without
releasing the memory, jump to the error label which frees it.

http://stanse.fi.muni.cz/

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: sierra driver version change to 1.3.8
Elina Pasheva [Thu, 17 Sep 2009 22:26:20 +0000 (15:26 -0700)]
USB: serial: sierra driver version change to 1.3.8

Updated sierra driver version from 1.3.7 to 1.3.8 now that the autosuspend
capabilities were added to the driver.

Signed-off-by: Elina Pasheva <epasheva@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: don't call release without attach
Alan Stern [Fri, 9 Oct 2009 16:43:12 +0000 (12:43 -0400)]
USB: serial: don't call release without attach

This patch (as1295) fixes a recently-added bug in the USB serial core.
If certain kinds of errors occur during probing, the core may call a
serial driver's release method without previously calling the attach
method.  This causes some drivers (io_ti in particular) to perform an
invalid memory access.

The patch adds a new flag to keep track of whether or not attach has
been called.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Jean-Denis Girard <jd.girard@sysnux.pf>
CC: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: digi_acceleport: Fix broken unthrottle.
Johan Hovold [Tue, 29 Sep 2009 10:39:23 +0000 (12:39 +0200)]
USB: digi_acceleport: Fix broken unthrottle.

This patch fixes a regression introduced in
39892da44b21b5362eb848ca424d73a25ccc488f.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Acked-by: Oliver Neukum <oliver@neukum.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: pl2303: fix error characters not being reported to ldisc
Johan Hovold [Thu, 8 Oct 2009 09:36:46 +0000 (11:36 +0200)]
USB: pl2303: fix error characters not being reported to ldisc

Fix regression introduced by commit
d4fc4a7bfc2dee626f4fec1e209e58eaa4312de6 (tty: Fix the PL2303 private
methods for sysrq).

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ftdi_sio: re-implement read processing
Johan Hovold [Wed, 7 Oct 2009 18:05:07 +0000 (20:05 +0200)]
USB: ftdi_sio: re-implement read processing

- Re-structure read processing.
 - Kill obsolete work queue and always push to tty in completion handler.
 - Use tty_insert_flip_string instead of per character push when
   possible.
 - Fix stalled-read regression in 2.6.31 by using urb status to
   determine when port is closed rather than port count.
 - Fix race with open/close by checking ASYNCB_INITIALIZED in
   unthrottle.
 - Kill private rx_flag and lock and use throttle flags in
   usb_serial_port instead.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ftdi_sio: clean up read completion handler
Johan Hovold [Wed, 7 Oct 2009 18:05:06 +0000 (20:05 +0200)]
USB: ftdi_sio: clean up read completion handler

Remove superfluous error checks in completion handler:

 - No need to check private data and urb pointers as we check urb-status
   before dereferencing priv (which is not freed until urb has been killed
   on close).
 - No need to check tty as it is checked again when processing.
 - No need to check urb->number_of_packets on bulk urb.

Note that both private data and tty are checked again before processing
(possibly from work queue which also is cancelled on close).

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ftdi_sio: remove unused rx_byte counter
Johan Hovold [Wed, 7 Oct 2009 18:05:05 +0000 (20:05 +0200)]
USB: ftdi_sio: remove unused rx_byte counter

Remove unused rx_byte counter which is never exposed as noted by Alan
Cox.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ftdi_sio: remove tty->low_latency
Johan Hovold [Wed, 7 Oct 2009 18:05:04 +0000 (20:05 +0200)]
USB: ftdi_sio: remove tty->low_latency

Fixes tty_flip_buffer_push being called from hard interrupt context with
low_latency set.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agofujitsu-laptop: address missed led-class ifdef fixup
Jonathan Woithe [Thu, 8 Oct 2009 03:49:12 +0000 (13:19 +0930)]
fujitsu-laptop: address missed led-class ifdef fixup

A follow-up 2.6.32-rc1's

1e384cb0f9a940f2a431d1708f963987e61d71e3
"fujitsu-laptop: support led-class as module"

It's a trivial fix for one of the CONFIG_LEDS_CLASS ifdefs
which was somehow missed in the original patch.

Signed-off-by: Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoStaging: comedi: fix build on arches that don't want comedi drivers
Greg Kroah-Hartman [Thu, 8 Oct 2009 17:26:11 +0000 (10:26 -0700)]
Staging: comedi: fix build on arches that don't want comedi drivers

This should fix the problem of comedi drivers showing up on arches that
can not support the comedi subsystem (like s390).

Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: pcmcia irq fixes
Frank Mori Hess [Tue, 22 Sep 2009 20:32:55 +0000 (16:32 -0400)]
Staging: comedi: pcmcia irq fixes

Replaced IRQ_TYPE_EXCLUSIVE with IRQ_TYPE_DYNAMIC_SHARING for pcmcia
drivers.

Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: ni_pcimio: Added device id for pxi-6225.
Frank Mori Hess [Mon, 21 Sep 2009 20:10:21 +0000 (16:10 -0400)]
Staging: comedi: ni_pcimio: Added device id for pxi-6225.

Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: ni_65xx.c: fix output inversion problem.
Ian Abbott [Mon, 21 Sep 2009 20:05:01 +0000 (16:05 -0400)]
Staging: comedi: ni_65xx.c: fix output inversion problem.

When reading DO subdevice with inverted outputs invert the values read
back from the ports to match the inversion of values written.

Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: ni_65xx.c: fix insn_bits shift calculation.
Ian Abbott [Mon, 21 Sep 2009 20:01:56 +0000 (16:01 -0400)]
Staging: comedi: ni_65xx.c: fix insn_bits shift calculation.

Fix insn_bits bitshift calculation for subdevice with non-zero
base_port.

Thanks to cJ-comedi at zougloub dot eu for spotting the bug.

Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: s526: fixes for pulse generator
Ian Abbott [Mon, 21 Sep 2009 19:48:33 +0000 (15:48 -0400)]
Staging: comedi: s526: fixes for pulse generator

Some changes and corrections to handling of
INSN_CONFIG_GPCT_SINGLE_PULSE_GENERATOR, and
INSN_CONFIG_GPCT_PULSE_TRAIN_GENERATOR, so they interpret insn->data[]
as per the comments in the code.

Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: s526: Take account of arch's byte order.
Ian Abbott [Mon, 21 Sep 2009 19:38:34 +0000 (15:38 -0400)]
Staging: comedi: s526: Take account of arch's byte order.

Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: s526: Get rid of global variable 'cmReg'.
Ian Abbott [Mon, 21 Sep 2009 19:35:42 +0000 (15:35 -0400)]
Staging: comedi: s526: Get rid of global variable 'cmReg'.

Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: s526: Fix number of channels on DIO subdevice
Ian Abbott [Mon, 21 Sep 2009 19:29:59 +0000 (15:29 -0400)]
Staging: comedi: s526: Fix number of channels on DIO subdevice

Correct operation of INSN_CONFIG_DIO_INPUT and INSN_CONFIG_DIO_OUTPUT
and support INSN_CONFIG_DIO_QUERY.  Thanks to Alessio Margan for some
testing.

Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: cb_pcidio: fix "section mismatch" error
Ian Abbott [Mon, 21 Sep 2009 19:23:32 +0000 (15:23 -0400)]
Staging: comedi: cb_pcidio: fix "section mismatch" error

Store PCI device IDs in the board info and use this for matching IDs in
the code instead of using the module device table.

This avoids a "section mismatch" error.

Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: jr3_pci: Initialize transf variable fully in jr3_pci_poll_subdevice().
Ian Abbott [Mon, 21 Sep 2009 19:12:32 +0000 (15:12 -0400)]
Staging: comedi: jr3_pci: Initialize transf variable fully in jr3_pci_poll_subdevice().

Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: Corrected type of a printk argument in resize_async_buffer().
Ian Abbott [Mon, 21 Sep 2009 18:55:23 +0000 (14:55 -0400)]
Staging: comedi: Corrected type of a printk argument in resize_async_buffer().

Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: p9auth: a few fixes
Serge E. Hallyn [Wed, 16 Sep 2009 21:27:41 +0000 (16:27 -0500)]
Staging: p9auth: a few fixes

1. The memory into which we copy 'u1@u2' needs space for u1, @,
u2, and a final \0 which strcat copies in.
2. Strsep changes the value of its first argument.  So use a
temporary variable to pass to it, so we pass the original
value to kfree!
3. Allocate an extra char to user_buf, because we need a trailing \0
since we later kstrdup it.

I am about to send out an LTP testcase for this driver, but
in addition the correctness of the hashing can be verified as
follows:

 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>

int main(int argc, char *argv[])
{
        char in[41], out[20];
        unsigned int v;
        int i, ret;

        ret = read(STDIN_FILENO, in, 40);
        if (ret != 40)
                exit(1);
        in[40] = '\0';
        for (i = 0; i < 20; i++) {
                sscanf(&in[2*i], "%02x", &v);
                out[i] = v;
        }
        write(STDOUT_FILENO, out, 20);
}

as root, to test userid 501 switching to uid 0, choosing
'random' string 'ab':

echo -n "501@0" > plain
openssl sha1  -hmac 'ab' plain |awk '{ print $2 '} > dgst
./unhex < dgst > dgst.u
mknod /dev/caphash 504 0
mknod /dev/capuse 504 1
chmod ugo+w /dev/capuse
cat dgst.u > /dev/caphash

as uid 501,
echo "501@0@ab" > /dev/capuse
id -u  # should now show 0.

Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: rtl8192e: Add #include <linux/vmalloc.h>
Jeff Mahoney [Thu, 8 Oct 2009 21:30:40 +0000 (17:30 -0400)]
Staging: rtl8192e: Add #include <linux/vmalloc.h>

This driver uses vmalloc but for whatever reason vmalloc.h isn't included
on ppc.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: iio: Don't build on s390
Jeff Mahoney [Thu, 8 Oct 2009 21:32:42 +0000 (17:32 -0400)]
Staging: iio: Don't build on s390

The IIO core expects request_irq to work, which doesn't appear to exist
on s390.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: winbond: implement prepare_multicast and fix API usage
Jeff Mahoney [Thu, 8 Oct 2009 21:27:51 +0000 (17:27 -0400)]
Staging: winbond: implement prepare_multicast and fix API usage

This patch adds a prepare_multicast callback for the winbond driver
to properly receive mc_count in ->configure_filter.

This also fixes incompatible pointer assignment build errors because
->configure_filter had changed.

This is build tested only, but that's more than the original code received.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: w35und: Fix ->beacon_int breakage
Pekka Enberg [Mon, 21 Sep 2009 09:52:15 +0000 (12:52 +0300)]
Staging: w35und: Fix ->beacon_int breakage

Commit f424afa17899408cbd267a4c4534ca6fc9d8f71c ("mac80211: remove
deprecated API") removed ->beacon_int from struct ieee80211_conf. Fix
breakage in w35und by setting beacon period in ->add_interface to
bss_conf.beacon_int.

Cc: Jiri Benc <jbenc@suse.cz>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Sandro Bonazzola <sandro.bonazzola@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: remove cowloop driver
Greg Kroah-Hartman [Thu, 8 Oct 2009 18:32:31 +0000 (11:32 -0700)]
Staging: remove cowloop driver

The author has found a number of problems with the current version
of this driver in the current kernel, and is reworking it to get
things working again.  Because of that, it would be better to remove
the driver now and add it back in a future kernel release.

Cc: H.J. Thomassen <hjt@ATComputing.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: remove agnx driver
Greg Kroah-Hartman [Sat, 19 Sep 2009 17:50:02 +0000 (10:50 -0700)]
Staging: remove agnx driver

The agnx driver in the staging tree is broken, does not work, and
development is dead.  The developers have asked for it to be removed
so it now is.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: serial2002: fix include build issue
Greg Kroah-Hartman [Mon, 5 Oct 2009 20:23:31 +0000 (13:23 -0700)]
Staging: comedi: serial2002: fix include build issue

Now that sched.h was removed from poll.h, serial2002.c needs
to include it otherwise it does not build properly.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Fri, 9 Oct 2009 20:40:22 +0000 (13:40 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  RDMA/addr: Fix resolution of local IPv6 addresses
  RDMA/cxgb3: Handle NULL inetdev pointer in iwch_query_port()
  mlx4_core: Add 40GigE device ID
  RDMA/iwcm: Don't call provider reject func with irqs disabled
  IB: Fix typo in udev rule documentation

14 years agoIRQ: Change __softirq_pending to unsigned int in asm-generic/hardirq.h.
Ralf Baechle [Fri, 9 Oct 2009 10:41:30 +0000 (12:41 +0200)]
IRQ: Change __softirq_pending to unsigned int in asm-generic/hardirq.h.

Since the beginnings in aafe4dbed0bf6cbdb2e9f03e1d42f8a540d8541d
("asm-generic: add generic versions of common headers") the generic
version of <asm/hardirq.h> defined __softirq_pending as unsigned long.

Which is different from other architectures for no apparent good reason
and was causing the following warning:

  kernel/time/tick-sched.c: In function 'tick_nohz_stop_sched_tick':
  kernel/time/tick-sched.c:261: warning: format '%02x' expects type 'unsigned int', but argument 2 has type 'long unsigned int'

Reported and initial patch by Wu Zhangjin <wuzhangjin@gmail.com>.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
[ Arnd points out that we really should make sure parisc and alpha are
  ok with this, since they have also been converted to use the generic
  hardirq.h file. But neither seems to use it, although parisc does
  build a IRQSTAT_SIRQ_PEND #define into asm-offsets - but that also
  appears unused..    - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Fri, 9 Oct 2009 20:32:24 +0000 (13:32 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: i8042 - print debug data when testing AUX IRQ delivery
  Input: libps2 - fix dependancy on i8042
  Input: fix rx51 board keymap
  Input: ad7879 - pass up error codes from probe functions
  Input: xpad - add BigBen Interactive XBOX 360 Controller
  Input: rotary_encoder - fix relative axis support
  Input: sparkspkr - move remove() functions to .devexit.text
  Input: wistron_btns - add DMI entry for Medion WIM2030 laptop

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier...
Linus Torvalds [Fri, 9 Oct 2009 20:31:47 +0000 (13:31 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/vapier/blackfin

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin:
  Blackfin: convert to GENERIC_HARDIRQS_NO__DO_IRQ
  Blackfin: drop all simple-gpio board resources
  Blackfin: fix framebuffer mmap bug for nommu
  Blackfin: includecheck fix: mach-bf548, ezkit.c
  Blackfin: drop cs_change_per_word setting
  Blackfin: bf533-ezkit: convert to physmap/jedec_probe
  Blackfin: convert adv7393 resources to new i2c framework
  Blackfin: fix missed cache config renames
  Blackfin: cplbinfo: drop d_path() hacks
  Blackfin: asm/irq.h: pull in mach/anomaly.h for anomaly defines
  Blackfin: BF51x: add PTP MMR defines
  Blackfin: mass clean up of copyright/licensing info
  Blackfin: convert to use arch_gettimeoffset()

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Fri, 9 Oct 2009 20:30:50 +0000 (13:30 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/security-testing-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
  TPM: fix pcrread

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs...
Linus Torvalds [Fri, 9 Oct 2009 20:30:14 +0000 (13:30 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ecryptfs/ecryptfs-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs/ecryptfs-2.6:
  ima: ecryptfs fix imbalance message
  eCryptfs: Remove Kconfig NET dependency and select MD5
  ecryptfs: depends on CRYPTO

14 years agoMerge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
Linus Torvalds [Fri, 9 Oct 2009 20:29:42 +0000 (13:29 -0700)]
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs

* 'for-linus' of git://oss.sgi.com/xfs/xfs:
  xfs: stop calling filemap_fdatawait inside ->fsync
  fix readahead calculations in xfs_dir2_leaf_getdents()
  xfs: make sure xfs_sync_fsdata covers the log
  xfs: mark inodes dirty before issuing I/O
  xfs: cleanup ->sync_fs
  xfs: fix xfs_quiesce_data
  xfs: implement ->dirty_inode to fix timestamp handling

14 years agokmemleak: Check for NULL pointer returned by create_object()
Catalin Marinas [Fri, 9 Oct 2009 09:30:34 +0000 (10:30 +0100)]
kmemleak: Check for NULL pointer returned by create_object()

This patch adds NULL pointer checking in the early_alloc() function.

Reported-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agokmemleak: Use GFP_ATOMIC for early_alloc().
Tetsuo Handa [Fri, 9 Oct 2009 09:39:24 +0000 (10:39 +0100)]
kmemleak: Use GFP_ATOMIC for early_alloc().

We can't use GFP_KERNEL inside rcu_read_lock().

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agooprofile: warn on freeing event buffer too early
Robert Richter [Fri, 9 Oct 2009 01:17:44 +0000 (03:17 +0200)]
oprofile: warn on freeing event buffer too early

A race shouldn't happen since all workqueues or handlers are canceled
or flushed before the event buffer is freed. A warning is triggered
now if the buffer is freed too early.

Also, this patch adds some comments about event buffer protection,
reworks some code and adds code to clear buffer_pos during alloc and
free of the event buffer.

Cc: David Rientjes <rientjes@google.com>
Cc: Stephane Eranian <eranian@google.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
14 years agohwmon: (s3c-hwmon) Disable build for S3C64xx
Mark Brown [Fri, 9 Oct 2009 18:35:21 +0000 (20:35 +0200)]
hwmon: (s3c-hwmon) Disable build for S3C64xx

The s3c-hwmon driver depends on the arch/arm implementation of the core
ADC support for the chip.  Since the S3C64xx version has not yet been
merged disable building of the driver on S3C64xx for now.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoMAINTAINERS: Fix Riku Voipio's address
Jean Delvare [Fri, 9 Oct 2009 18:35:19 +0000 (20:35 +0200)]
MAINTAINERS: Fix Riku Voipio's address

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Riku Voipio <riku.voipio@iki.fi>
14 years agohwmon: (asus_atk0110) Enable the EC
Luca Tettamanti [Fri, 9 Oct 2009 18:35:18 +0000 (20:35 +0200)]
hwmon: (asus_atk0110) Enable the EC

On newer ASUS boards (e.g. P7P55D) the EC (that - among other things - is
responsible for updating the readings from the hwmon sensors) is disabled
by default since ASUS detected conflict with some tools under Windows.
The following patch checks the state of the EC and enable it if needed;
under Linux, native drivers are locked out from ACPI owned resources so
there's no risk of conflict.

Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
Tested-by: Robert Hancock <hancockrwd@gmail.com>
Tested-by: Thomas Backlund <tmb@mandriva.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agohwmon: (asus_atk0110) Refactor the code
Luca Tettamanti [Fri, 9 Oct 2009 18:35:18 +0000 (20:35 +0200)]
hwmon: (asus_atk0110) Refactor the code

Refactor the code of the new style interface around GGRP (enumeration) and
GITM (read) helpers to mimic ASL code. Also switch the read path to use
dynamic buffers (handled by ACPI core) since ASUS expanded the return buffer
(ASBF) in newer boards (e.g. P7P55D).

Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
Tested-by: Robert Hancock <hancockrwd@gmail.com>
Tested-by: Thomas Backlund <tmb@mandriva.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agohwmon: (sht15) Fix spurious section mismatch warning
Rakib Mullick [Fri, 9 Oct 2009 18:35:17 +0000 (20:35 +0200)]
hwmon: (sht15) Fix spurious section mismatch warning

Fix spurious section mismatch warnings, caused due to reference from
variable sht_drivers to
 __devinit/__devexit functions sht15_probe()/remove().

 We were warned by the following warnings:

  LD      drivers/hwmon/built-in.o
WARNING: drivers/hwmon/built-in.o(.data+0x264a0): Section mismatch in
reference from the variable sht_drivers to the function
.devinit.text:sht15_probe()
The variable sht_drivers references
the function __devinit sht15_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

WARNING: drivers/hwmon/built-in.o(.data+0x264a4): Section mismatch in
reference from the variable sht_drivers to the function
.devexit.text:sht15_remove()
The variable sht_drivers references
the function __devexit sht15_remove()
If the reference is valid then annotate the
variable with __exit* (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

WARNING: drivers/hwmon/built-in.o(.data+0x264f0): Section mismatch in
reference from the variable sht_drivers to the function
.devinit.text:sht15_probe()
The variable sht_drivers references
the function __devinit sht15_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

WARNING: drivers/hwmon/built-in.o(.data+0x264f4): Section mismatch in
reference from the variable sht_drivers to the function
.devexit.text:sht15_remove()
The variable sht_drivers references
the function __devexit sht15_remove()
If the reference is valid then annotate the
variable with __exit* (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

WARNING: drivers/hwmon/built-in.o(.data+0x26540): Section mismatch in
reference from the variable sht_drivers to the function
.devinit.text:sht15_probe()
The variable sht_drivers references
the function __devinit sht15_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

WARNING: drivers/hwmon/built-in.o(.data+0x26544): Section mismatch in
reference from the variable sht_drivers to the function
.devexit.text:sht15_remove()
The variable sht_drivers references
the function __devexit sht15_remove()
If the reference is valid then annotate the
variable with __exit* (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

WARNING: drivers/hwmon/built-in.o(.data+0x26590): Section mismatch in
reference from the variable sht_drivers to the function
.devinit.text:sht15_probe()
The variable sht_drivers references
the function __devinit sht15_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoACPI: Kconfig, fix proc aggregator text
Jiri Slaby [Fri, 9 Oct 2009 13:53:24 +0000 (15:53 +0200)]
ACPI: Kconfig, fix proc aggregator text

Fix two typos in the Kconfig text about ACPI_PROCESSOR_AGGREGATOR.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Fri, 9 Oct 2009 16:35:50 +0000 (09:35 -0700)]
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:
  ahci: Add ifdef wrapper to ahci_gtf_filter_workaround

14 years agoMerge branch 'sh/for-2.6.32' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal...
Linus Torvalds [Fri, 9 Oct 2009 16:34:52 +0000 (09:34 -0700)]
Merge branch 'sh/for-2.6.32' of git://git./linux/kernel/git/lethal/sh-2.6

* 'sh/for-2.6.32' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh: Don't allocate smaller sized mappings on every iteration
  sh: Try PMB mapping based on physical address, not mapping size
  sh: Plug PMB alloc memory leak
  sh: Sprinkle __uses_jump_to_uncached
  sh: enable sleep state LEDs on Ecovec24
  usb: r8a66597-udc unaligned fifo fix
  sh: mach-ecovec24: Document DS2 switch settings.
  sh: Build fix: export __movmem
  sh: Disable unaligned kernel access printks by default.
  sh: mach-ecovec24: modify 1st MTD area to read only
  sh: mach-ecovec24: Add TouchScreen support
  sh: magicpanelr2 and dreamcast can use the generic I/O base.
  sh: Don't enable interrupts in the page fault path
  sh: Set the default I/O port base to P2SEG.
  sh: Handle ioport_map() cases for >= P1SEG addresses.

14 years agoMerge branch 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt...
Linus Torvalds [Fri, 9 Oct 2009 16:19:23 +0000 (09:19 -0700)]
Merge branch 'drm-intel-next' of git://git./linux/kernel/git/anholt/drm-intel

* 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel:
  drm/i915: Initialize HDMI outputs as HDMI connectors, not DVI.
  drm/i915: Multiply the refresh by 1000 in TV mode validatiion
  drm/i915: Enable irq to trace batch buffer completion.
  drm/i915: batch submit seqno off-by-one.
  drm/i915: Record device minor rather than pointer in TRACE_EVENT
  drm/i915: Don't call intel_update_fbc from intel_crtc_cursor_set

14 years agooprofile: fix race condition in event_buffer free
David Rientjes [Wed, 9 Sep 2009 13:02:33 +0000 (15:02 +0200)]
oprofile: fix race condition in event_buffer free

Looking at the 2.6.31-rc9 code, it appears there is a race condition
in the event_buffer cleanup code path (shutdown). This could lead to
kernel panic as some CPUs may be operating on the event buffer AFTER
it has been freed. The attached patch solves the problem and makes
sure CPUs check if the buffer is not NULL before they access it as
some may have been spinning on the mutex while the buffer was being
freed.

The race may happen if the buffer is freed during pending reads. But
it is not clear why there are races in add_event_entry() since all
workqueues or handlers are canceled or flushed before the event buffer
is freed.

Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
14 years agoALSA: hda - Add full rates/formats support for Nvidia HDMI
Takashi Iwai [Fri, 9 Oct 2009 15:44:08 +0000 (17:44 +0200)]
ALSA: hda - Add full rates/formats support for Nvidia HDMI

Allow Nvidia HDMI to support more possible sample rates and formats.
At best, the really supported rates and formats should be determined
together with the negotiation with the HDMI receiver, but it's currently
not implemented yet (Nvidia stuff seems incompatible with HDMI 1.3
standard in this regard).  As a compromise, we enable all bits, assuming
that all recent devices do support such rates/formats.

Tested-by: Alan Alan <alanwww1@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoBtrfs: fix file clone ioctl for bookend extents
Chris Mason [Fri, 9 Oct 2009 15:29:53 +0000 (11:29 -0400)]
Btrfs: fix file clone ioctl for bookend extents

The file clone ioctl was incorrectly taking the offset into the
extent on disk into account when calculating the length of the
cloned extent.

The length never changes based on the offset into the physical extent.

Test case:

fallocate -l 1g image
mke2fs image
bcp image image2
e2fsck -f image2

(errors on image2)

The math bug ends up wrapping the length of the extent, and things
go wrong from there.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoRevert "x86, timers: Check for pending timers after (device) interrupts"
Ingo Molnar [Fri, 9 Oct 2009 13:58:20 +0000 (15:58 +0200)]
Revert "x86, timers: Check for pending timers after (device) interrupts"

This reverts commit 9bcbdd9c58617f1301dd4f17c738bb9bc73aca70.

The real bug producing LatencyTop latencies has been fixed in:

  f5dc375: sched: Update the clock of runqueue select_task_rq() selected

And the commit being reverted here triggers local timer processing
from every device IRQ. If device IRQs come in at a high frequency,
this could cause a performance regression.

The commit being reverted here purely 'fixed' the reported latency
as a side effect, because CPUs were being moved out of idle more
often.

Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Frans Pop <elendil@planet.nl>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
LKML-Reference: <20091008064041.67219b13@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agosched: Update the clock of runqueue select_task_rq() selected
Mike Galbraith [Fri, 9 Oct 2009 06:35:03 +0000 (08:35 +0200)]
sched: Update the clock of runqueue select_task_rq() selected

In try_to_wake_up(), we update the runqueue clock, but
select_task_rq() may select a different runqueue than the one we
updated, leaving the new runqueue's clock stale for a bit.

This patch cures occasional huge latencies reported by latencytop
when coming out of idle on a mostly idle NO_HZ box.

Signed-off-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1255070103.7639.30.camel@marge.simson.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoBtrfs: fix uninit compiler warning in cow_file_range_nocow
Chris Mason [Fri, 9 Oct 2009 13:57:45 +0000 (09:57 -0400)]
Btrfs: fix uninit compiler warning in cow_file_range_nocow

The extent_type variable was exposed uninit via a goto.  It should be
impossible to trigger because it is protected by a check on another
variable, but this makes sure.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agolockdep: Use cpu_clock() for lockstat
Peter Zijlstra [Fri, 9 Oct 2009 08:12:41 +0000 (10:12 +0200)]
lockdep: Use cpu_clock() for lockstat

Some tracepoint magic (TRACE_EVENT(lock_acquired)) relies on
the fact that lock hold times are positive and uses div64 on
that. That triggered a build warning on MIPS, and probably
causes bad output in certain circumstances as well.

Make it truly positive.

Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1254818502.21044.112.camel@laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoBtrfs: constify dentry_operations
Alexey Dobriyan [Fri, 9 Oct 2009 13:54:36 +0000 (09:54 -0400)]
Btrfs: constify dentry_operations

Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: optimize back reference update during btrfs_drop_snapshot
Yan, Zheng [Fri, 9 Oct 2009 13:25:16 +0000 (09:25 -0400)]
Btrfs: optimize back reference update during btrfs_drop_snapshot

This patch reading level 0 tree blocks that already use full backrefs.

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: remove negative dentry when deleting subvolumne
Yan, Zheng [Fri, 9 Oct 2009 13:25:16 +0000 (09:25 -0400)]
Btrfs: remove negative dentry when deleting subvolumne

The use of btrfs_dentry_delete is removing dentries from the
dcache when deleting subvolumne. btrfs_dentry_delete ignores
negative dentries. This is incorrect since if we don't remove
the negative dentry, its parent dentry can't be removed.

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agowriteback: kill space in debugfs item name
Wu Fengguang [Fri, 9 Oct 2009 11:01:27 +0000 (13:01 +0200)]
writeback: kill space in debugfs item name

The space is not script friendly, kill it.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agowriteback: account IO throttling wait as iowait
Wu Fengguang [Fri, 9 Oct 2009 10:40:42 +0000 (12:40 +0200)]
writeback: account IO throttling wait as iowait

It makes sense to do IOWAIT when someone is blocked
due to IO throttle, as suggested by Kame and Peter.

There is an old comment for not doing IOWAIT on throttle,
however it has been mismatching the code for a long time.

If we stop accounting IOWAIT for 2.6.32, it could be an
undesirable behavior change. So restore the io_schedule.

CC: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
CC: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agosparc64: Fix niagara2 perf IRQ bits.
David S. Miller [Fri, 9 Oct 2009 07:42:40 +0000 (00:42 -0700)]
sparc64: Fix niagara2 perf IRQ bits.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoelv_iosched_store(): fix strstrip() misuse
KOSAKI Motohiro [Fri, 9 Oct 2009 06:48:08 +0000 (08:48 +0200)]
elv_iosched_store(): fix strstrip() misuse

elv_iosched_store() ignore the return value of strstrip().  It makes small
inconsistent behavior.

This patch fixes it.

 <before>
 ====================================
 # cd /sys/block/{blockdev}/queue

 case1:
 # echo "anticipatory" > scheduler
 # cat scheduler
 noop [anticipatory] deadline cfq

 case2:
 # echo "anticipatory " > scheduler
 # cat scheduler
 noop [anticipatory] deadline cfq

 case3:
 # echo " anticipatory" > scheduler
 bash: echo: write error: Invalid argument

 <after>
 ====================================
 # cd /sys/block/{blockdev}/queue

 case1:
 # echo "anticipatory" > scheduler
 # cat scheduler
 noop [anticipatory] deadline cfq

 case2:
 # echo "anticipatory " > scheduler
 # cat scheduler
 noop [anticipatory] deadline cfq

 case3:
 # echo " anticipatory" > scheduler
 noop [anticipatory] deadline cfq

Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoibm_newemac: Added 16K Tx FIFO size support for EMAC4
Dave Mitchell [Thu, 8 Oct 2009 06:32:21 +0000 (06:32 +0000)]
ibm_newemac: Added 16K Tx FIFO size support for EMAC4

Some of the EMAC V4 implementations support 16K Tx FIFOs. This
patch adds support for this functionality and fixes typos in the
Tx FIFO size error messages.

Signed-off-by: Dave Mitchell <dmitchell@appliedmicro.com>
Acked-by: Prodyut Hazarika <phazarika@appliedmicro.com>
Acked-by: Victor Gallardo <vgallardo@appliedmicro.com>
Acked-by: Loc Ho <lho@appliedmicro.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Add disable/enable firmare irqs to handler.
Ron Mercer [Thu, 8 Oct 2009 09:54:43 +0000 (09:54 +0000)]
qlge: Add disable/enable firmare irqs to handler.

This was accidentally omitted from one of the previous patches for firmware event
handling.  The handler needs to the enable firmware irq mask when it's done
processing or it may not get any more events interrupts.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Restore rx mode after internal reset.
Ron Mercer [Thu, 8 Oct 2009 09:54:42 +0000 (09:54 +0000)]
qlge: Restore rx mode after internal reset.

Call set_multi API after reset recovery.  This was exposed by tripping
tx_timeout.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Fix chip reset process.
Ron Mercer [Thu, 8 Oct 2009 09:54:41 +0000 (09:54 +0000)]
qlge: Fix chip reset process.

Add wait for NIC fifo and MGMNT fifo to empty before applying reset.
Otherwise broken frames can be processed by management processor and
cause it to hang.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Fix RX multicast filter settings.
Ron Mercer [Thu, 8 Oct 2009 09:54:40 +0000 (09:54 +0000)]
qlge: Fix RX multicast filter settings.

The addresses were being added to the filter properly, but were not
being enabled.  This adds enable bit to filter write.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Fix frame routing for multicast frames.
Ron Mercer [Thu, 8 Oct 2009 09:54:39 +0000 (09:54 +0000)]
qlge: Fix frame routing for multicast frames.

Broadcast/multicast should always be routed to the default (zeroeth) rx
ring.  Broadcast frames are already routed correctly.  This fixes
routing for multicast frames.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Fix frame routing issue related to bonding.
Ron Mercer [Thu, 8 Oct 2009 09:54:38 +0000 (09:54 +0000)]
qlge: Fix frame routing issue related to bonding.

Currently frames are routed based on their type and MAC address. This
patch adds the port number on which the frame arrived to the routing.
This prevents problems in the case where both interfaces have the same MAC address in
a routing configuration.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Fix RSS hashing values.
Ron Mercer [Thu, 8 Oct 2009 09:54:37 +0000 (09:54 +0000)]
qlge: Fix RSS hashing values.

Fix RX queue table size and change from random to default hash values.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotracing: fix trace_vprintk call
Steven Rostedt [Fri, 9 Oct 2009 05:41:35 +0000 (01:41 -0400)]
tracing: fix trace_vprintk call

The addition of trace_array_{v}printk used the wrong function for
trace_vprintk to call. This broke trace_marker and trace_vprintk
itself. Although trace_printk may not have been affected by those
that end up calling trace_vbprintk.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
14 years agoahci: Add ifdef wrapper to ahci_gtf_filter_workaround
Markus Trippelsdorf [Fri, 9 Oct 2009 03:41:47 +0000 (05:41 +0200)]
ahci: Add ifdef wrapper to ahci_gtf_filter_workaround

Commit f80ae7e45a0e03da188494c6e947a5c8b0cdfb4a
ahci: filter FPDMA non-zero offset enable for Aspire 3810T
breaks the current git build for configurations that don't define
CONFIG_ATA_ACPI.
This adds an ifdef wrapper to ahci_gtf_filter_workaround.

Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agoInput: i8042 - print debug data when testing AUX IRQ delivery
Dmitry Torokhov [Fri, 9 Oct 2009 03:58:13 +0000 (20:58 -0700)]
Input: i8042 - print debug data when testing AUX IRQ delivery

Sometimes it is not clear why IRQ delivery test failed so let's
add some debug printks so we know the exact reason.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
14 years agosh: Don't allocate smaller sized mappings on every iteration
Matt Fleming [Tue, 6 Oct 2009 21:22:34 +0000 (21:22 +0000)]
sh: Don't allocate smaller sized mappings on every iteration

Currently, we've got the less than ideal situation where if we need to
allocate a 256MB mapping we'll allocate four entries like so,

 entry 1: 128MB
 entry 2:  64MB
 entry 3:  16MB
 entry 4:  16MB

This is because as we execute the loop in pmb_remap() we will
progressively try mapping the remaining address space with smaller and
smaller sizes. This isn't good because the size we use on one iteration
may be the perfect size to use on the next iteration, for instance when
the initial size is divisible by one of the PMB mapping sizes.

With this patch, we now only need two entries in the PMB to map 256MB of
address space,

  entry 1: 128MB
  entry 2: 128MB

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Try PMB mapping based on physical address, not mapping size
Matt Fleming [Tue, 6 Oct 2009 21:22:27 +0000 (21:22 +0000)]
sh: Try PMB mapping based on physical address, not mapping size

We should favour PMB mappings when the physical address cannot be
reached with 29-bits.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Plug PMB alloc memory leak
Matt Fleming [Tue, 6 Oct 2009 21:22:22 +0000 (21:22 +0000)]
sh: Plug PMB alloc memory leak

If we fail to allocate a PMB entry in pmb_remap() we must remember to
clear and free any PMB entries that we may have previously allocated,
e.g. if we were allocating a multiple entry mapping.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>