Commit graph

28338 commits

Author SHA1 Message Date
Jean Delvare 002cf63191 i2c-i801: Typo: erroneous
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-08-14 18:37:13 +02:00
Linus Torvalds ab3c556de1 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [IPVS]: Use IP_VS_WAIT_WHILE when encessary.
  [NET]: Share correct feature code between bridging and bonding
  [ATM] drivers/atm/iphase.c: mostly kmalloc + memset conversion to kzalloc
  [IRDA] irda-usb.c: mostly kmalloc + memset conversion to k[cz]alloc
  [WAN] drivers/net/wan/hdlc_fr.c: kmalloc + memset conversion to kzalloc
  [DCCP]: fix memory leak and clean up style - dccp_feat_empty_confirm()
  [DCCP]: fix theoretical ccids_{read,write}_lock() race
  [XFRM]: Clean up duplicate includes in net/xfrm/
  [TIPC]: Clean up duplicate includes in net/tipc/
  [SUNRPC]: Clean up duplicate includes in net/sunrpc/
  [PKT_SCHED]: Clean up duplicate includes in net/sched/
  [IPV6]: Clean up duplicate includes in net/ipv6/
  [IPV4]: Clean up duplicate includes in net/ipv4/
  [ATM]: Clean up duplicate includes in net/atm/
  [ATM]: Clean up duplicate includes in drivers/atm/
  [IPCONFIG]: ip_auto_config fix
  [ATM]: fore200e_param_bs_queue() must be __devinit
2007-08-14 09:31:19 -07:00
Linus Torvalds c4e7ac5d42 Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
  e1000: Add device IDs of new 82571 board variants
  xen-netfront: Avoid deref'ing skbafter it is potentially freed.
  3c59x maintainer
  3c59x: fix duplex configuration
  natsemi: fix netdev error acounting
  ax88796 printk fixes
  myri10ge: Use the pause counter to avoid a needless device reset
  via-rhine: disable rx_copybreak on archs that don't allow unaligned DMA access
2007-08-14 09:30:42 -07:00
Auke Kok ce57a02c64 e1000: Add device IDs of new 82571 board variants
This patch adds support for 2 new board variants:
- A Quad port fiber 82571 board
- A blade version of the 82571 quad copper board

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-14 01:54:47 -04:00
Herbert Xu 7f353bf29e [NET]: Share correct feature code between bridging and bonding
http://bugzilla.kernel.org/show_bug.cgi?id=8797 shows that the
bonding driver may produce bogus combinations of the checksum
flags and SG/TSO.

For example, if you bond devices with NETIF_F_HW_CSUM and
NETIF_F_IP_CSUM you'll end up with a bonding device that
has neither flag set.  If both have TSO then this produces
an illegal combination.

The bridge device on the other hand has the correct code to
deal with this.

In fact, the same code can be used for both.  So this patch
moves that logic into net/core/dev.c and uses it for both
bonding and bridging.

In the process I've made small adjustments such as only
setting GSO_ROBUST if at least one constituent device
supports it.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-08-13 22:52:14 -07:00
Mariusz Kozlowski f71417614d [ATM] drivers/atm/iphase.c: mostly kmalloc + memset conversion to kzalloc
drivers/atm/iphase.c | 111508 -> 111431 (-77 bytes)
 drivers/atm/iphase.o | 254740 -> 254260 (-480 bytes)

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-08-13 22:52:13 -07:00
Mariusz Kozlowski 48e3eeb1a1 [IRDA] irda-usb.c: mostly kmalloc + memset conversion to k[cz]alloc
drivers/net/irda/irda-usb.c | 59694 -> 59541 (-153 bytes)
 drivers/net/irda/irda-usb.o | 170588 -> 169256 (-1332 bytes)

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-08-13 22:52:12 -07:00
Mariusz Kozlowski 1ee325438c [WAN] drivers/net/wan/hdlc_fr.c: kmalloc + memset conversion to kzalloc
drivers/net/wan/hdlc_fr.c | 31260 -> 31223 (-37 bytes)
 drivers/net/wan/hdlc_fr.o | 144872 -> 144728 (-144 bytes)

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Acked-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2007-08-13 22:52:11 -07:00
Jesper Juhl af3502184a [ATM]: Clean up duplicate includes in drivers/atm/
This patch cleans up duplicate includes in
	drivers/atm/

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-08-13 22:52:00 -07:00
Adrian Bunk 8aee929eda [ATM]: fore200e_param_bs_queue() must be __devinit
WARNING: drivers/built-in.o(.text+0x6203bb): Section mismatch: reference to .init.text:fore200e_param_bs_queue (between 'fore200e_initialize' and 'fore200e_monitor_putc')

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-08-13 22:51:58 -07:00
Jeremy Fitzhardinge 10a273a673 xen-netfront: Avoid deref'ing skbafter it is potentially freed.
xennet_tx_bug_gc can free the skb before we use it, so make sure we don't.

Signed-off-by: Keir Fraser <keir@xensource.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-14 01:51:09 -04:00
Steffen Klassert 373492d0bd 3c59x: fix duplex configuration
A special sequence of ifconfig up/down and plug/unplug the cable can break
the duplex configuration of the driver.

Setting
vp->mii.full_duplex = vp->full_duplex
in vortex_up should fix this.

Addresses Bug 8575 3c59x duplex configuration broken
http://bugzilla.kernel.org/show_bug.cgi?id=8575

Cc: Martin Buck <mb-tmp-ohtmvyyn.xreary.bet@gromit.dyndns.org>
Signed-off-by: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>
Cc: Natalie Protasevich <protasnb@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-14 01:38:37 -04:00
Andrew Morton c76720cf7b natsemi: fix netdev error acounting
When a detailed netdev error is counted, we also must account for it in the
aggregated error count.

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=8106

Cc: Tim Hockin <thockin@hockin.org>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Chongfeng Hu <loveminix@yahoo.com.cn>
Cc: Natalie Protasevich <protasnb@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-14 01:36:39 -04:00
Andrew Morton b4efe22cc9 ax88796 printk fixes
drivers/net/ax88796.c: In function `ax_probe':
drivers/net/ax88796.c:825: warning: size_t format, different type arg (arg 4)
drivers/net/ax88796.c:825: warning: size_t format, different type arg (arg 5)

resource_size_t isn't size_t.

Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-14 01:34:53 -04:00
Brice Goglin 626fda9488 myri10ge: Use the pause counter to avoid a needless device reset
Use the pause counter to avoid a needless device reset, and
print a message telling the admin that our link partner is
flow controlling us down to 0 pkts/sec.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-14 01:27:10 -04:00
Dustin Marquess b47157f004 via-rhine: disable rx_copybreak on archs that don't allow unaligned DMA access
Patch to disable the rx_copybreak feature on hardware architectures that
don't allow unaligned DMA access.

#ifdef code taken from tulip_core.c.  Problem pointed out by Ivan
Kokshaysky.

Signed-off-by: Dustin Marquess <jailbird@alcatraz.fdf.net>
Cc: Francois Romieu <romieu@fr.zoreil.com>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-14 01:27:10 -04:00
Alexey Starikovskiy c019b19330 ACPI: EC: Fix "no battery" regression
Restore deleted call to register query methods.

http://bugzilla.kernel.org/show_bug.cgi?id=8886

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-14 01:03:42 -04:00
Eli Cohen 947b2a8083 mlx4_core: Wait 1 second after reset before accessing device
Put a 1000 msec delay after resetting the device before attempting to
do config cycles on it.  Not waiting causes system hangs on some
chipsets, e.g. Intel E7520, when the driver is loaded.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-08-13 08:47:44 -07:00
Jean Delvare 68a50b5678 hwmon: (smsc47m1) restore missing name attribute
The smsc47m1 driver no longer creates the name attribute used by
libsensors to identify chip types. It was lost during the conversion
to a platform driver. I was fooled by the fact that we do have a
group with all attributes, but only to delete them all at once. The
group is not used to create the attributes, so we have to explicitly
create the name attribute.

This fixes lm-sensors ticket #2236:
http://lm-sensors.org/ticket/2236

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2007-08-12 14:39:44 -04:00
Jean Delvare 0956895aa6 hwmon: (w83627ehf) don't assume bank 0
Don't assume that the default bank is 0. For one thing, we don't even
set it to 0 when the driver is loaded, so the initial state might be
different. For another, something (say, the BIOS) might access the chip
and leave with the bank set to something different, so assuming that
the bank value is 0 is not safe.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2007-08-12 14:38:31 -04:00
Mark M. Hoffman ea7be66c44 hwmon: (w83627ehf) read fan_div values during probe
This patch forces the driver to read the fan divider values during early init.
Otherwise, a call to store_fan_min() could access uninitialized variables.

Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-08-12 14:37:19 -04:00
Len Brown 4e54e9f442 Pull sbs into release branch 2007-08-12 00:21:22 -04:00
Len Brown 27196c30db Pull processor into release branch 2007-08-12 00:21:08 -04:00
Len Brown ad17b209dc Pull fluff into release branch 2007-08-12 00:20:59 -04:00
Len Brown d88da66f93 Pull ec into release branch 2007-08-12 00:20:41 -04:00
Len Brown 6712a4fbb1 Pull dock-bay into release branch 2007-08-12 00:20:33 -04:00
Len Brown d8dd3cbcf1 Pull bugzilla-8842 into release branch 2007-08-12 00:19:23 -04:00
Len Brown fc0dc4d3aa Pull bugzilla-8768 into release branch 2007-08-12 00:18:11 -04:00
Len Brown 53fdc5185c Pull bugzilla-3774 into release branch 2007-08-12 00:17:59 -04:00
Len Brown 3b6919e536 pull asus sony thinkpad into release branch 2007-08-12 00:17:12 -04:00
Len Brown 0b5bfa1cbe ACPI: thermal: add DMI hooks to handle AOpen's broken Award BIOS
Use DMI to:
1. enable polling (BIOS thermal events are broken)
2. disable active trip points (BIOS fan control is broken)
3. disable passive trip point (BIOS hard-codes it too low)

The actual temperature reading does work,
and with the aid of polling, the critical
trip point should work too.

http://bugzilla.kernel.org/show_bug.cgi?id=8842

Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-12 00:13:02 -04:00
Len Brown f8707ec964 ACPI: thermal: create "thermal.act=" to disable or override active trip point
thermal.act=-1 disables all active trip points
in all ACPI thermal zones.

thermal.act=C, where C > 0, overrides all lowest temperature
active trip points in all thermal zones to C degrees Celsius.
Raising this trip-point may allow you to keep your system silent
up to a higher temperature.  However, it will not allow you to
raise the lowest temperature trip point above the next higher
trip point (if there is one).  Lowering this trip point may
kick in the fan sooner.

Note that overriding this trip-point will disable any BIOS attempts
to implement hysteresis around the lowest temperature trip point.
This may result in the fan starting and stopping frequently
if temperature frequently crosses C.

WARNING: raising trip points above the manufacturer's defaults
may cause the system to run at higher temperature and shorten
its life.

Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-12 00:12:54 -04:00
Len Brown f548714561 ACPI: thermal: create "thermal.nocrt" to disable critical actions
thermal.nocrt=1 disables actions on _CRT and _HOT
ACPI thermal zone trip-points.  They will be marked
as <disabled> in /proc/acpi/thermal_zone/*/trip_points.

There are two cases where this option is used:

1. Debugging a hot system crossing valid trip point.

   If your system fan is spinning at full speed,
   be sure that the vent is not clogged with dust.
   Many laptops have very fine thermal fins that are easily blocked.

   Check that the processor fan-sink is properly seated,
   has the proper thermal grease, and is really spinning.

   Check for fan related options in BIOS SETUP.
   Sometimes there is a performance vs quiet option.
   Defaults are generally the most conservative.

   If your fan is not spinning, yet /proc/acpi/fan/
   has files in it, please file a Linux/ACPI bug.

   WARNING: you risk shortening the lifetime of your
   hardware if you use this parameter on a hot system.
   Note that this refers to all system components,
   including the disk drive.

2. Working around a cool system crossing critical
   trip point due to erroneous temperature reading.

   Try again with CONFIG_HWMON=n
   There is known potential for conflict between the
   the hwmon sub-system and the ACPI BIOS.
   If this fixes it, notify lm-sensors@lm-sensors.org
   and linux-acpi@vger.kernel.org

   Otherwise, file a Linux/ACPI bug, or notify
   just linux-acpi@vger.kernel.org.

Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-12 00:12:44 -04:00
Len Brown a70cdc5200 ACPI: thermal: create "thermal.psv=" to override passive trip points
"thermal.psv=-1" disables passive trip points
for all ACPI thermal zones.

"thermal.psv=C", where 'C' is degrees Celsius,
overrides all existing passive trip points
for all ACPI thermal zones.

thermal.psv is checked at module load time,
and in response to trip-point change events.

Note that if the system does not deliver thermal zone
temperature change events near the new trip-point,
then it will not be noticed.  To force your custom
trip point to be noticed, you may need to enable polling:
eg. thermal.tzp=3000 invokes polling every 5 minutes.

Note that once passive thermal throttling is invoked,
it has its own internal Thermal Sampling Period (_TSP),
that is unrelated to _TZP.

WARNING: disabling or raising a thermal trip point
may result in increased running temperature and
shorter hardware lifetime on some systems.

Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-12 00:12:35 -04:00
Len Brown 730ff34de7 ACPI: thermal: expose "thermal.tzp=" to set global polling frequency
Thermal Zone Polling frequency (_TZP) is an optional ACPI object
recommending the rate that the OS should poll the associated thermal zone.

If _TZP is 0, no polling should be used.
If _TZP is non-zero, then the platform recommends that
the OS poll the thermal zone at the specified rate.
The minimum period is 30 seconds.
The maximum period is 5 minutes.

(note _TZP and thermal.tzp units are in deci-seconds,
 so _TZP = 300 corresponds to 30 seconds)

If _TZP is not present, ACPI 3.0b recommends that the
thermal zone be polled at an "OS provided default frequency".

However, common industry practice is:
1. The BIOS never specifies any _TZP
2. High volume OS's from this century never poll any thermal zones

Ie. The OS depends on the platform's ability to
provoke thermal events when necessary, and
the "OS provided default frequency" is "never":-)

There is a proposal that ACPI 4.0 be updated to reflect
common industry practice -- ie. no _TZP, no polling.

The Linux kernel already follows this practice --
thermal zones are not polled unless _TZP is present and non-zero.

But thermal zone polling is useful as a workaround for systems
which have ACPI thermal control, but have an issue preventing
thermal events.  Indeed, some Linux distributions still
set a non-zero thermal polling frequency for this reason.

But rather than ask the user to write a polling frequency
into all the /proc/acpi/thermal_zone/*/polling_frequency
files, here we simply document and expose the already
existing module parameter to do the same at system level,
to simplify debugging those broken platforms.

Note that thermal.tzp is a module-load time parameter only.

Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-12 00:12:26 -04:00
Len Brown 72b33ef8bb ACPI: thermal: create "thermal.off=1" to disable ACPI thermal support
"thermal.off=1" disables all ACPI thermal support at boot time.

CONFIG_ACPI_THERMAL=n can do this at build time.
"# rmmod thermal" can do this at run time,
as long as thermal is built as a module.

WARNING: On some systems, disabling ACPI thermal support
will cause the system to run hotter and reduce the
lifetime of the hardware.

Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-12 00:12:17 -04:00
Adrian Bunk e13d874732 ACPI: static
Make the needlessly global "acpi_event_seqnum" static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-11 22:28:34 -04:00
Alexey Starikovskiy 199e9e7d11 ACPI EC: remove potential deadlock from EC
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-11 22:26:24 -04:00
Holger Macht 66b568218a ACPI: dock: Send key=value pair instead of plain value
Send key=value pair along with the uevent instead of a plain value so that
userspace (udev) can handle it like common environment variables.

Signed-off-by: Holger Macht <hmacht@suse.de>
Acked-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Cc: Stephan Berberig <s.berberig@arcor.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-11 22:12:10 -04:00
Stephan Berberig 7aa763cb56 ACPI: bay: send envp with uevent - fix
There must not be a new-line character in the uevent.  Otherwise, udev gets
confused.  Thanks to Kay Sievers for pointing it out.

Signed-off-by: Stephan Berberig <s.berberig@arcor.de>
Cc: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-11 22:10:04 -04:00
Linus Torvalds 3864e8ccbb Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
  [S390] monwriter: Serialization bug for multithreaded applications.
  [S390] vmur: diag14 only works with buffers below 2GB
  [S390] vmur: add "top of queue" sanity check for reader open
  [S390] vmur: reject open on z/VM reader files with status HOLD
  [S390] vmur: use DECLARE_COMPLETION_ONSTACK to keep lockdep happy
  [S390] vmur: allocate single record buffers instead of one big data buffer
  [S390] remove DEFAULT_MIGRATION_COST
  [S390] qdio: make sure data structures are correctly aligned.
  [S390] hypfs: implement show_options
  [S390] cio: avoid memory leak on error in css_alloc_subchannel().
2007-08-11 16:18:58 -07:00
Linus Torvalds dc8a7b11aa Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  BLOCK: Hide the contents of linux/bio.h if CONFIG_BLOCK=n
  sysace: HDIO_GETGEO has it's own method for ages
  drivers/block/cpqarray.c: better error handling and kmalloc + memset conversion to k[cz]alloc
  drivers/block/cciss.c: kmalloc + memset conversion to kzalloc
  Clean up duplicate includes in drivers/block/
  Fix remap handling by blktrace
  [PATCH] remove mm/filemap.c:file_send_actor()
2007-08-11 16:01:06 -07:00
Sam Ravnborg 1e6a20c9c7 [ARM] 4544/1: arm: fix section mismatch in pxa fb
Fix following section mismatch warning:
WARNING: drivers/built-in.o(.text+0x73d0): Section mismatch: reference to .init.data: (between 'pxafb_setup' and 'pxafb_init')

The warning are caused by __devinit pxafb_setup() that refers to a
variable marked __initdata.  In a hotplug scenario we would have a
reference to the freed .init.data section.  Fix this by declaring
g_options __devinitdata.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-08-11 23:58:24 +01:00
Andi Kleen ab144f5ec6 i386: Make patching more robust, fix paravirt issue
Commit 19d36ccdc3 "x86: Fix alternatives
and kprobes to remap write-protected kernel text" uses code which is
being patched for patching.

In particular, paravirt_ops does patching in two stages: first it
calls paravirt_ops.patch, then it fills any remaining instructions
with nop_out().  nop_out calls text_poke() which calls
lookup_address() which calls pgd_val() (aka paravirt_ops.pgd_val):
that call site is one of the places we patch.

If we always do patching as one single call to text_poke(), we only
need make sure we're not patching the memcpy in text_poke itself.
This means the prototype to paravirt_ops.patch needs to change, to
marshal the new code into a buffer rather than patching in place as it
does now.  It also means all patching goes through text_poke(), which
is known to be safe (apply_alternatives is also changed to make a
single patch).

AK: fix compilation on x86-64 (bad rusty!)
AK: fix boot on x86-64 (sigh)
AK: merged with other patches

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-11 15:58:13 -07:00
Jes Sorensen b1a47190a6 lguest files should explicitly include asm/paravirt.h
Files using bits from paravirt.h should explicitly include it rather than
relying on it being pulled in by something else.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-11 15:47:42 -07:00
Peter Chubb cd5bfea278 fix compilation with gcc 4.2
gcc-4.2 is a lot more picky about its symbol handling.  EXPORT_SYMBOL no
longer works on symbols that are undefined or defined with static scope.

For example, with CONFIG_PROFILE off, I see:

  kernel/profile.c:206: error: __ksymtab_profile_event_unregister causes a section type conflict
  kernel/profile.c:205: error: __ksymtab_profile_event_register causes a section type conflict

This patch moves the EXPORTs inside the #ifdef CONFIG_PROFILE, so we
only try to export symbols that are defined.

Also, in kernel/kprobes.c there's an EXPORT_SYMBOL_GPL() for
jprobes_return, which if CONFIG_JPROBES is undefined is a static
inline and gives the same error.

And in drivers/acpi/resources/rsxface.c, there's an
ACPI_EXPORT_SYMBOPL() for a static symbol. If it's static, it's not
accessible from outside the compilation unit, so should bot be exported.

These three changes allow building a zx1_defconfig kernel with gcc 4.2
on IA64.

[akpm@linux-foundation.org: export jpobe_return properly]
Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au>
Cc: Prasanna S Panchamukhi <prasanna@in.ibm.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-11 15:47:42 -07:00
David Brownell 96ddbf504a spidev warning fix
Git rid of "warning: passing arg 2 of `access_ok' makes pointer from integer
without a cast" reported on SH ...  most architectures use macros in that
test, SH uses inlined functions.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-11 15:47:42 -07:00
Andrew Morton 0c1eafdb06 mtdchar build fix
sh:

drivers/mtd/mtdchar.c: In function `mtd_mmap':
drivers/mtd/mtdchar.c:817: error: dereferencing pointer to incomplete type
drivers/mtd/mtdchar.c:817: error: `VM_SHARED' undeclared (first use in this function)
drivers/mtd/mtdchar.c:817: error: (Each undeclared identifier is reported only once

Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-11 15:47:41 -07:00
Alan Cox 42fd552e86 fix serial buffer memory leak
Patch c5c34d4862 (tty: flush flip buffer on
ldisc input queue flush) introduces a race condition which can lead to memory
leaks.

The problem can be triggered when tcflush() is called when data are being
pushed to the line discipline driver by flush_to_ldisc().

flush_to_ldisc() releases tty->buf.lock when calling the line discipline
receive_buf function. At that poing tty_buffer_flush() kicks in and sets both
tty->buf.head and tty->buf.tail to NULL. When flush_to_ldisc() finishes, it
restores tty->buf.head but doesn't touch tty->buf.tail. This corrups the
buffer queue, and the next call to tty_buffer_request_room() will allocate a
new buffer and overwrite tty->buf.head. The previous buffer is then lost
forever without being released.

(Thanks to Laurent for the above text, for finding, disgnosing and reporting
the bug)

- Use tty->flags bits for the flush status.

- Wait for the flag to clear again before returning

- Fix the doc error noted

- Fix flush of empty queue leaving stale flushpending

[akpm@linux-foundation.org: cleanup]
Signed-off-by: Alan Cox <alan@redhat.com>
Acked-by: Paul Fulghum <paulkf@microgate.com>
Cc: Laurent Pinchart <laurentp@cse-semaphore.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-11 15:47:41 -07:00
Anton Vorontsov a44648b057 spi_mpc83xx: fix prescale modulus calculation
Long ago I've noticed (but didn't pay much attention) that
spi_mpc83xx using PM calculations that differs from what
specs describe. I.e.

u8 pm = mpc83xx_spi->spibrg / (spi->max_speed_hz * 4);

While specs says: "The SPI baud rate generator clock source (either
system clock or system clock divided by 16, depending on DIV16 bit) is
divided by 4 * ([PM] + 1), a range from 4 to 64.".

Thus " - 1" is missing in the spi_mpc83xx's formula.

Why nobody noticed that bug? Probably because sysclk usually less then
user expects, e.g. you expect 200 MHz, but real clock is 198 MHz,
and integer rounding helps when this formula is used.

Suppose it's SPI in QE, SYSCLK at 198 MHz, thus SPIBRG at 99MHz, 25 MHz
requested.

PM = (99MHz / ( 25 MHz * 4 )), PM == 0, output SPICLK will be 24.75 MHz

At lower frequencies this bug is more noticeable, though.

And this bug shows itself in all its beauty if SYSCLK is equal or a bit
more than you expect (200 MHz SYSCLK, 100 MHz SPIBRG):
PM = (100MHz / ( 25 MHz * 4 )), PM == 1, output SPICLK will be 12.625 MHz!

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-11 15:47:41 -07:00
Anton Vorontsov e24a4d1ee3 spi_mpc83xx: in "QE mode", use sysclk/2
For MPC8349E input to the SPI Baud Rate Generator is SYSCLK, but it's
SYSCLK/2 for MPC8323E (SPI in QE).  Fix this, and remove confusion by
renaming the mpc83xx_spi->sysclk member as mpc83xx_spi->spibrg.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-11 15:47:41 -07:00
Daniel Ritz 925796e0ed drivers/char/pcmcia/cm40x0_cs.c: fix release function call
cm4000_cs.c and cm4040_cs.c call the internal release function with
an argument of wrong type. this fixes bug #8485

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Cc: Bill McConnaughey <mcconnau@biochem.wustl.edu>
Cc: Natalie Protasevich <protasnb@gmail.com>
Cc: Harald Welte <laforge@gnumonks.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-11 15:47:40 -07:00
Paul A. Clarke e798bd95b6 matroxfb: rectify jitter (G450/G550)
This builds upon my previous attempts to resolve some jitter problems seen
with the Matrox G450 and G550 -based cards, including odd disparities observed
between x86 and Power -based machines in a somewhat less hackish way (removing
the hacked ifdefs).

Apparently, preference should be given to use the DVI PLL when frequencies
permit, the Standard PLL otherwise.  The max pixel clock for the panellink
interface is extracted from the PInS information on the card and used as a
limit to determine which PLL to use.

Signed-off-by: Paul A. Clarke <pc@us.ibm.com>
Acked-by: Petr Vandrovec <petr@vandrovec.name>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-11 15:47:40 -07:00
Adrian McMenamin 306c869c23 pvr2fb: Consolidated cleanup of pvr2fb.c
- better handling of the pvr2 registers based on more up to date information.

Testing shows that it seems to work pretty well at 16bpp, 24bpp and 32bpp -
including proper rendering of the boot logo at all levels (previously this was
a bit broken even at 16bpp) and giving white against black text.  Really
detailed testing (eg with X11) requires support for the maple bus - which
isn't (currently - next project assuming this is okay) available, but I have
no reason to think this is broken.

Signed-off by: Adrian McMenamin <adrian@mcmen.demon.co.uk>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-11 15:47:40 -07:00
Antonino A. Daplas 9cd1c67434 pvr2fb: Fix oops when pseudo_palette is written
Reported by: Adrian McMenamin <adrianmcmenamin@gmail.com>

This driver will oops when the pseudo_palette[] is written as u32 but not when
written as u16.  When written as u32, it corrupts the adjacent 'mmio_base'
field of struct pvr2fb_par.  Fix by using framebuffer_alloc()/release() to
allocate struct fb_info and struct pvr2fb_par, and create the pseudo_palette[]
as part of struct pvr2fb_par.

Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-11 15:47:40 -07:00
Antonino A. Daplas 4769a9a53b fbcon: Kill compile warning
Fix compile warning ('map_override unused') if fbcon is compiled as a module
and CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=n.

[akpm@linux-foundation.org: cleanup]
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-11 15:47:40 -07:00
Helge Deller 04a3f959f6 stifb: detect cards in double buffer mode more reliably
Visualize-EG, Graffiti and A4450A graphics cards on PARISC can
be configured in double-buffer and standard mode, but the stifb
driver supports standard mode only.
This patch detects double-buffered cards more reliable.

It is a real bugfix for a very nasty problem for all parisc users which have
wrongly configured their graphic card.  The problem: The stifb graphics driver
will not detect that the card is wrongly configured and then nevertheless just
enables the graphics mode, which it shouldn't.  In the end, the user will see
no further updates / boot messages on the screen.

We had documented this problem already on our FAQ
(http://parisc-linux.org/faq/index.html#viseg "Why do I get corrupted graphics
with my Vis-EG/Graffiti/A4450A card?") but people still run into this problem.
 So having this fix in as early as possible can help us.

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Cc: <stable@kernel.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-11 15:47:40 -07:00
Christoph Hellwig a6b3a93e15 sysace: HDIO_GETGEO has it's own method for ages
The way this driver tries to implement HDIO_GETGEO it'll never be called.
Then again on ppc it probably will never be called anyway because it's
utterly pointless.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-08-11 22:34:48 +02:00
Mariusz Kozlowski 2e4934aa45 drivers/block/cpqarray.c: better error handling and kmalloc + memset conversion to k[cz]alloc
This patch removes some redundant casts, does the kmalloc + memset to
k[cz]alloc conversion and it changes the error path to use goto (to avoid code
duplication).

 drivers/block/cpqarray.c | 49567 -> 48623 (-944 bytes)
 drivers/block/cpqarray.o | 178820 -> 178288 (-532 bytes)

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Acked-by: Mike Miller <mike.miller@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-08-11 22:34:48 +02:00
Mariusz Kozlowski 1aebe18787 drivers/block/cciss.c: kmalloc + memset conversion to kzalloc
drivers/block/cciss.c | 104285 -> 104168 (-117 bytes)
 drivers/block/cciss.o | 277400 -> 277124 (-276 bytes)

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Acked-by: Mike Miller <mike.miller@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-08-11 22:34:48 +02:00
Jesper Juhl 9b99628f8e Clean up duplicate includes in drivers/block/
This patch cleans up duplicate includes in
	drivers/block/

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Satyam Sharma <satyam.sharma@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-08-11 22:34:48 +02:00
Alan D. Brunelle c7149d6bce Fix remap handling by blktrace
This patch provides more information concerning REMAP operations on block
IOs. The additional information provides clearer details at the user level,
and supports post-processing analysis in btt.

o  Adds in partition remaps on the same device.
o  Fixed up the remap information in DM to be in the right order
o  Sent up mapped-from and mapped-to device information

Signed-off-by: Alan D. Brunelle <alan.brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-08-11 22:34:48 +02:00
Mark M. Hoffman 393cdad626 hwmon: fix w83781d temp sensor type setting
Commit 348753379a introduced a regression that
caused temp2 and temp3 sensor type settings to be written to temp1 instead.
The result is that temp sensor readings could be way off.

Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2007-08-11 14:22:57 -04:00
Melissa Howland cbea66d978 [S390] monwriter: Serialization bug for multithreaded applications.
Locking added so that multithreaded applications can now do writes
from different threads without the risk of storage corruption.

Signed-off-by: Melissa Howland <melissah@us.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-08-10 14:32:39 +02:00
Michael Holzheu 3eed13cc3b [S390] vmur: diag14 only works with buffers below 2GB
If memory buffers above 2GB are used, diagnose 14 raises a specification
exception. This fix ensures that buffer allocation is done below the 2GB
boundary.

Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-08-10 14:32:39 +02:00
Michael Holzheu 4eac34529b [S390] vmur: add "top of queue" sanity check for reader open
If the z/VM reader is already open, it can happen that after opening the
Linux reader device, not the topmost file is processed. According the
semantics of the Linux z/VM unit record device driver, always the topmost
file has to be processed. With this fix an error is returned if that is
not the case.

Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-08-10 14:32:38 +02:00
Michael Holzheu f2405598e0 [S390] vmur: reject open on z/VM reader files with status HOLD
If a reader file with HOLD status is at the top of the reader queue, currently
all read requests will return data of the second file in the queue. But the
semantics of vmur is that always the topmost file is read. With this fix
-EPERM is returned on open, if the topmost reader file is in HOLD status.

Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-08-10 14:32:37 +02:00
Heiko Carstens 278bc68c4b [S390] vmur: use DECLARE_COMPLETION_ONSTACK to keep lockdep happy
INFO: trying to register non-static key.
the code is fine but needs lockdep annotation.
turning off the locking correctness validator.
000000000ff9fb08 000000000ff9fb18 0000000000000002 0000000000000000
000000000ff9fbb8 000000000ff9fb30 000000000ff9fb30 0000000000104198
0000000000000000 0000000000000002 0000000000000000 0000000000000000
000000000ff9fb18 000000000000000c 000000000ff9fb18 000000000ff9fb88
0000000000448db0 0000000000104198 000000000ff9fb18 000000000ff9fb68
Call Trace:
([<00000000001040ea>] show_trace+0x12e/0x170)
 [<00000000001041f2>] show_stack+0xc6/0xf8
 [<0000000000104252>] dump_stack+0x2e/0x3c
 [<0000000000155f9c>] __lock_acquire+0x460/0x1048
 [<0000000000156c16>] lock_acquire+0x92/0xb8
 [<000000000043f406>] _spin_lock_irqsave+0x62/0x80
 [<0000000000121382>] complete+0x32/0x78
 [<000000001082b468>] ur_int_handler+0xc8/0xec [vmur]
 [<0000000000313216>] ccw_device_call_handler+0xae/0xd4
 [<0000000000310da4>] ccw_device_irq+0x5c/0x130
 [<0000000000312c84>] io_subchannel_irq+0x8c/0x118
 [<000000000030a88c>] do_IRQ+0x16c/0x194
 [<0000000000111a62>] io_no_vtime+0x16/0x1c
 [<0000000080001394>] 0x80001394

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-08-10 14:32:37 +02:00
Michael Holzheu 1eade380c5 [S390] vmur: allocate single record buffers instead of one big data buffer
vmur allocates one contiguous kernel buffer to copy user data when creating
ccw programs for punch or printer. If big block sizes are used, under memory
pressure it can happen, that we do not get memory in one chunk. Now we
allocate memory for each single record to avoid high order allocations.

Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-08-10 14:32:37 +02:00
Heiko Carstens c6d0e8014a [S390] qdio: make sure data structures are correctly aligned.
The slsb structure contained at the beginning of the qdio_q structure
must start on a 256 byte boundary. To make sure this is the case even
if slab debugging is turned on create an own slab cache for qdio_q
structures.
Besides that don't use the slab allocator to allocate whole pages. Use
the page allocator instead.
Also fix a few memory leaks in error handling code.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-08-10 14:32:36 +02:00
Cornelia Huck 5693ce6f9b [S390] cio: avoid memory leak on error in css_alloc_subchannel().
sch->lock has been allocated in cio_validate_subchannel(), it must be
freed if cio_modify() fails.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-08-10 14:32:36 +02:00
Linus Torvalds 5a0276b7ae Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
  mmc: at91_mci: remove whitespace at the end of lines
  mmc: reorganize bounce buffer init
  wbsd: fix section mismatch warnings
2007-08-09 08:23:47 -07:00
Rusty Russell 0d027c01cd lguest: Fix Malicious Guest GDT Host Crash
If a Guest makes hypercall which sets a GDT entry to not present, we
currently set any segment registers using that GDT entry to 0.
Unfortunately, this is not sufficient: there are other ways of
altering GDT entries which will cause a fault.

The correct solution to do what Linux does: let them set any GDT value
they want and handle the #GP when popping causes a fault.  This has
the added benefit of making our Switcher slightly more robust in the
case of any other bugs which cause it to fault.

We kill the Guest if it causes a fault in the Switcher: it's the
Guest's responsibility to make sure it's not using segments when it
changes them.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-09 08:14:56 -07:00
Rusty Russell 37250097e1 Fix non-TSC guest clocksource lockup
lguest uses a host-supplied wallclock-based clocksource when the TSC
is not reliable.  As this is already in nanoseconds, I naively used a
multiplier of 1 and a shift of 0.

But update_wall_time() in its infinite wisdom decides to adjust the
clock a little (where does it think it's getting a more accurate time
from?)

It will happily tweak the multiplier... to 0, then -1.

So the "fix" is to use a shift of 22 like everyone else, and a
multiplier of 1 << 22.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-09 08:14:56 -07:00
Nicolas Ferre 37b758e8bc mmc: at91_mci: remove whitespace at the end of lines
Some cleanup with whitespace/tab at the end of lines.

Signed-off-by: Nicolas Ferre <nicolas.ferre@rfo.atmel.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-08-09 16:13:44 +02:00
Pierre Ossman aafabfab26 mmc: reorganize bounce buffer init
Reorganize the code that initializes mmc_block's bounce buffer in
order to avoid warnings when MMC_BLOCK_BOUNCE isn't used.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-08-09 14:37:17 +02:00
Gabriel C b3627bb19f wbsd: fix section mismatch warnings
This patch fixes the following section mismatch warnings

...

WARNING: vmlinux.o(.init.text+0x29d40): Section mismatch: reference to .exit.text:wbsd_release_resources (between 'wbsd_init' and 'wbsd_probe')
WARNING: vmlinux.o(.init.text+0x29d49): Section mismatch: reference to .exit.text:wbsd_free_mmc (between 'wbsd_init' and 'wbsd_probe')
WARNING: vmlinux.o(.init.text+0x29f28): Section mismatch: reference to .exit.text:wbsd_free_mmc (between 'wbsd_init' and 'wbsd_probe')

...

Signed-off-by: Gabriel Craciunescu <nix.or.die@googlemail.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-08-09 14:37:10 +02:00
Fenghua Yu 501092929c acpi-cpufreq: Fix some x86/x86-64 acpi-cpufreq driver issues
This patch addresses some issues in x86/x86-64 acpi-cpufreq driver:

1.  Current memory allocation for acpi_perf_data is actually open-coded
   alloc_percpu().  The patch defines and handles acpi_perf_data as percpu
   data.  The code will be cleaner and easier to be maintained with this
   change.

2. Won't load driver in acpi_cpufreq_early_init() failure case.

3. Add __init for acpi_cpufreq_early_init().

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-07 18:40:30 -04:00
Mariusz Kozlowski 9dc83afdbe drivers/net/ibmveth.c: memset fix
> >> 	Looks like memset() is zeroing wrong nr of bytes.
> >
> > Good catch, however, I think we can just remove this memset altogether
> > since the memory gets allocated via kzalloc.
>
> Correct, that memset() is superfluous.

Ok. Then this should do it.

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>

 drivers/net/ibmveth.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-07 17:36:20 -04:00
Domen Puncer 163642a24a phy layer: fix phy_mii_ioctl for autonegotiation
Fix a thinko (?) in setting phydev->autoneg.

Signed-off-by: Domen Puncer <domen.puncer@telargo.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-07 17:34:13 -04:00
Thomas Klein 44a5b3d539 ehea: Eliminated some compiler warnings
Fixed wrongly casted pointers

Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-07 17:34:13 -04:00
Thomas Klein 35cf2e2e3b ehea: Simplify resource usage check
Use shorter method to determine whether adapter has configured ports

Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-07 17:34:13 -04:00
Thomas Klein f46f6ba99b ehea: Fix workqueue handling
Fix: Workqueue ehea_driver_wq was not destroyed

Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-07 17:34:13 -04:00
Brian King 76b9cfccb3 ibmveth: Fix rx pool deactivate oops
This fixes the following oops which can occur when trying to deallocate
receive buffer pools using sysfs with the ibmveth driver.

NIP: d00000000024f954 LR: d00000000024fa58 CTR: c0000000000d7478
REGS: c00000000ffef9f0 TRAP: 0300   Not tainted  (2.6.22-ppc64)
MSR: 8000000000009032 <EE,ME,IR,DR>  CR: 24242442  XER: 00000010
DAR: 00000000000007f0, DSISR: 0000000042000000
TASK = c000000002f91360[2967] 'bash' THREAD: c00000001398c000 CPU: 2
GPR00: 0000000000000000 c00000000ffefc70 d000000000262d30 c00000001c4087a0
GPR04: 00000003000000fe 0000000000000000 000000000000000f c000000000579d80
GPR08: 0000000000365688 c00000001c408998 00000000000007f0 0000000000000000
GPR12: d000000000251e88 c000000000579d80 00000000200957ec 0000000000000000
GPR16: 00000000100b8808 00000000100feb30 0000000000000000 0000000010084828
GPR20: 0000000000000000 000000001014d4d0 0000000000000010 c00000000ffefeb0
GPR24: c00000001c408000 0000000000000000 c00000001c408000 00000000ffffb054
GPR28: 00000000000000fe 0000000000000003 d000000000262700 c00000001c4087a0
NIP [d00000000024f954] .ibmveth_remove_buffer_from_pool+0x38/0x108 [ibmveth]
LR [d00000000024fa58] .ibmveth_rxq_harvest_buffer+0x34/0x78 [ibmveth]
Call Trace:
[c00000000ffefc70] [c0000000000280a8] .dma_iommu_unmap_single+0x14/0x28 (unreliable)
[c00000000ffefd00] [d00000000024fa58] .ibmveth_rxq_harvest_buffer+0x34/0x78 [ibmveth]
[c00000000ffefd80] [d000000000250e40] .ibmveth_poll+0xd8/0x434 [ibmveth]
[c00000000ffefe40] [c00000000032da8c] .net_rx_action+0xdc/0x248
[c00000000ffefef0] [c000000000068b4c] .__do_softirq+0xa8/0x164
[c00000000ffeff90] [c00000000002789c] .call_do_softirq+0x14/0x24
[c00000001398f6f0] [c00000000000c04c] .do_softirq+0x68/0xac
[c00000001398f780] [c000000000068ca0] .irq_exit+0x54/0x6c
[c00000001398f800] [c00000000000c8e4] .do_IRQ+0x170/0x1ac
[c00000001398f890] [c000000000004790] hardware_interrupt_entry+0x18/0x1c
   Exception: 501 at .plpar_hcall_norets+0x24/0x94
    LR = .veth_pool_store+0x15c/0x298 [ibmveth]
[c00000001398fb80] [d000000000250b2c] .veth_pool_store+0x5c/0x298 [ibmveth] (unreliable)
[c00000001398fc30] [c000000000145530] .sysfs_write_file+0x140/0x1d8
[c00000001398fcf0] [c0000000000de89c] .vfs_write+0x120/0x208
[c00000001398fd90] [c0000000000df2c8] .sys_write+0x4c/0x8c
[c00000001398fe30] [c0000000000086ac] syscall_exit+0x0/0x40
Instruction dump:
fba1ffe8 fbe1fff8 789d0022 f8010010 f821ff71 789c0020 1d3d00a8 7b8a1f24
38000000 7c7f1b78 7d291a14 e9690128 <7c0a592a> e8030000 e9690120 80a90100

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-07 17:34:13 -04:00
Jeff Garzik c21723edd5 Merge branch 'r8169-for-jeff-20070806' of git://electric-eye.fr.zoreil.com/home/romieu/linux-2.6 into upstream-fixes 2007-08-07 17:28:23 -04:00
Jeff Garzik 9b7530c83d Merge branch 'fixes-jgarzik' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixes 2007-08-07 17:25:02 -04:00
Jeff Garzik 0ae842eaf9 Merge branch 'ucc_geth' of master.kernel.org:/pub/scm/linux/kernel/git/leo/fsl-soc into upstream-fixes 2007-08-07 17:19:44 -04:00
Neil Muller 8eb7ad68bd sis190 check for ISA bridge on SiS966
sis190 driver assumes to find ISA only on SiS965.
similar fix is in sis900 driver, see bug report
http://bugs.debian.org/435547

Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-07 17:18:32 -04:00
Ingo Molnar 5845b677cf atl1: use spin_trylock_irqsave()
use the simpler spin_trylock_irqsave() API to get the adapter lock.

[ this is also a fix for -rt where adapter->lock is a sleeping lock. ]

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-07 17:18:32 -04:00
Paul Mundt 092ed997c0 net: smc91x: Build fixes for general sh boards.
SH boards in general only wire this up in 8 or 16-bit mode, and
as we never had the wrappers for 32-bit mode defined, SMC_CAN_USE_32BIT
caused build failure for the non-Solution Engine boards. This gets it
building again.

Also kill off the straggling set_irq_type() definition, this is left
over cruft that was missed when the rest of it switched to IRQ flags.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

--

 drivers/net/smc91x.h |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-08-07 17:18:31 -04:00
Jack Morgenstein 6958e827f1 IPoIB: Fix leak in ipoib_transport_dev_init() error path
ipoib_transport_dev_init() calls ipoib_cm_dev_init(), so it needs to
call ipoib_cm_dev_cleanup() to unwind that on the error path.

Found by Dotan Barak of Mellanox.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-08-07 12:40:56 -07:00
Venki Pallipadi ed3110efb5 ACPI: fix "Time Problems with 2.6.23-rc1-gf695baf2"
Enable C3 without bm control only for CST based C3.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-07 15:25:31 -04:00
Henrique de Moraes Holschuh 5f70bf7510 ACPI: thinkpad-acpi: change thinkpad-acpi input default and kconfig help
The current kconfig help text was misleading users.  Also, the default for
an input-layer-optimized support caused way too many problems without
up-to-date userspace in place.

So, rework the help text, and change the default to N.  Note that
distributions are supposed to enable this option as soon as they update HAL
to a version that handles the thinkpad-acpi new input layer interface.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-07 15:10:07 -04:00
Linus Torvalds 4a2a4df7b6 Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] rpc: update defconfig
  [ARM] pata_icside: fix the FIXMEs
  [ARM] 4542/1: AT91: include atmel_lcdc.h in at91sam926{1,3}_devices.c
  [ARM] 4541/1: iop: defconfig updates
  [ARM] 4531/1: remove is_in_rom() protptype
2007-08-06 18:31:43 -07:00
Rusty Russell cc1ff43b70 Enable lguest drivers in Kconfig
Lguest drivers need to default to "Y" otherwise they're never selected
for new builds.  (We don't bother prompting, because they're less than
4k combined, and implied by selecting lguest support).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-06 18:21:15 -07:00
Avi Kivity bac27d35cb KVM: x86 emulator: fix debug reg mov instructions
More fallout from the writeback fixes: debug register transfer
instructions do their own writeback and thus need to disable the general
writeback mechanism.

This fixes oopses and some guest failures on AMD machines (the Intel
variant decodes the instruction in hardware and thus does not need
emulation).

Cc: Alistair John Strachan <alistair@devzero.co.uk>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-06 17:54:41 -07:00
Linus Torvalds 9e865f58da Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [NETFILTER]: Add xt_statistic.h to the header list for usermode programs
  [BNX2]: Fix suspend/resume problem.
  [TG3]: Fix suspend/resume problem.
2007-08-06 17:52:56 -07:00
Linus Torvalds bced137384 Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (32 commits)
  [SCSI] aacraid: prevent panic on adapter resource failure
  [SCSI] aha152x: use data accessors and !use_sg cleanup
  [SCSI] aha152x: Fix check_condition code-path
  [SCSI] aha152x: Clean Reset path
  [SCSI] aha152x: preliminary fixes and some comments
  [SCSI] aha152x: use bounce buffer
  [SCSI] aha152x: fix debug mode symbol conflict
  [SCSI] sd: disentangle barriers in SCSI
  [SCSI] lpfc : scsi command accessor fix for 8.2.2
  [SCSI] qlogicpti: Some cosmetic changes
  [SCSI] lpfc 8.2.2 : Change version number to 8.2.2
  [SCSI] lpfc 8.2.2 : Style cleanups
  [SCSI] lpfc 8.2.2 : Miscellaneous Bug Fixes
  [SCSI] lpfc 8.2.2 : Miscellaneous management and logging mods
  [SCSI] lpfc 8.2.2 : Rework the lpfc_printf_log() macro
  [SCSI] lpfc 8.2.2 : Attribute and Parameter splits for vport and physical port
  [SCSI] lpfc 8.2.2 : Fix locking around HBA's port_list
  [SCSI] lpfc 8.2.2 : Error messages and debugfs updates
  [SCSI] initialize shost_data to zero
  [SCSI] mptsas: add SMP passthrough support via bsg
  ...
2007-08-06 17:48:34 -07:00
Dave Airlie 21f1628927 drm/i915: Fix i965 secured batchbuffer usage
This 965G and above chipsets moved the batch buffer non-secure bits to
another place. This means that previous drm's allowed in-secure batchbuffers
to be submitted to the hardware from non-privileged users who are logged
into X and and have access to direct rendering.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-06 17:46:23 -07:00
Francois Romieu 313b0305b5 r8169: avoid needless NAPI poll scheduling
Theory  : though needless, it should not have hurt.
Practice: it does not play nice with DEBUG_SHIRQ + LOCKDEP + UP
(see https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=242572).

The patch makes sense in itself but I should dig why it has an effect
on #242572 (assuming that NAPI do not change in a near future).

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
2007-08-07 00:07:36 +02:00