]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
15 years agoOMAP: HSMMC: Implement scatter-gather emulation
Juha Yrjola [Fri, 14 Nov 2008 13:22:00 +0000 (15:22 +0200)]
OMAP: HSMMC: Implement scatter-gather emulation

Instead of using the bounce buffer, using scatter-gather emulation
(as in the OMAP1/2 MMC driver) removes the need of one extra memory
copy and improves performance.

Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
15 years agoOMAP: HSMMC: Use mod_timer from a single point for readability.
Jarkko Lavinen [Thu, 6 Nov 2008 14:02:30 +0000 (16:02 +0200)]
OMAP: HSMMC: Use mod_timer from a single point for readability.

Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com>
15 years agoOMAP: HSMMC: Fix SDVS values in omap_mmc_switch_opcond
Jarkko Lavinen [Thu, 6 Nov 2008 14:02:28 +0000 (16:02 +0200)]
OMAP: HSMMC: Fix SDVS values in omap_mmc_switch_opcond

Set only 1.8V as SDVS value in HCTL register for HSMMC2 and HSMMC3.

Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com>
15 years agoOMAP: HSMMC: Fix oops in omap_mmc_remove
Jarkko Lavinen [Thu, 6 Nov 2008 14:02:29 +0000 (16:02 +0200)]
OMAP: HSMMC: Fix oops in omap_mmc_remove

Do not access host in omap_mmc_remove() if it is null.  This
occurs when module is removed before its platform data is set.

Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com>
15 years agoOMAP: HSMMC: Fix suspend/resume for MMCHS2
Jarkko Lavinen [Tue, 28 Oct 2008 09:12:28 +0000 (11:12 +0200)]
OMAP: HSMMC: Fix suspend/resume for MMCHS2

For HSMMC2 and HSMMC3 set SDVSS to 1.8V in HCTL before enabling the SDBP bit.

Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com>
15 years agoOMAP: HSMMC: Make fclk disable request driven.
Jarkko Lavinen [Fri, 24 Oct 2008 13:30:26 +0000 (16:30 +0300)]
OMAP: HSMMC: Make fclk disable request driven.

Start idle timer only at the end of request or request like operation
such card detect, set_ios, probe, or resume. This will ensure the fclk is
disable quickly after the operation is done, but never too early.

Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com>
15 years agoOMAP: HSMMC: Ensure fclk is running before accessing HSMMC registers
Jarkko Lavinen [Fri, 24 Oct 2008 13:03:23 +0000 (16:03 +0300)]
OMAP: HSMMC: Ensure fclk is running before accessing HSMMC registers

Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com>
15 years agoOMAP: HSMMC: Make driver support dynamic idle
Amit Kucheria [Mon, 22 Sep 2008 07:23:09 +0000 (10:23 +0300)]
OMAP: HSMMC: Make driver support dynamic idle

Add a timer that is kept active by MMC requests. FCLK is disabled on timeout

Signed-off-by: Amit Kucheria <amit.kucheria@verdurent.com>
15 years agosync isp1301_omap with mainlne
David Brownell [Mon, 24 Nov 2008 18:32:49 +0000 (10:32 -0800)]
sync isp1301_omap with mainlne

Sync OMAP git with mainline ... build tested.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoremove gpio_expander_omap
David Brownell [Mon, 24 Nov 2008 18:29:34 +0000 (10:29 -0800)]
remove gpio_expander_omap

Now that H3 is converted to use GPIO calls, get rid of the
legacy gpio_expander_omap code ... it has no more users.

One more needless divergence from mainline gone!

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoH3 stops using <mach/gpioexpander.h>
David Brownell [Mon, 24 Nov 2008 18:28:15 +0000 (10:28 -0800)]
H3 stops using <mach/gpioexpander.h>

Update board-h3.c to use standard GPIO calls to set up the
IRDA transceiver, not legacy OMAP-only gpioexpander code.

Also, move the #include <.../ov9640.h>; the header is gone,
there's currently no driver for that camera sensor.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agotwl4030 cleanup symbols and OMAP dependency
David Brownell [Thu, 20 Nov 2008 01:29:59 +0000 (17:29 -0800)]
twl4030 cleanup symbols and OMAP dependency

Finish removing dependency of TWL driver stack on platform-specific
IRQ definitions ... and remove the build dependency on OMAP.

This lets the TWL4030 code be included in test builds for most
platforms, and will make it easier for non-OMAP folk to update
most of this code for new APIs etc.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agotwl4030 power button irq
David Brownell [Thu, 20 Nov 2008 01:28:58 +0000 (17:28 -0800)]
twl4030 power button irq

Disable the TWL4030_PWRIRQ_PWRBTN symbol from the system headers;
initialization of the power button handler still needs work, so
an equivalent symbol is defined in its driver.

Power IRQs now properly handle trigger specs from request_irq();
stop goofing with registers reserved to the IRQ infrastructure.

Minor cleanup:  switch several messages to pr_debug().

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agotwl4030 MADC irq
David Brownell [Thu, 20 Nov 2008 01:28:16 +0000 (17:28 -0800)]
twl4030 MADC irq

Disable the TWL4030_MODIRQ_MADC symbol and remove all its uses.
It's not needed any more now that platform_get_irq() works for
these MADC devices.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agotwl4030 BCI irq and dependencies
David Brownell [Thu, 20 Nov 2008 01:27:36 +0000 (17:27 -0800)]
twl4030 BCI irq and dependencies

Disable the TWL4030_MODIRQ_BCI symbol and remove all its uses.
It's not needed any more now that platform_get_irq() works for
these BCI devices.

Also remove inappropriate board-specific Kconfig dependencies.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agotwl4030 keypad irq & dependencies
David Brownell [Thu, 20 Nov 2008 01:11:01 +0000 (17:11 -0800)]
twl4030 keypad irq & dependencies

Disable the TWL4030_MODIRQ_KEYPAD symbol and remove all its uses.
It's not needed any more now that platform_get_irq() works for
these keypad devices.

Also remove inappropriate board-specific Kconfig dependencies.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agotwl: beagle regulator updates
David Brownell [Sat, 15 Nov 2008 20:41:34 +0000 (12:41 -0800)]
twl: beagle regulator updates

Add init data for the LDO regulators used on Beagle boards:

 - VMMC1 is the main MMC1 power
 - VSIM powers MMC1 too:  DAT4-DAT7 pins, for HSMMC cards
 - VDAC for S-Video output

Those regulators need to be hooked up to the MMC1 and FB (?) devices
through the regulator framework.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agotwl: create regulator devices
David Brownell [Sat, 15 Nov 2008 20:40:35 +0000 (12:40 -0800)]
twl: create regulator devices

Initial code to create twl4030 voltage regulator devices, using
the new regulator framework.  Note that this now starts to care
what name is used to declare the TWL chip:

 - TWL4030 is the "old" chip; newer ones have a bigger variety
   of VAUX2 voltages.

 - The tps65930 and tps65920 are cost-reduced catalog versions of
   the TWL5030 parts ... fewer regulators, no BCI, etc.  (Rev C
   Beagles were anticipated to use '930 parts...)

Board-specific regulator configuration should be provided, listing
which regulators are used and their constraints (e.g. 1.8V only).

Code that could ("should"?) leverage the regulator stuff includes
twl4030 USB transceiver support and MMC glue, LCD support for the
3430SDP and Labrador boards, and S-Video output.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agotwl: update overo and pandora i2c data
David Brownell [Sat, 15 Nov 2008 20:38:43 +0000 (12:38 -0800)]
twl: update overo and pandora i2c data

Update Pandora and Overo board-specific code to report that
they use catalog versions of the twl5030 ... this affects
the range of usable VAUX2 voltages.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoTypo fix for clock_allow_idle
Amit Kucheria [Mon, 22 Sep 2008 07:23:09 +0000 (10:23 +0300)]
Typo fix for clock_allow_idle

Signed-off-by: Amit Kucheria <amit.kucheria@verdurent.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: OMAP: Extend gpio label column width in omap_gpio debugfs file
Jarkko Nikula [Wed, 12 Nov 2008 08:02:39 +0000 (10:02 +0200)]
ARM: OMAP: Extend gpio label column width in omap_gpio debugfs file

There are already various drivers having bigger label than 10 bytes. Most
of them fit well under 20 bytes but make column width exact so that
oversized labels don't mess up output alignment.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoUSB: OHCI-OMAP: Switch to gpio_request/free calls (OMAP and mainline)
Jarkko Nikula [Tue, 25 Nov 2008 14:12:14 +0000 (16:12 +0200)]
USB: OHCI-OMAP: Switch to gpio_request/free calls (OMAP and mainline)

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: OMAP: Switch to gpio_request/free calls (OMAP and mainline)
Jarkko Nikula [Tue, 25 Nov 2008 14:12:13 +0000 (16:12 +0200)]
ARM: OMAP: Switch to gpio_request/free calls (OMAP and mainline)

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP3 clock: disable DPLL autoidle while waiting for DPLL to lock
Paul Walmsley [Fri, 14 Nov 2008 17:46:14 +0000 (10:46 -0700)]
OMAP3 clock: disable DPLL autoidle while waiting for DPLL to lock

During _omap3_noncore_dpll_lock(), if a DPLL has no active downstream
clocks and DPLL autoidle is enabled, the DPLL may never lock, since it
will enter autoidle immediately.  To resolve this, disable DPLL
autoidle while locking the DPLL, and unconditionally wait for the DPLL
to lock.  This fixes some bugs where the kernel would hang when returning
from retention or return the wrong rate for the DPLL.

This patch is a collaboration with Peter de Schrijver
<peter.de-schrijver@nokia.com> and Kevin Hilman
<khilman@deeprootsystems.com>.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Peter de Schrijver <peter.de-schrijver@nokia.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP3 clock: avoid invalid FREQSEL values during DPLL rate rounding
Paul Walmsley [Wed, 12 Nov 2008 18:52:31 +0000 (11:52 -0700)]
OMAP3 clock: avoid invalid FREQSEL values during DPLL rate rounding

The DPLL FREQSEL jitter correction bits are set based on a table in
the 34xx TRM, Table 4-38, according to the DPLL's internal clock
frequency "Fint."  Several Fint frequency ranges are missing from this
table.  Previously, we allowed these Fint frequency ranges to be
selected in the rate rounding code, but did not change the FREQSEL bits.
Correspondence with the OMAP hardware team indicates that Fint values
not in the table should not be used.  So, prevent them from being
selected during DPLL rate rounding.  This removes warnings and also
can prevent the chip from locking up.

The first pass through the rate rounding code will update the DPLL max
and min dividers appropriately, so later rate rounding passes will run
faster than the first.

Peter de Schrijver <peter.de-schrijver@nokia.com> put up with several
test cycles of this patch - thanks Peter.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Peter de Schrijver <peter.de-schrijver@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP3 clock: optimize DPLL rate rounding algorithm
Paul Walmsley [Wed, 12 Nov 2008 18:51:01 +0000 (11:51 -0700)]
OMAP3 clock: optimize DPLL rate rounding algorithm

The previous DPLL rate rounding algorithm counted the divider (N) down
from the maximum to 1.  Since we currently use a broad DPLL rate
tolerance, and lower N values are more power-efficient, we can often
bypass several iterations through the loop by counting N upwards from
1.

Peter de Schrijver <peter.de-schrijver@nokia.com> put up with several
test cycles of this patch - thanks Peter.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Peter de Schrijver <peter.de-schrijver@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP3 clock: remove unnecessary dpll_data dereferences
Paul Walmsley [Wed, 12 Nov 2008 18:50:35 +0000 (11:50 -0700)]
OMAP3 clock: remove unnecessary dpll_data dereferences

Remove some clutter from omap2_dpll_round_rate().

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoLEDS: Switch leds-omap to use gpio_request/free calls
Jarkko Nikula [Fri, 31 Oct 2008 12:18:57 +0000 (14:18 +0200)]
LEDS: Switch leds-omap to use gpio_request/free calls

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoINPUT: TS_Hx: Switch to gpio_request/free calls
Jarkko Nikula [Fri, 31 Oct 2008 12:18:56 +0000 (14:18 +0200)]
INPUT: TS_Hx: Switch to gpio_request/free calls

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoINPUT: TSC2005: Switch to gpio_request/free calls
Jarkko Nikula [Fri, 31 Oct 2008 12:18:55 +0000 (14:18 +0200)]
INPUT: TSC2005: Switch to gpio_request/free calls

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoCBUS: Switch to gpio_request/free calls
Jarkko Nikula [Fri, 31 Oct 2008 12:18:54 +0000 (14:18 +0200)]
CBUS: Switch to gpio_request/free calls

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoSwitch brf6150 and hci_h4p to use gpio_request/free calls
Jarkko Nikula [Fri, 31 Oct 2008 12:18:53 +0000 (14:18 +0200)]
Switch brf6150 and hci_h4p to use gpio_request/free calls

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoSPI: TSC2301: Switch to gpio_request/free calls
Jarkko Nikula [Fri, 31 Oct 2008 12:18:52 +0000 (14:18 +0200)]
SPI: TSC2301: Switch to gpio_request/free calls

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: OMAP: Switch OMAP LCD panels to use gpio_request/free calls
Jarkko Nikula [Fri, 31 Oct 2008 12:18:51 +0000 (14:18 +0200)]
ARM: OMAP: Switch OMAP LCD panels to use gpio_request/free calls

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: OMAP: Switch to gpio_request/free calls (part 2)
Jarkko Nikula [Fri, 31 Oct 2008 12:18:50 +0000 (14:18 +0200)]
ARM: OMAP: Switch to gpio_request/free calls (part 2)

This converts new files which are not yet merged upstream including
gpio-switch and board files for 3430sdp, Nokia N800 and omap3evm.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoUSB: EHCI-OMAP: Switch to gpio_request/free calls
Jarkko Nikula [Fri, 31 Oct 2008 12:18:49 +0000 (14:18 +0200)]
USB: EHCI-OMAP: Switch to gpio_request/free calls

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoRevert "Sync arch/arm/include/asm/mach/map.h with mainline"
Tony Lindgren [Fri, 21 Nov 2008 23:36:34 +0000 (15:36 -0800)]
Revert "Sync arch/arm/include/asm/mach/map.h with mainline"

This reverts commit 41cc3cea4bd402941af17363b9d99e9fd2b33525.

Oops, my mistake, I was diffing wrong branches.

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP3: I2C: Enable I2C wakeups
Kalle Jokiniemi [Tue, 18 Nov 2008 15:43:14 +0000 (17:43 +0200)]
OMAP3: I2C: Enable I2C wakeups

I2C_WE registers were not configured, which caused huge delays in
I2C operations while cpu idle was enabled and omap entered WFI.

This patch enables all I2C wakeup sources.

Signed-off-by: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP2/3 I2C: reprogram OCP_SYSCONFIG register after reset
Paul Walmsley [Tue, 14 Oct 2008 12:19:48 +0000 (06:19 -0600)]
OMAP2/3 I2C: reprogram OCP_SYSCONFIG register after reset

The I2C controller clears its OCP_SYSCONFIG register after an OCP soft reset.
Reprogram OCP_SYSCONFIG for maximum power savings on rev3.6 controllers
and beyond.  On 2430, this involves setting the module AUTOIDLE bit.
On 3430, this includes module AUTOIDLE, wakeup enable, slave smart-idle,
and considers only the module functional clock state for idle-ack.

Boot-tested on 2430SDP and 3430SDP.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Richard Woodruff <r-woodruff2@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP: I2C: convert 'rev1' flag to generic 'rev' u8
Paul Walmsley [Tue, 14 Oct 2008 12:19:26 +0000 (06:19 -0600)]
OMAP: I2C: convert 'rev1' flag to generic 'rev' u8

i2c-omap discriminates only between "revision 1" or "greater than
revision 1."  A following patch introduces code that must also
discriminate between rev2.x, rev3.6, and rev3.12 controllers.  Support
this by storing the full revision data from the I2C_REV register, rather
than just a single bit.

The revision definitions may need to be extended for other ES levels
that aren't currently available here.  rev3.6 is what's present on the
2430SDP here (unknown ES revision); rev3.12 is used on the 3430ES2
here.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoSync i2c-omap with patchesg going to mainline tree
Tony Lindgren [Fri, 21 Nov 2008 21:12:38 +0000 (13:12 -0800)]
Sync i2c-omap with patchesg going to mainline tree

Sync i2c-omap with patchesg going to mainline tree:

- Unify the clock naming for 242x and 243x
- Don't try to set a NULL pointer to 100
- Do a readback to flush posted write instead of wmb()

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoSync arch/arm/include/asm/mach/map.h with mainline
Tony Lindgren [Fri, 21 Nov 2008 21:17:01 +0000 (13:17 -0800)]
Sync arch/arm/include/asm/mach/map.h with mainline

This file got out of sync with the earlier strongly ordered patch.

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoMerge current mainline tree into linux-omap tree
Tony Lindgren [Fri, 21 Nov 2008 17:43:43 +0000 (09:43 -0800)]
Merge current mainline tree into linux-omap tree

Merge branches 'master' and 'linus'

15 years agoLinux 2.6.28-rc6 v2.6.28-rc6
Linus Torvalds [Thu, 20 Nov 2008 23:19:22 +0000 (15:19 -0800)]
Linux 2.6.28-rc6

15 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Thu, 20 Nov 2008 23:07:40 +0000 (15:07 -0800)]
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] xen: fix xen_get_eflags.
  [IA64] ia64/pv_ops/pv_cpu_ops: fix _IA64_REG_IP case.
  [IA64] remove duplicate include iommu.h
  [IA64] use mprintk instead of printk, in ia64_mca_modify_original_stack
  [IA64] Rationalize kernel mode alignment checking

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Thu, 20 Nov 2008 21:53:21 +0000 (13:53 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  USB: ACE1001 patch for cp2101.c
  USB: usbmon: fix read(2)
  USB: gadget rndis: send notifications
  USB: gadget rndis: stop windows self-immolation
  USB: storage: update unusual_devs entries for Nokia 5300 and 5310
  USB: storage: updates unusual_devs entry for the Nokia 6300
  usb: musb: fix bug in musb_schedule
  USB: fix SB700 usb subsystem hang bug

15 years ago[IA64] xen: fix xen_get_eflags.
Isaku Yamahata [Tue, 18 Nov 2008 10:20:51 +0000 (19:20 +0900)]
[IA64] xen: fix xen_get_eflags.

fix xen_get_eflags. It doesn't take any argument.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Tony Luck <tony.luck@intel.com>
15 years ago[IA64] ia64/pv_ops/pv_cpu_ops: fix _IA64_REG_IP case.
Isaku Yamahata [Tue, 18 Nov 2008 10:19:50 +0000 (19:19 +0900)]
[IA64] ia64/pv_ops/pv_cpu_ops: fix _IA64_REG_IP case.

pv_cpu_ops.getreg(_IA64_REG_IP) returned constant.
But the returned ip valued should be the one in the caller, not of the callee.
This patch fixes that.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Tony Luck <tony.luck@intel.com>
15 years ago[IA64] remove duplicate include iommu.h
Huang Weiyi [Thu, 20 Nov 2008 21:38:16 +0000 (13:38 -0800)]
[IA64] remove duplicate include iommu.h

arch/ia64/kernel/pci-dma.c only needs to include iommu once.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
15 years ago[IA64] use mprintk instead of printk, in ia64_mca_modify_original_stack
Hidetoshi Seto [Mon, 17 Nov 2008 01:18:08 +0000 (10:18 +0900)]
[IA64] use mprintk instead of printk, in ia64_mca_modify_original_stack

Using printk from MCA/INIT context is unsafe since it can cause deadlock.
The ia64_mca_modify_original_stack is called from both of mca handler and
init handler, so it should use mprintk instead of printk.

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
15 years ago[IA64] Rationalize kernel mode alignment checking
Tony Luck [Thu, 20 Nov 2008 21:27:12 +0000 (13:27 -0800)]
[IA64] Rationalize kernel mode alignment checking

Itanium processors can handle some misaligned data accesses. They
also provide a mode where all such accesses are forced to trap. The
kernel was schizophrenic about use of this mode:

* Base kernel code ran in permissive mode where the only traps
  generated were from those cases that the h/w could not handle.
* Interrupt, syscall and trap code ran in strict mode where all
  unaligned accesses caused traps to the 0x5a00 unaligned reference
  vector.

Use strict alignment checking throughout the kernel, but make
sure that we continue to let user mode use more relaxed mode
as the default.

Signed-off-by: Tony Luck <tony.luck@intel.com>
15 years agox86: Fix interrupt leak due to migration
Matthew Wilcox [Thu, 20 Nov 2008 21:09:33 +0000 (14:09 -0700)]
x86: Fix interrupt leak due to migration

When we migrate an interrupt from one CPU to another, we set the
move_in_progress flag and clean up the vectors later once they're not
being used.  If you're unlucky and call destroy_irq() before the vectors
become un-used, the move_in_progress flag is never cleared, which causes
the interrupt to become unusable.

This was discovered by Jesse Brandeburg for whom it manifested as an
MSI-X device refusing to use MSI-X mode when the driver was unloaded
and reloaded repeatedly.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoSUNRPC: Fix a performance regression in the RPC authentication code
Trond Myklebust [Thu, 20 Nov 2008 21:06:21 +0000 (16:06 -0500)]
SUNRPC: Fix a performance regression in the RPC authentication code

Fix a regression reported by Max Kellermann whereby kernel profiling
showed that his clients were spending 45% of their time in
rpcauth_lookup_credcache.

It turns out that although his processes had identical uid/gid/groups,
generic_match() was failing to detect this, because the task->group_info
pointers were not shared. This again lead to the creation of a huge number
of identical credentials at the RPC layer.

The regression is fixed by comparing the contents of task->group_info
if the actual pointers are not identical.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Thu, 20 Nov 2008 21:14:16 +0000 (13:14 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  [CIFS] Do not attempt to close invalidated file handles
  [CIFS] fix check for dead tcon in smb_init

15 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Thu, 20 Nov 2008 21:13:48 +0000 (13:13 -0800)]
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  MIPS: csrc-r4k: Fix declaration depending on the wrong CONFIG_ symbol.
  MIPS: csrc-r4k: Fix spelling mistake.
  MIPS: RB532: Provide functions for gpio configuration
  MIPS: IP22: Make indy_sc_ops variable static
  MIPS: RB532: GPIO register offsets are relative to GPIOBASE
  MIPS: Malta: Fix include paths in malta-amon.c

15 years agoMerge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 20 Nov 2008 21:13:03 +0000 (13:13 -0800)]
Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  intel-iommu: fix compile warnings

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Thu, 20 Nov 2008 21:12:14 +0000 (13:12 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (23 commits)
  net: fix tiny output corruption of /proc/net/snmp6
  atl2: don't request irq on resume if netif running
  ipv6: use seq_release_private for ip6mr.c /proc entries
  pkt_sched: fix missing check for packet overrun in qdisc_dump_stab()
  smc911x: Fix printf format typo in smc911x driver.
  asix: Fix asix-based cards connecting to 10/100Mbs LAN.
  mv643xx_eth: fix recycle check bound
  mv643xx_eth: fix the order of mdiobus_{unregister, free}() calls
  sh: sh_eth: Update to change of mii_bus
  TPROXY: supply a struct flowi->flags argument in inet_sk_rebuild_header()
  TPROXY: fill struct flowi->flags in udp_sendmsg()
  net: ipg.c fix bracing on endian swapping
  phylib: Fix auto-negotiation restart avoidance
  net: jme.c rxdesc.flags is __le16, other missing endian swaps
  phylib: fix phy name example in documentation
  net: Do not fire linkwatch events until the device is registered.
  phonet: fix compilation with gcc-3.4
  ixgbe: fix compilation with gcc-3.4
  pktgen: fix multiple queue warning
  net: fix ip_mr_init() error path
  ...

15 years agoMerge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 20 Nov 2008 21:11:21 +0000 (13:11 -0800)]
Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  ftrace: fix dyn ftrace filter selection
  ftrace: make filtered functions effective on setting
  ftrace: fix set_ftrace_filter
  trace: introduce missing mutex_unlock()
  tracing: kernel/trace/trace.c: introduce missing kfree()

15 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Thu, 20 Nov 2008 21:09:32 +0000 (13:09 -0800)]
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: uaccess_64: fix return value in __copy_from_user()
  x86: quirk for reboot stalls on a Dell Optiplex 330

15 years agoparisc: fix bug in compat_arch_ptrace
Helge Deller [Thu, 20 Nov 2008 09:54:09 +0000 (10:54 +0100)]
parisc: fix bug in compat_arch_ptrace

Commit 81e192d6ce303b6792aa38ff35f41a1a7357f23a ("parisc: convert to
generic compat_sys_ptrace") introduced a bug which segfaults the parisc
64bit kernel when stracing 32bit applications:

  Kernel Fault: Code=15 regs=00000000bafa42b0 (Addr=00000001baf5ab57)
       YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI
  PSW: 00001000000001101111111100001011 Tainted: G        W
  r00-03  000000ff0806ff0b 000000004068edc0 00000000401203f8 00000000fb3e2508
  r04-07  0000000040686dc0 00000000baf5a800 fffffffffffffffc fffffffffb3e2508
  r08-11  00000000baf5a800 000000000004b068 00000000000402b0 0000000000040d68
  r12-15  0000000000042a9c 0000000000040a9c 0000000000040d60 0000000000042e9c
  r16-19  000000000004b060 000000000004b058 0000000000042d9c ffffffffffffffff
  r20-23  000000000800000b 0000000000000000 000000000800000b fffffffffb3e2508
  r24-27  00000000fffffffc 0000000000000003 00000000fffffffc 0000000040686dc0
  r28-31  00000001baf5a7ff 00000000bafa4280 00000000bafa42b0 00000000000001d7
  sr00-03  0000000000fca000 0000000000000000 0000000000000000 0000000000fca000
  sr04-07  0000000000000000 0000000000000000 0000000000000000 0000000000000000

  IASQ: 0000000000000000 0000000000000000 IAOQ: 0000000040120400 0000000040120404
   IIR: 4b9a06b0    ISR: 0000000000000000  IOR: 00000001baf5ab57
   CPU:        0   CR30: 00000000bafa4000 CR31: 00000000d22344e0
   ORIG_R28: 00000000fb3e2248
   IAOQ[0]: compat_arch_ptrace+0xb8/0x160
   IAOQ[1]: compat_arch_ptrace+0xbc/0x160
   RP(r2): compat_arch_ptrace+0xb0/0x160
  Backtrace:
   [<00000000401612ac>] compat_sys_ptrace+0x15c/0x180
   [<0000000040104ef8>] syscall_exit+0x0/0x14

The problem is that compat_arch_ptrace() enters with an addr value of
type compat_ulong_t and calls translate_usr_offset() to translate the
address offset into a struct pt_regs offset like this:

addr = translate_usr_offset(addr)

this means that any return value of translate_usr_offset() is stored
back as compat_ulong_t type into the addr variable.

But since translate_usr_offset() returns -1 for invalid offsets, addr
can now get the value 0xffffffff which then fails the next return-value
sanity check and thus the kernel tries to access invalid memory:

if (addr < 0)
break;

Fix this bug by modifying translate_usr_offset() to take and return
values of type compat_ulong_t, and by returning the value
"sizeof(struct pt_regs)" as an error indicator.

Additionally change the sanity check to check for return values
for >= sizeof(struct pt_regs).

This patch survived my compile and run-tests.

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years ago[CIFS] Do not attempt to close invalidated file handles
Steve French [Thu, 20 Nov 2008 20:00:44 +0000 (20:00 +0000)]
[CIFS] Do not attempt to close invalidated file handles

If a connection with open file handles has gone down
and come back up and reconnected without reopening
the file handle yet, do not attempt to send an SMB close
request for this handle in cifs_close.  We were
checking for the connection being invalid in cifs_close
but since the connection may have been reconnected
we also need to check whether the file handle
was marked invalid (otherwise we could close the
wrong file handle by accident).

Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agoMIPS: csrc-r4k: Fix declaration depending on the wrong CONFIG_ symbol.
Ralf Baechle [Mon, 3 Nov 2008 11:32:34 +0000 (11:32 +0000)]
MIPS: csrc-r4k: Fix declaration depending on the wrong CONFIG_ symbol.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: csrc-r4k: Fix spelling mistake.
Ralf Baechle [Mon, 3 Nov 2008 11:31:54 +0000 (11:31 +0000)]
MIPS: csrc-r4k: Fix spelling mistake.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: RB532: Provide functions for gpio configuration
Phil Sutter [Sat, 1 Nov 2008 14:13:21 +0000 (15:13 +0100)]
MIPS: RB532: Provide functions for gpio configuration

As gpiolib doesn't support pin multiplexing, it provides no way to
access the GPIOFUNC register. Also there is no support for setting
interrupt status and level. These functions provide access to them and
are needed by the CompactFlash driver.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: IP22: Make indy_sc_ops variable static
Dmitri Vorobiev [Fri, 31 Oct 2008 17:54:11 +0000 (19:54 +0200)]
MIPS: IP22: Make indy_sc_ops variable static

The indy_sc_ops variable in arch/mips/mm/sc-ip22.c is needlessly defined
global, and this patch makes it static.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
---

15 years agoMIPS: RB532: GPIO register offsets are relative to GPIOBASE
Florian Fainelli [Fri, 31 Oct 2008 13:24:29 +0000 (14:24 +0100)]
MIPS: RB532: GPIO register offsets are relative to GPIOBASE

This patch fixes the wrong use of GPIO register offsets
in devices.c. To avoid further problems, use gpio_get_value
to return the NAND status instead of our own expanded code.

Also define the zero offset of the alternate function register to allow
consistent access.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Malta: Fix include paths in malta-amon.c
David Daney [Sat, 20 Sep 2008 17:16:36 +0000 (10:16 -0700)]
MIPS: Malta: Fix include paths in malta-amon.c

On linux-queue, malta doesn't build after the include file relocation.
This should fix it.

There some occurrences of 'asm-mips' in the comments of quite a few
files, but this is the only place I found it in any code.

Signed-off-by: David Daney <ddaney@avtrex.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agonet: fix tiny output corruption of /proc/net/snmp6
Alexey Dobriyan [Thu, 20 Nov 2008 12:20:10 +0000 (04:20 -0800)]
net: fix tiny output corruption of /proc/net/snmp6

Because "name" is static, it can be occasionally be filled with
somewhat garbage if two processes read /proc/net/snmp6.

Also, remove useless casts and "-1" -- snprintf() correctly terminates it's
output.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoatl2: don't request irq on resume if netif running
Alan Jenkins [Thu, 20 Nov 2008 12:18:25 +0000 (04:18 -0800)]
atl2: don't request irq on resume if netif running

If the device is suspended with the cable disconnected, then
resumed with the cable connected, dev->open is called before
resume. During resume, we request an IRQ, but the IRQ was
already assigned during dev->open, resulting in the warning
shown below.

Don't request an IRQ if the device is running.

Call Trace:
 [<c011b89a>] warn_on_slowpath+0x40/0x59
 [<c023df15>] raw_pci_read+0x4d/0x55
 [<c023dff3>] pci_read+0x1c/0x21
 [<c01bcd81>] __pci_find_next_cap_ttl+0x44/0x70
 [<c01bce86>] __pci_find_next_cap+0x1a/0x1f
 [<c01bcef9>] pci_find_capability+0x28/0x2c
 [<c01c4144>] pci_msi_check_device+0x53/0x62
 [<c01c49c2>] pci_enable_msi+0x3a/0x1cd
 [<e019f17b>] atl2_write_phy_reg+0x40/0x5f [atl2]
 [<c01061b1>] dma_generic_alloc_coherent+0x0/0xd7
 [<e019f107>] atl2_request_irq+0x15/0x49 [atl2]
 [<e01a1481>] atl2_open+0x20b/0x297 [atl2]
 [<c024a35c>] dev_open+0x62/0x91
 [<c0248b9a>] dev_change_flags+0x93/0x141
 [<c024f308>] do_setlink+0x238/0x2d5
 [<c02501b2>] rtnl_setlink+0xa9/0xbf
 [<c0297f0c>] mutex_lock+0xb/0x19
 [<c024ffa7>] rtnl_dump_ifinfo+0x0/0x69
 [<c0250109>] rtnl_setlink+0x0/0xbf
 [<c024fe42>] rtnetlink_rcv_msg+0x185/0x19f
 [<c0240fd1>] sock_rmalloc+0x23/0x57
 [<c024fcbd>] rtnetlink_rcv_msg+0x0/0x19f
 [<c0259457>] netlink_rcv_skb+0x2d/0x71
 [<c024fcb7>] rtnetlink_rcv+0x14/0x1a
 [<c025929e>] netlink_unicast+0x184/0x1e4
 [<c025992a>] netlink_sendmsg+0x233/0x240
 [<c023f405>] sock_sendmsg+0xb7/0xd0
 [<c0129131>] autoremove_wake_function+0x0/0x2b
 [<c0129131>] autoremove_wake_function+0x0/0x2b
 [<c0147796>] mempool_alloc+0x2d/0x9e
 [<c020c923>] scsi_pool_alloc_command+0x35/0x4f
 [<c0297f0c>] mutex_lock+0xb/0x19
 [<c028e867>] unix_stream_recvmsg+0x357/0x3e2
 [<c01b81c9>] copy_from_user+0x23/0x4f
 [<c02452ea>] verify_iovec+0x3e/0x6c
 [<c023f5ab>] sys_sendmsg+0x18d/0x1f0
 [<c023ffa8>] sys_recvmsg+0x146/0x1c8
 [<c0240016>] sys_recvmsg+0x1b4/0x1c8
 [<c0118f48>] __wake_up+0xf/0x15
 [<c02586cd>] netlink_table_ungrab+0x17/0x19
 [<c01b83ba>] copy_to_user+0x25/0x3b
 [<c023fe4a>] move_addr_to_user+0x50/0x68
 [<c0240266>] sys_getsockname+0x6f/0x9a
 [<c0240280>] sys_getsockname+0x89/0x9a
 [<c015046a>] do_wp_page+0x3ae/0x41a
 [<c0151525>] handle_mm_fault+0x4c5/0x540
 [<c02405d0>] sys_socketcall+0x176/0x1b0
 [<c010376d>] sysenter_do_call+0x12/0x21

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: Jay Cliburn <jcliburn@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoipv6: use seq_release_private for ip6mr.c /proc entries
Benjamin Thery [Thu, 20 Nov 2008 12:16:12 +0000 (04:16 -0800)]
ipv6: use seq_release_private for ip6mr.c /proc entries

In ip6mr.c, /proc entries /proc/net/ip6_mr_cache and /proc/net/ip6_mr_vif
are opened with seq_open_private(), thus seq_release_private() should be
used to release them.
Should fix a small memory leak.

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agopkt_sched: fix missing check for packet overrun in qdisc_dump_stab()
Patrick McHardy [Thu, 20 Nov 2008 12:07:14 +0000 (04:07 -0800)]
pkt_sched: fix missing check for packet overrun in qdisc_dump_stab()

nla_nest_start() might return NULL, causing a NULL pointer dereference.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Thu, 20 Nov 2008 12:01:29 +0000 (04:01 -0800)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6

15 years agosmc911x: Fix printf format typo in smc911x driver.
Vernon Sauder [Thu, 20 Nov 2008 09:56:08 +0000 (01:56 -0800)]
smc911x: Fix printf format typo in smc911x driver.

Signed-off-by: Vernon Sauder <VernonInHand@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoasix: Fix asix-based cards connecting to 10/100Mbs LAN.
Pantelis Koukousoulas [Thu, 20 Nov 2008 09:48:46 +0000 (01:48 -0800)]
asix: Fix asix-based cards connecting to 10/100Mbs LAN.

Add AX_MEDIUM_ENCK also when speed = 10/100Mbps. This allows my belkin
f5d5055 to work with my 100Mbps switch and with an old 10Mbps ISA card.
Without this patch, the card is recognized and the interface is brought
up fine, but no packets actually flow through the interface.

Signed-off-by: Pantelis Koukousoulas <pktoss@gmail.com>
Acked-by: David Hollis <dhollis@davehollis.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomv643xx_eth: fix recycle check bound
Lennert Buytenhek [Tue, 18 Nov 2008 04:28:58 +0000 (04:28 +0000)]
mv643xx_eth: fix recycle check bound

When mv643xx_eth allocates skbuffs, it adds
'dma_get_cache_alignment() - 1' to the length it needs, so that it can
align the skb's ->data pointer to a cache boundary.  When checking
whether a transmitted skbuff can be reused as a receive buffer, these
bytes needs to be included into the minimum bound for the recycle check.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomv643xx_eth: fix the order of mdiobus_{unregister, free}() calls
Lennert Buytenhek [Tue, 18 Nov 2008 04:28:35 +0000 (04:28 +0000)]
mv643xx_eth: fix the order of mdiobus_{unregister, free}() calls

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosh: sh_eth: Update to change of mii_bus
Nobuhiro Iwamatsu [Mon, 17 Nov 2008 20:29:58 +0000 (20:29 +0000)]
sh: sh_eth: Update to change of mii_bus

Update to change of mii_bus interface and fix some warning.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoTPROXY: supply a struct flowi->flags argument in inet_sk_rebuild_header()
Balazs Scheidler [Thu, 20 Nov 2008 09:08:06 +0000 (01:08 -0800)]
TPROXY: supply a struct flowi->flags argument in inet_sk_rebuild_header()

    inet_sk_rebuild_header() does a new route lookup if the dst_entry
    associated with a socket becomes stale. However inet_sk_rebuild_header()
    didn't use struct flowi->flags, causing the route lookup to
    fail for foreign-bound IP_TRANSPARENT sockets, causing an error
    state to be set for the sockets in question.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoTPROXY: fill struct flowi->flags in udp_sendmsg()
Balazs Scheidler [Thu, 20 Nov 2008 09:07:24 +0000 (01:07 -0800)]
TPROXY: fill struct flowi->flags in udp_sendmsg()

    udp_sendmsg() didn't fill struct flowi->flags, which means that
    the route lookup would fail for non-local IPs even if the
    IP_TRANSPARENT sockopt was set.

    This prevents sendto() to work properly for UDP sockets, whereas
    bind(foreign-ip) + connect() + send() worked fine.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoUSB: ACE1001 patch for cp2101.c
M Kondrin [Fri, 14 Nov 2008 10:02:45 +0000 (13:02 +0300)]
USB: ACE1001 patch for cp2101.c

The patch which adds IDs for AKTAKOM USB->RS232 cable
(http://www.aktakom.ru/product/kio/ace-1001.htm) is attached.

From: M Kondrin <mkondrin@hppi.troitsk.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: usbmon: fix read(2)
Pete Zaitcev [Fri, 14 Nov 2008 16:47:41 +0000 (09:47 -0700)]
USB: usbmon: fix read(2)

There's a bug in the usbmon binary reader: When using read() to fetch
the packets and a packet's data is partially read, the next read call
will once again return up to len_cap bytes of data. The b_read counter
is not regarded when determining the remaining chunk size.

So, when dumping USB data with "cat /dev/usbmon0 > usbmon.trace" while
reading from a USB storage device and analyzing the dump file
afterwards it will get out of sync after a couple of packets.

Signed-off-by: Ingo van Lil <inguin@gmx.de>
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: gadget rndis: send notifications
Richard Röjfors [Sun, 16 Nov 2008 03:53:24 +0000 (19:53 -0800)]
USB: gadget rndis: send notifications

It turns out that atomic_inc_return() returns the *new* value
not the original one, so the logic in rndis_response_available()
kept the first RNDIS response notification from getting out.
This prevented interoperation with MS-Windows (but not Linux).

Fix this to make RNDIS behave again.

Signed-off-by: Richard Röjfors <richard.rojfors@endian.se>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: gadget rndis: stop windows self-immolation
David Brownell [Sun, 16 Nov 2008 03:53:21 +0000 (19:53 -0800)]
USB: gadget rndis: stop windows self-immolation

Somewhere in the conversion of the RNDIS gadget code to the new
framework, the descriptor of its data interface seems to have
been copied from the CDC Ethernet driver.  Unfortunately that
means it got a nonzero altsetting ... which is incorrect.  Issue
uncovered by Richard Röjfors <richard.rojfors@endian.se>.

This patch fixes that problem, and resolves at least some cases
of Windows XP bluescreening itself.

Tested-by: Richard Röjfors <richard.rojfors@endian.se>.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: storage: update unusual_devs entries for Nokia 5300 and 5310
Alan Stern [Mon, 17 Nov 2008 19:32:16 +0000 (14:32 -0500)]
USB: storage: update unusual_devs entries for Nokia 5300 and 5310

This patch (as1168) updates the unusual_devs entry for the Nokia 5300.
According to Jorge Lucangeli Obes <t4m5yn@gmail.com>, some existing
models have a revision number lower than the lower limit of the
current entry.

The patch also moves the entry for the Nokia 5310 to its correct place
in the file.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: storage: updates unusual_devs entry for the Nokia 6300
Alan Stern [Mon, 17 Nov 2008 21:12:32 +0000 (16:12 -0500)]
USB: storage: updates unusual_devs entry for the Nokia 6300

This patch (as1169) modifies the unusual_devs entry for the Nokia
6300.  According to Maciej Gierok <mgierok@gmail.com> and David
McBride <dwm@doc.ic.ac.uk>, the revision limits need to be wider.

This fixes Bugzilla #11768.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agousb: musb: fix bug in musb_schedule
Felipe Balbi [Mon, 17 Nov 2008 07:08:16 +0000 (09:08 +0200)]
usb: musb: fix bug in musb_schedule

This bug was introduced recently. Fix it before bigger
problems appear.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: fix SB700 usb subsystem hang bug
Andiry Xu [Fri, 14 Nov 2008 03:42:29 +0000 (11:42 +0800)]
USB: fix SB700 usb subsystem hang bug

This patch is required for AMD SB700 south bridge revision A12 and A13 to avoid
USB subsystem hang symptom. The USB subsystem hang symptom is observed when the
system has multiple USB devices connected to it. In some cases a USB hub may be
required to observe this symptom.

This patch works around the problem by correcting the internal register setting
that will help by changing the behavior of the internal logic to avoid the
USB subsystem hang issue. The change in the behavior of the logic does not
impact the normal operation of the USB subsystem.

Reported-by: Volker Armin Hemmann <volker.armin.hemmann@tu-clausthal.de>
Tested-by: Volker Armin Hemmann <volker.armin.hemmann@tu-clausthal.de>
Signed-off-by: Andiry Xu <andiry.xu@amd.com>
Signed-off-by: Libin Yang <libin.yang@amd.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
Linus Torvalds [Thu, 20 Nov 2008 02:57:16 +0000 (18:57 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  PCI: Fix disable IRQ 0 in pci_reset_function()

15 years agoMerge branch 'x86/numa' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux...
Linus Torvalds [Thu, 20 Nov 2008 02:53:02 +0000 (18:53 -0800)]
Merge branch 'x86/numa' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86/numa' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: make NUMA on 32-bit depend on EXPERIMENTAL again
  x86, hibernate: fix breakage on x86_32 with CONFIG_NUMA set

15 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Thu, 20 Nov 2008 02:51:56 +0000 (18:51 -0800)]
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: more general identifier for Phoenix BIOS
  AMD IOMMU: check for next_bit also in unmapped area
  AMD IOMMU: fix fullflush comparison length
  AMD IOMMU: enable device isolation per default
  AMD IOMMU: add parameter to disable device isolation
  x86, PEBS/DS: fix code flow in ds_request()
  x86: add rdtsc barrier to TSC sync check
  xen: fix scrub_page()
  x86: fix es7000 compiling
  x86, bts: fix unlock problem in ds.c
  x86, voyager: fix smp generic helper voyager breakage
  x86: move iomap.h to the new include location

15 years agocciss: fix DEBUG printk formats
Randy Dunlap [Wed, 19 Nov 2008 23:36:51 +0000 (15:36 -0800)]
cciss: fix DEBUG printk formats

Fix printk format warnings when CCISS_DEBUG is defined.

drivers/block/cciss.c:2856: warning: format '%d' expects type 'int', but argument 2 has type 'long unsigned int'
drivers/block/cciss.c:3205: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'long unsigned int'
drivers/block/cciss.c:3236: warning: format '%x' expects type 'unsigned int', but argument 2 has type '__u64'
drivers/block/cciss.c:3246: warning: format '%x' expects type 'unsigned int', but argument 2 has type '__u64'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Mike Miller <mike.miller@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoW1 OMAP: Fix OMAP LDP boot crash
Stanley.Miao [Wed, 19 Nov 2008 23:36:50 +0000 (15:36 -0800)]
W1 OMAP: Fix OMAP LDP boot crash

OMAP LDP boot crash.  This is because w1 subsystem changed the search
interface, so update omap_hdq's search interface to follow the change.

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodrivers/video/backlight/da903x.c: introduce one more missing kfree
Mike Rapoport [Wed, 19 Nov 2008 23:36:49 +0000 (15:36 -0800)]
drivers/video/backlight/da903x.c: introduce one more missing kfree

One more error handling code should have kfree as well

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Eric Miao <eric.miao@marvell.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocgroups: fix a serious bug in cgroupstats
Li Zefan [Wed, 19 Nov 2008 23:36:48 +0000 (15:36 -0800)]
cgroups: fix a serious bug in cgroupstats

Try this, and you'll get oops immediately:
 # cd Documentation/accounting/
 # gcc -o getdelays getdelays.c
 # mount -t cgroup -o debug xxx /mnt
 # ./getdelays -C /mnt/tasks

Because a normal file's dentry->d_fsdata is a pointer to struct cftype,
not struct cgroup.

After the patch, it returns EINVAL if we try to get cgroupstats
from a normal file.

Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Paul Menage <menage@google.com>
Cc: <stable@kernel.org> [2.6.25.x, 2.6.26.x, 2.6.27.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agohostfs: fix a duplicated global function name
WANG Cong [Wed, 19 Nov 2008 23:36:46 +0000 (15:36 -0800)]
hostfs: fix a duplicated global function name

fs/hostfs/hostfs_user.c defines do_readlink() as non-static, and so does
fs/xfs/linux-2.6/xfs_ioctl.c when CONFIG_XFS_DEBUG=y.  So rename
do_readlink() in hostfs to hostfs_do_readlink().

I think it's better if XFS guys will also rename their do_readlink(),
it's not necessary to use such a general name.

Signed-off-by: WANG Cong <wangcong@zeuux.org>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocirrusfb: remove unused variables
Vlada Peric [Wed, 19 Nov 2008 23:36:45 +0000 (15:36 -0800)]
cirrusfb: remove unused variables

After commit a1d35a7a (cirrusfb: use modedb and add mode_option
parameter), these variables are no longer used, so remove them to fix
compilation warning.

Signed-off-by: Vlada Periæ <vlada.peric@gmail.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agovmscan: fix get_scan_ratio() comment
Rik van Riel [Wed, 19 Nov 2008 23:36:44 +0000 (15:36 -0800)]
vmscan: fix get_scan_ratio() comment

Fix the old comment on the scan ratio calculations.

Signed-off-by: Rik van Riel <riel@redhat.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMAINTAINERS: change email address for rostedt
Steven Rostedt [Wed, 19 Nov 2008 23:36:43 +0000 (15:36 -0800)]
MAINTAINERS: change email address for rostedt

I find that I answer my email quicker on my home email account, than I do
on my work email.  Not to mention that I never check my work email while
traveling.  Please change my email address in the MAINTAINERS file from
srostedt@redhat.com to rostedt@goodmis.org.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodrivers/hwmon/applesmc.c: add generic MacPro support
Henrik Rydberg [Wed, 19 Nov 2008 23:36:42 +0000 (15:36 -0800)]
drivers/hwmon/applesmc.c: add generic MacPro support

In order to analyze the SMC of the newer MacPros, applesmc needs to
recognize the machine.  This patch adds the missing generic dmi_match
entry for MacPro models.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Cc: Nicolas Boichat <nicolas@boichat.ch>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodrivers/video/backlight/da903x.c: introduce missing kfree
Julia Lawall [Wed, 19 Nov 2008 23:36:41 +0000 (15:36 -0800)]
drivers/video/backlight/da903x.c: introduce missing kfree

Error handling code following a kzalloc should free the allocated data.

The semantic match that finds the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
statement S;
expression E;
identifier f,l;
position p1,p2;
expression *ptr != NULL;
@@

(
if ((x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...)) == NULL) S
|
x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
)
<... when != x
     when != if (...) { <+...x...+> }
x->f = E
...>
(
 return \(0\|<+...x...+>\|ptr\);
|
 return@p2 ...;
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: Mike Rapoport <mike@compulab.co.il>
Cc: Richard Purdie <rpurdie@linux.intel.com>
Cc: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>