Commit graph

67220 commits

Author SHA1 Message Date
Linus Torvalds f27884aead Merge git://git.infradead.org/battery-2.6
* git://git.infradead.org/battery-2.6:
  da9030_battery: Fix race between event handler and monitor
  Add MAX17040 Fuel Gauge driver
  w1: ds2760_battery: add support for sleep mode feature
  w1: ds2760: add support for EEPROM read and write
  ds2760_battery: cleanups in ds2760_battery_probe()
2009-06-24 14:35:57 -07:00
Linus Torvalds c82e6d450f Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  Staging: octeon-ethernet: Fix race freeing transmit buffers.
  Staging: octeon-ethernet: Convert to use net_device_ops.
  MIPS: Cavium: Add CPU hotplugging code.
  MIPS: SMP: Allow suspend and hibernation if CPU hotplug is available
  MIPS: Add arch generic CPU hotplug
  DMA: txx9dmac: use dma_unmap_single if DMA_COMPL_{SRC,DEST}_UNMAP_SINGLE set
  MIPS: Sibyte: Fix build error if CONFIG_SERIAL_SB1250_DUART is undefined.
  MIPS: MIPSsim: Fix build error if MSC01E_INT_BASE is undefined.
  MIPS: Hibernation: Remove SMP TLB and cacheflushing code.
  MIPS: Build fix - include <linux/smp.h> into all smp_processor_id() users.
  MIPS: bug.h Build fix - include <linux/compiler.h>.
2009-06-24 10:47:38 -07:00
David Daney a620c16326 Staging: octeon-ethernet: Fix race freeing transmit buffers.
The existing code had the following race:

Thread-1                       Thread-2

inc/read in_use
                               inc/read in_use
inc tx_free_list[qos].len
                               inc tx_free_list[qos].len

The actual in_use value was incremented twice, but thread-1 is going
to free memory based on its stale value, and will free one too many
times.  The result is that memory is freed back to the kernel while
its packet is still in the transmit buffer.  If the memory is
overwritten before it is transmitted, the hardware will put a valid
checksum on it and send it out (just like it does with good packets).
If by chance the TCP flags are clobbered but not the addresses or
ports, the result can be a broken TCP stream.

The fix is to track the number of freed packets in a single location
(a Fetch-and-Add Unit register).  That way it can never get out of sync
with itself.

We try to free up to MAX_SKB_TO_FREE (currently 10) buffers at a time.
If fewer are available we adjust the free count with the difference.
The action of claiming buffers to free is atomic so two threads cannot
claim the same buffers.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-06-24 18:34:41 +01:00
David Daney f696a10838 Staging: octeon-ethernet: Convert to use net_device_ops.
Convert the driver to use net_device_ops as it is now mandatory.

Also compensate for the removal of struct sk_buff's dst field.

The changes are mostly mechanical, the content of ethernet-common.c
was moved to ethernet.c and ethernet-common.{c,h} are removed.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-06-24 18:34:41 +01:00
Atsushi Nemoto 4ac4aa5cc3 DMA: txx9dmac: use dma_unmap_single if DMA_COMPL_{SRC,DEST}_UNMAP_SINGLE set
This patch does not change actual behaviour since dma_unmap_page is just
an alias of dma_unmap_single on MIPS.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-06-24 18:34:40 +01:00
Linus Torvalds c3cb5e1939 Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm
* git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm: (48 commits)
  dm mpath: change to be request based
  dm: disable interrupt when taking map_lock
  dm: do not set QUEUE_ORDERED_DRAIN if request based
  dm: enable request based option
  dm: prepare for request based option
  dm raid1: add userspace log
  dm: calculate queue limits during resume not load
  dm log: fix create_log_context to use logical_block_size of log device
  dm target:s introduce iterate devices fn
  dm table: establish queue limits by copying table limits
  dm table: replace struct io_restrictions with struct queue_limits
  dm table: validate device logical_block_size
  dm table: ensure targets are aligned to logical_block_size
  dm ioctl: support cookies for udev
  dm: sysfs add suspended attribute
  dm table: improve warning message when devices not freed before destruction
  dm mpath: add service time load balancer
  dm mpath: add queue length load balancer
  dm mpath: add start_io and nr_bytes to path selectors
  dm snapshot: use barrier when writing exception store
  ...
2009-06-24 10:26:54 -07:00
Linus Torvalds ea94b5034b Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb
* 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb:
  uwb: allow WLP to be used with IPv6.
  uwb: event_size should be signed
2009-06-24 10:26:24 -07:00
Linus Torvalds 0c26d7cc31 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (72 commits)
  asus-laptop: remove EXPERIMENTAL dependency
  asus-laptop: use pr_fmt and pr_<level>
  eeepc-laptop: cpufv updates
  eeepc-laptop: sync eeepc-laptop with asus_acpi
  asus_acpi: Deprecate in favor of asus-laptop
  acpi4asus: update MAINTAINER and KConfig links
  asus-laptop: platform dev as parent for led and backlight
  eeepc-laptop: enable camera by default
  ACPI: Rename ACPI processor device bus ID
  acerhdf: Acer Aspire One fan control
  ACPI: video: DMI workaround broken Acer 7720 BIOS enabling display brightness
  ACPI: run ACPI device hot removal in kacpi_hotplug_wq
  ACPI: Add the reference count to avoid unloading ACPI video bus twice
  ACPI: DMI to disable Vista compatibility on some Sony laptops
  ACPI: fix a deadlock in hotplug case
  Show the physical device node of backlight class device.
  ACPI: pdc init related memory leak with physical CPU hotplug
  ACPI: pci_root: remove unused dev/fn information
  ACPI: pci_root: simplify list traversals
  ACPI: pci_root: use driver data rather than list lookup
  ...
2009-06-24 10:17:07 -07:00
Linus Torvalds 09ce42d316 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6:
  bnx2: Fix the behavior of ethtool when ONBOOT=no
  qla3xxx: Don't sleep while holding lock.
  qla3xxx: Give the PHY time to come out of reset.
  ipv4 routing: Ensure that route cache entries are usable and reclaimable with caching is off
  net: Move rx skb_orphan call to where needed
  ipv6: Use correct data types for ICMPv6 type and code
  net: let KS8842 driver depend on HAS_IOMEM
  can: let SJA1000 driver depend on HAS_IOMEM
  netxen: fix firmware init handshake
  netxen: fix build with without CONFIG_PM
  netfilter: xt_rateest: fix comparison with self
  netfilter: xt_quota: fix incomplete initialization
  netfilter: nf_log: fix direct userspace memory access in proc handler
  netfilter: fix some sparse endianess warnings
  netfilter: nf_conntrack: fix conntrack lookup race
  netfilter: nf_conntrack: fix confirmation race condition
  netfilter: nf_conntrack: death_by_timeout() fix
2009-06-24 10:01:12 -07:00
Chuck Ebbert 4d8d4d251d Remove low_latency flag setting from nozomi and mxser drivers
The kernel oopses if this flag is set.

[and neither driver should set it as they call tty_flip_buffer_push from IRQ
 paths so have always been buggy]

Signed-off-by: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-24 09:55:50 -07:00
Jiri Slaby 6af9a43d58 tty: fix tty_port_block_til_ready waiting
Since commit 3e3b5c0877 ("tty: use
prepare/finish_wait"), tty_port_block_til_ready() is using
prepare_to_wait()/finish_wait().  Those functions require that the
wait_queue_t be initialised with .func=autoremove_wake_function, via
DEFINE_WAIT().

But the conversion from DECLARE_WAITQUEUE() to DEFINE_WAIT() was not made,
so this code will oops in finish_wait().

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-24 09:55:50 -07:00
Arjan van de Ven 24ed3abaa1 pci: use pci_ioremap_bar() in drivers/serial
Use the newly introduced pci_ioremap_bar() function in drivers/serial.
pci_ioremap_bar() just takes a pci device and a bar number, with the goal
of making it really hard to get wrong, while also having a central place
to stick sanity checks.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-24 09:55:50 -07:00
Paul Fulghum ce89294c05 synclink_gt: fix transmit race and timeout
Fix race condition when adding transmit data to active DMA buffer ring
that can cause transmit stall.

Update transmit timeout when adding data to active DMA buffer ring.
Base transmit timeout on amount of buffered data instead of using fixed
value.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-24 09:55:50 -07:00
Andrew Morton 2a13373cf8 jsm: clean up "serial: jsm: correctly support 4 8 port boards"
Remove unneeded casts.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-24 09:55:50 -07:00
Atsushi Nemoto a10b32db34 kgdb: kgdboc console poll hooks for serial_txx9 uart
Implement the serial polling hooks for the serial_txx9 uart for use with
kgdboc.

This patch once got SOB from Jason on Jul 2008 and (perhaps) merged into
kgdb-next branch, but lost somewhere then.  I resend it now with Jason's
Acked-by.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Acked-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-24 09:55:50 -07:00
David S. Miller d7e2f36d9a ide cs5520: Initialize second port's interrupt number.
In 86ccf37c6a the driver was modified
to deal with the removal of the pciirq argument to ide_pci_setup_ports().

But in the conversion only the first port's IRQ gets setup.

Inspired by a patch by Bartlomiej Zolnierkiewicz., and with help from
Alan Cox.

Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-24 02:36:17 -07:00
Bartlomiej Zolnierkiewicz a1317f714a ide: improve handling of Power Management requests
Make hwif->rq point to PM request during PM sequence and do not allow
any other types of requests to slip in (the old comment was never correct
as there should be no such requests generated during PM sequence).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-24 00:32:33 -07:00
Bartlomiej Zolnierkiewicz ba9413bd28 ide: add QUANTUM FIREBALLct20 30 with firmware APL.090 to ivb_list[]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-24 00:32:32 -07:00
Bartlomiej Zolnierkiewicz 346c17a6cf ide: relax DMA info validity checking
There are some broken devices that report multiple DMA xfer modes
enabled at once (ATA spec doesn't allow it) but otherwise work fine
with DMA so just delete ide_id_dma_bug().

[ As discovered by detective work by Frans and Bart, due to how
  handling of the ID block was handled before commit c419993
  ("ide-iops: only clear DMA words on setting DMA mode") this
  check was always seeing zeros in the fields or other similar
  garbage.  Therefore this check wasn't actually checking anything.
  Now that the tests actually check the real bits, all we see are
  devices that trigger the check yet work perfectly fine, therefore
  killing this useless check is the best thing to do. -DaveM ]

Reported-by: Frans Pop <elendil@planet.nl>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-24 00:32:32 -07:00
Frans Pop d9ae62433e ide-cd: Improve "weird block size" error message
Currently the error gets repeated too frequently, for example each
time HAL polls the device when a disc is present. Avoid that by using
printk_once instead of printk.

Also join the error and corrective action messages into a single line.

Signed-off-by: Frans Pop <elendil@planet.nl>
Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-24 00:32:31 -07:00
David S. Miller af054ed001 ide-cd: Don't warn on bogus block size unless it actually matters.
Frans Pop reported that his CDROM drive reports a blocksize of 2352,
and this causes new warnings due to commit
e8e7b9eb11 ("ide-cd: fix oops when using
growisofs").

What we're trying to do is make sure that "blocklen >> SECTOR_BITS"
is something the block layer won't choke on.

And for Frans' case "2352 >> SECTOR_BITS" is equal to
"2048 >> SECTOR_BITS", and thats "4".

So warning in this case gives no real benefit.

Reported-by: Frans Pop <elendil@planet.nl>
Tested-by: Frans Pop <elendil@planet.nl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-24 00:32:30 -07:00
Bartlomiej Zolnierkiewicz ffc36c7610 ide: fix handling of unexpected IRQs vs request_irq()
Add ide_host_enable_irqs() helper and use it in ide_host_register()
before registering ports.  Then remove no longer needed IRQ unmasking
from in init_irq().

This should fix the problem with "screaming" shared IRQ on the first
port (after request_irq() call while we have the unexpected IRQ pending
on the second port) which was uncovered by my rework of the serialized
interfaces support.

Reported-by: Frans Pop <elendil@planet.nl>
Tested-by: Frans Pop <elendil@planet.nl>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-24 00:32:30 -07:00
Ooiwa Naohiro 7959ea254e bnx2: Fix the behavior of ethtool when ONBOOT=no
I found a little bug.

When configure in ifcfg-eth* is ONBOOT=no,
the behavior of ethtool command is wrong.

    # grep ONBOOT /etc/sysconfig/network-scripts/ifcfg-eth2
    ONBOOT=no
    # ethtool eth2 | tail -n1
            Link detected: yes

I think "Link detected" should be "no".

Signed-off-by: Ooiwa Naohiro <nooiwa@miraclelinux.com>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-24 00:19:06 -07:00
Huang Weiyi 8b169b5f1f drm: remove unused #include <linux/version.h>'s
Remove unused #include <linux/version.h>('s) in
 drivers/gpu/drm/ttm/ttm_bo_util.c
 drivers/gpu/drm/ttm/ttm_bo_vm.c
 drivers/gpu/drm/ttm/ttm_tt.c

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-06-24 16:31:50 +10:00
Dave Airlie 5b6345be1b Merge remote branch 'origin/drm-intel-next' of ../drm-intel into drm-fixes 2009-06-24 16:20:19 +10:00
Jerome Glisse 176f613e60 drm/radeon: fix driver initialization order so radeon kms can be builtin
TTM need to be initialized before radeon if KMS is enabled otherwise
the kernel will crash hard.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2009-06-24 16:11:06 +10:00
Michel Dänzer e14cbee401 drm: Fix shifts which were miscalculated when converting from bitfields.
Looks like I managed to mess up most shifts when converting from bitfields. :(

The patch below works on my Thinkpad T500 (as well as on my PowerBook,
where the previous change worked as well, maybe out of luck...). I'd
appreciate more testing and eyes looking over it though.

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Tested-by: Michael Pyne <mpyne@kde.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2009-06-24 16:11:04 +10:00
Michel Dänzer b1e3a6d1c4 drm/radeon: Clear surface registers at initialization time.
Some PowerMac firmwares set up a tiling surface at the beginning of VRAM
which messes us up otherwise.

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2009-06-24 16:10:56 +10:00
Michel Dänzer 696d4df1db drm/radeon: Don't initialize acceleration related fields of struct fb_info.
Might lure userspace into trying silly things otherwise.

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2009-06-24 16:09:52 +10:00
Jerome Glisse f92e93eb5f drm/radeon: fix radeon kms framebuffer device
smem.start is a physical address which kernel can remap to access
video memory of the fb buffer. We now pin the fb buffer into vram
by doing so we are loosing vram but fbdev need to be reworked to
allow change in framebuffer address.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2009-06-24 16:09:41 +10:00
Corentin Chary 21ab01e2fc asus-laptop: remove EXPERIMENTAL dependency
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
2009-06-24 01:34:00 -04:00
Corentin Chary 2fcc23da55 asus-laptop: use pr_fmt and pr_<level>
Convert the unusual printk(ASUS_<level> uses to
the more standard pr_fmt and pr_<level>(.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
2009-06-24 01:31:38 -04:00
Corentin Chary b31d0fde89 eeepc-laptop: cpufv updates
Limit cpufv input to acceptables values.
Add an available_cpufv file to show available
presets.
Change cpufv ouput format from %d to %#x, it won't
break compatibility with existing userspace tools, but
it provide a more human readable output.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
2009-06-24 01:31:21 -04:00
Corentin Chary b7b700d4a4 eeepc-laptop: sync eeepc-laptop with asus_acpi
In the default Eee PC distribution, there is a modified
asus_acpi driver. eeepc-laptop is a cleaned version of this
driver. Sync ASL enum and getter/setters with asus_acpi.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
2009-06-24 01:31:10 -04:00
Corentin Chary 6122af3743 asus_acpi: Deprecate in favor of asus-laptop
asus-laptop have been merged in the kernel two years ago,
it is now stable and used by most distribution instead of
the old asus_acpi driver.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
2009-06-24 01:31:02 -04:00
Corentin Chary 76593d6fb0 acpi4asus: update MAINTAINER and KConfig links
The bug tracker have moved from sourceforge to
http://dev.iksaif.net . The homepage of the project
is now http://acpi4asus.sf.net with links to the new
bug tracker. No change for the mailing list.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
2009-06-24 01:30:55 -04:00
Corentin Chary 116bf2e010 asus-laptop: platform dev as parent for led and backlight
Makes asus-laptop platform device the parent device of
backlight and led classes.

With this patch, leds and backlight are also available in
/sys/devices/platform/asus-laptop/ like thinkpad_acpi.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
2009-06-24 01:30:47 -04:00
Pekka Enberg cede2cb6ee eeepc-laptop: enable camera by default
If we leave the camera disabled by default, userspace programs (e.g.
Skype, Cheese) leave the user out in the cold saying that the machine
"has no camera." Therefore, it's better to enable camera by default and
let people who really don't want it just disable the thing.

To reduce power usage you should enable USB autosuspend:
echo -n auto > /sys/bus/usb/drivers/uvcvideo/*:*/../power/level

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
2009-06-24 01:30:34 -04:00
Len Brown 57599cc997 Merge branch 'bjorn-notify' into release
Conflicts:
	drivers/platform/x86/eeepc-laptop.c

Signed-off-by: Len Brown <len.brown@intel.com>
2009-06-24 01:22:20 -04:00
Len Brown fbe8cddd2d Merge branches 'acerhdf', 'acpi-pci-bind', 'bjorn-pci-root', 'bugzilla-12904', 'bugzilla-13121', 'bugzilla-13396', 'bugzilla-13533', 'bugzilla-13612', 'c3_lock', 'hid-cleanups', 'misc-2.6.31', 'pdc-leak-fix', 'pnpacpi', 'power_nocheck', 'thinkpad_acpi', 'video' and 'wmi' into release 2009-06-24 01:19:50 -04:00
Zhao Yakui 7a04b8491a ACPI: Rename ACPI processor device bus ID
Some BIOS re-use the same processor bus id
in different scope:

	\_SB.SCK0.CPU0
	\_SB.SCK1.CPU0

But the (deprecated) /proc/acpi/ interface
assumes the bus-id's are unique, resulting in an OOPS
when the processor driver is loaded:

WARNING: at fs/proc/generic.c:590 proc_register+0x148/0x180()
Hardware name: Sunrise Ridge
proc_dir_entry 'processor/CPU0' already registered
Call Trace:
 [<ffffffff8023f7ef>] warn_slowpath+0xb1/0xe5
 [<ffffffff8036243b>] ? ida_get_new_above+0x190/0x1b1
 [<ffffffff803625a8>] ? idr_pre_get+0x5f/0x75
 [<ffffffff8030b2f6>] proc_register+0x148/0x180
 [<ffffffff8030b4ff>] proc_mkdir_mode+0x3d/0x52
 [<ffffffff8030b525>] proc_mkdir+0x11/0x13
 [<ffffffffa0014b89>] acpi_processor_start+0x755/0x9bc [processor]

Rename the processor device bus id. And the new bus id will be
generated as the following format:
	CPU+ CPU ID

For example: If the cpu ID is 5, then the bus ID will be "CPU5".
	If the CPU ID is 10, then the bus ID will be "CPUA".

Yes, this will change the directory names seen
in /proc/acpi/processor/* on some systems.
Before this patch, those directory names where
totally arbitrary strings based on the interal AML device strings.

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

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2009-06-24 01:18:04 -04:00
Peter Feuerer e86435eb91 acerhdf: Acer Aspire One fan control
Acerhdf is a driver for Acer Aspire One netbooks. It allows
to access the temperature sensor and to control the fan.

Signed-off-by: Peter Feuerer <peter@piie.net>
Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2009-06-24 00:58:16 -04:00
Zhang Rui 152a4e630f ACPI: video: DMI workaround broken Acer 7720 BIOS enabling display brightness
http://bugzilla.kernel.org/show_bug.cgi?id=13121

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2009-06-23 23:41:31 -04:00
Zhang Rui c8d72a5e76 ACPI: run ACPI device hot removal in kacpi_hotplug_wq
Now that new interface is available,
convert to using it rather than creating a new kernel thread.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2009-06-23 23:39:57 -04:00
Zhao Yakui 86e437f077 ACPI: Add the reference count to avoid unloading ACPI video bus twice
Sometimes both acpi video and i915 driver are compiled as modules.
And there exists the strict dependency between the two drivers.
The acpi video bus will be unloaded in course of unloading the i915 driver.
If we unload the acpi video driver, then the kernel oops will be triggered.

Add the reference count to avoid unloading the ACPI video bus twice.
The reference count should be checked before unregistering the acpi video bus.
If the reference count is already zero, it won't unregister it again.
And after the acpi video bus is already unregistered, the reference count
will be set to zero.

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

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Acked-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2009-06-23 23:38:41 -04:00
Zhang Rui 35a7c64fbc ACPI: DMI to disable Vista compatibility on some Sony laptops
Linux claims Vista compatibility to the BIOS for a number of
reasons, but this brings hard lockup on some Sony laptops.

Disable Vista compatibility via DMI for these laptops unless
we can figure out what Vista is doing for this platform.
http://bugzilla.kernel.org/show_bug.cgi?id=12904

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2009-06-23 23:32:47 -04:00
Zhang Rui c02256be79 ACPI: fix a deadlock in hotplug case
we used to run the hotplug code in keventd_wq.
But when hot removing the ACPI battery device,
power_supply_unregister invokes flush_scheduled_work.
This causes a deadlock. i.e
1. When dock is unplugged, all the hotplug code is run on kevent_wq.
2. the hotplug code removes all the child devices of dock device.
3. removing the child device may invoke flush_scheduled_work
4. flush_scheduled_work waits until all the work on kevent_wq to be
   finished, while this will never be true because the hotplug code
   is running on keventd_wq...

Introduce a new workqueue for hotplug in this patch.
http://bugzilla.kernel.org/show_bug.cgi?id=13533

Tested-by: Paul Martin <pm@debian.org>
Tested-by: Vojtech Gondzala <vojtech.gondzala@gmail.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2009-06-23 23:23:14 -04:00
Zhang Rui 056c308d3e Show the physical device node of backlight class device.
Create symbol link from backlight class device to ACPI video device.

More and more laptops are shipped with multiple ACPI
video devices, while we export only one of them to userspace.

With this patch applied, we can know which ACPI video device
is used by "cat /sys/class/backlight/acpi_video0/device/path".

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2009-06-23 23:19:13 -04:00
Linus Torvalds be98eb2c2f Merge git://git.infradead.org/iommu-2.6
* git://git.infradead.org/iommu-2.6:
  Intel-IOMMU, intr-remap: source-id checking
  Intel-IOMMU, intr-remap: set the whole 128bits of irte when modify/free it
  IOMMU Identity Mapping Support (drivers/pci/intel_iommu.c)
2009-06-23 19:49:24 -07:00
Linus Torvalds 7b58fc2184 Merge branch 'next-i2c' of git://aeryn.fluff.org.uk/bjdooks/linux
* 'next-i2c' of git://aeryn.fluff.org.uk/bjdooks/linux:
  i2c: driver for the Synopsys DesignWare I2C controller
2009-06-23 19:35:42 -07:00
Ron Mercer 0f77ca928b qla3xxx: Don't sleep while holding lock.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-23 16:36:27 -07:00
Ron Mercer e5a673742e qla3xxx: Give the PHY time to come out of reset.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-23 16:36:26 -07:00
Baruch Siach 1ab52cf910 i2c: driver for the Synopsys DesignWare I2C controller
The i2c Linux driver for the DesignWare i2c block of Synopsys, which is meant
for AMBA Peripheral Bus. This i2c block is used on SoC chips like the ARM9
based PVG610.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-06-24 00:18:56 +01:00
Weidong Han f007e99c8e Intel-IOMMU, intr-remap: source-id checking
To support domain-isolation usages, the platform hardware must be
capable of uniquely identifying the requestor (source-id) for each
interrupt message. Without source-id checking for interrupt remapping
, a rouge guest/VM with assigned devices can launch interrupt attacks
to bring down anothe guest/VM or the VMM itself.

This patch adds source-id checking for interrupt remapping, and then
really isolates interrupts for guests/VMs with assigned devices.

Because PCI subsystem is not initialized yet when set up IOAPIC
entries, use read_pci_config_byte to access PCI config space directly.

Signed-off-by: Weidong Han <weidong.han@intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2009-06-23 22:09:17 +01:00
Weidong Han c4658b4e77 Intel-IOMMU, intr-remap: set the whole 128bits of irte when modify/free it
Interrupt remapping table entry is 128bits. Currently, it only sets low
64bits of irte in modify_irte and free_irte. This ignores high 64bits
setting of irte, that means source-id setting will be ignored. This patch
sets the whole 128bits of irte when modify/free it. Following source-id
checking patch depends on this.

Signed-off-by: Weidong Han <weidong.han@intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2009-06-23 22:09:15 +01:00
Fenghua Yu 2c2e2c389d IOMMU Identity Mapping Support (drivers/pci/intel_iommu.c)
Identity mapping for IOMMU defines a single domain to 1:1 map all PCI
devices to all usable memory.

This reduces map/unmap overhead in DMA API's and improve IOMMU
performance. On 10Gb network cards, Netperf shows no performance
degradation compared to non-IOMMU performance.

This method may lose some of DMA remapping benefits like isolation.

The patch sets up identity mapping for all PCI devices to all usable
memory. In the DMA API, there is no overhead to maintain page tables,
invalidate iotlb, flush cache etc.

32 bit DMA devices don't use identity mapping domain, in order to access
memory beyond 4GiB.

When kernel option iommu=pt, pass through is first tried. If pass
through succeeds, IOMMU goes to pass through. If pass through is not
supported in hw or fail for whatever reason, IOMMU goes to identity
mapping.

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2009-06-23 22:07:54 +01:00
Mikael Pettersson 4e8a2372f9 nvidiafb: fix boot-time printk string
On bootup nvidiafb prints the following on my Apple G5:

	nvidiafb: CRTC 1appears to have a CRT attached

There should be a space between the '1' and the 'appears'.  Add it.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-23 12:50:05 -07:00
Aviv Laufer 1d469c6c38 backlight: Fix tdo24m crash on kmalloc
There is  a crash in tdo24m module caused by a call to kmalloc with
the second parameter sizeof(flag) instead of flag.

Signed-off-by: Aviv Laufer <aviv.laufer@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-06-23 20:32:58 +01:00
Trent Piepho ed88bae691 leds: Add options to have GPIO LEDs start on or keep their state
There already is a "default-on" trigger but there are problems with it.

For one, it's a inefficient way to do it and requires led trigger support
to be compiled in.

But the real reason is that is produces a glitch on the LED.  The GPIO is
allocate with the LED *off*, then *later* when the trigger runs it is
turned back on.  If the LED was already on via the GPIO's reset default or
action of the firmware, this produces a glitch where the LED goes from on
to off to on.  While normally this is fast enough that it wouldn't be
noticeable to a human observer, there are still serious problems.

One is that there may be something else on the GPIO line, like a hardware
alarm or watchdog, that is fast enough to notice the glitch.

Another is that the kernel may panic before the LED is turned back on, thus
hanging with the LED in the wrong state.  This is not just speculation, but
actually happened to me with an embedded system that has an LED which
should turn off when the kernel finishes booting, which was left in the
incorrect state due to a bug in the OF LED binding code.

We also let GPIO LEDs get their initial value from whatever the current
state of the GPIO line is.  On some systems the LEDs are put into some
state by the firmware or hardware before Linux boots, and it is desired to
have them keep this state which is otherwise unknown to Linux.

This requires that the underlying GPIO driver support reading the value of
output GPIOs.  Some drivers support this and some do not.

The platform device binding gains a field in the platform data
"default_state" that controls this.  There are three constants defined to
select from on, off, or keeping the current state.  The OpenFirmware
binding uses a property named "default-state" that can be set to "on",
"off", or "keep".  The default if the property isn't present is off.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Sean MacLennan <smaclennan@pikatech.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-06-23 20:21:39 +01:00
Antonio Ospite 5054d39e32 leds: LED driver for National Semiconductor LP3944 Funlight Chip
LEDs driver for National Semiconductor LP3944 Funlight Chip
http://www.national.com/pf/LP/LP3944.html

This helper chip can drive up to 8 leds, with two programmable DIM
modes; it could even be used as a gpio expander but this driver assumes
it is used as a led controller.

The DIM modes are used to set _blink_ patterns for leds, the pattern is
specified supplying two parameters:
  - period: from 0s to 1.6s
  - duty cycle: percentage of the period the led is on, from 0 to 100

LP3944 can be found on Motorola A910 smartphone, where it drives the rgb
leds, the camera flash light and the displays backlights.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-06-23 20:21:38 +01:00
Antonio Ospite 07172d2bfa leds: pca9532 - Indent using tabs, not spaces.
Indent using tabs, not spaces.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Acked-by: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-06-23 20:21:20 +01:00
Richard Purdie 34abdf2526 leds: Remove an orphan Kconfig entry
Remove an orphan Kconfig entry (LEDS_LP5521)

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-06-23 20:20:36 +01:00
Tobias Mueller 2216c6e83c leds: alix-leds2 fixed for Award BIOS
Add initialisation of GPIO ports for compatibility with boards with Award
BIOS (e.g.  ALIX.3D3).

Signed-off-by: Tobias Mueller <Tobias_Mueller@twam.info>
Reviewed-by: Constantin Baranov <const@mimas.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-06-23 20:20:34 +01:00
Zhenwen Xu 7fd02170e2 leds: leds-gpio - fix a section mismatch
WARNING: drivers/leds/leds-gpio.o(.text+0x153): Section mismatch in reference from the function gpio_led_probe() to the function .devinit.text:create_gpio_led()

The function gpio_led_probe() references the function __devinit
create_gpio_led().  This is often because gpio_led_probe lacks a __devinit
annotation or the annotation of create_gpio_led is wrong.

Signed-off-by: Zhenwen Xu <helight.xu@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-06-23 20:20:11 +01:00
Kim Kyuwon 8792f7cf43 leds: add the sysfs interface into the leds-bd2802 driver for changing wave pattern and led current.
Allow the user application to change the wave pattern and led current by
'wave_pattern' and 'rgb_current' sysfs files.

Signed-off-by: Kim Kyuwon <q1.kim@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-06-23 20:19:10 +01:00
Kim Kyuwon 1b18cf413f leds: change the license information
Change the license to 'GPL v2'

Signed-off-by: Kim Kyuwon <q1.kim@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-06-23 20:19:10 +01:00
Kim Kyuwon b838901821 leds: fix led-bd2802 errors while resuming
LED_CORE_SUSPENDRESUME flag is not needed in the bd2802 driver, because
all works for suspend/resume is done in bd2802_suspend and bd2802_suspend
functions.  And this patch allows bd2802 to be configured again when it
resumes from suspend.

Signed-off-by: Kim Kyuwon <q1.kim@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-06-23 20:19:10 +01:00
Linus Torvalds 32708e8e95 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  RDMA: Add __init/__exit macros to addr.c and cma.c
  IB/ehca: Bump version number
  mlx4_core: Fix dma_sync_single_for_cpu() with matching for_device() calls
  IB/mthca: Replace dma_sync_single() use with proper functions
  RDMA/nes: Fix FIN state handling under error conditions
  RDMA/nes: Fix max_qp_init_rd_atom returned from query device
  IB/ehca: Ensure that guid_entry index is not negative
  IB/ehca: Tolerate dynamic memory operations before driver load
2009-06-23 11:36:01 -07:00
Linus Torvalds f5bcf5f447 Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (38 commits)
  fusion: mptsas, fix lock imbalance
  [SCSI] scsi_transport_fc: replace BUS_ID_SIZE by fixed count
  sd, sr: fix Driver 'sd' needs updating message
  scsi_transport_iscsi: return -EOVERFLOW for Too many iscsi targets
  fc_transport: Selective return value from BSG timeout function
  fc_transport: The softirq_done function registration for BSG request
  sym53c8xx: ratelimit parity errors
  explain the hidden scsi_wait_scan Kconfig variable
  ibmvfc: Fix endless PRLI loop in discovery
  ibmvfc: Process async events before command responses
  libfc: Add runtime debugging with debug_logging module parameter
  libfcoe: Add runtime debugging with module param debug_logging
  fcoe: Add runtime debug logging with module parameter debug_logging
  scsi_debug: Add support for physical block exponent and alignment
  cnic: add NETDEV_1000 and NETDEVICES to Kconfig select
  cnic: Fix __symbol_get() build error.
  Revert "[SCSI] cnic: fix error: implicit declaration of function ‘__symbol_get’"
  ipr: differentiate pci-x and pci-e based adapters
  ipr: add test for MSI interrupt support
  scsi_transport_spi: Blacklist Ultrium-3 tape for IU transfers
  ...
2009-06-23 11:35:37 -07:00
Linus Torvalds cf9c1b92ae Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  [WATCHDOG] wdt_pci.c: remove #ifdef CONFIG_WDT_501_PCI
  [WATCHDOG] hpwdt: Add NMI priority option
  [WATCHDOG] OMAP fixes: enable clock in probe, trigger timer reload
  [WATCHDOG] add bcm47xx watchdog driver
  [WATCHDOG] Freescale STMP: watchdog driver
  [WATCHDOG] twl4030 watchdog driver
  [WATCHDOG] U300 COH 901 327 watchdog driver
  [WATCHDOG] Add pnx833x_wdt
2009-06-23 10:41:17 -07:00
Linus Torvalds 135aae340d Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (62 commits)
  V4L/DVB (12131): BUGFIX: An incorrect Carrier Recovery Loop optimization table was being
  V4L/DVB (12130): Fix a redundant compiler warning
  V4L/DVB (12003): v4l2: Move bounding code outside I2C ifdef block
  V4L/DVB (11913): cx231xx: TRY_FMT should not actually set anything
  V4L/DVB (11912): em28xx: Use v4l bounding/alignment function
  V4L/DVB (11911): cx231xx: Use v4l bounding/alignment function
  V4L/DVB (11910): mt9: Use v4l bounding/alignment function
  V4L/DVB (11909): cx23885: Use v4l bounding/alignment function
  V4L/DVB (11908): w8968cf: Use v4l bounding/alignment function
  V4L/DVB (11907): cx88: Use v4l bounding/alignment function
  V4L/DVB (11906): saa7134: Use v4l bounding/alignment function
  V4L/DVB (11905): vivi: Use v4l bounding/alignment function
  V4L/DVB (11904): zoran: Use v4l bounding/alignment functiob
  V4L/DVB (11903): sh_mobile_ceu_camera: Use v4l bounding/alignment function
  V4L/DVB (11902): pxa-camera: Use v4l bounding/alignment function
  V4L/DVB (11901): v4l2: Create helper function for bounding and aligning images
  V4L/DVB (12128): v4l2: update framework documentation.
  V4L/DVB (12125): v4l2: add new s_config subdev ops and v4l2_i2c_new_subdev_cfg/board calls
  V4L/DVB (12122): pvrusb2: De-obfuscate code which handles routing schemes
  V4L/DVB (12121): pvrusb2: Improve handling of routing schemes
  ...
2009-06-23 10:40:19 -07:00
Linus Torvalds 811e42cfba Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  libata: don't set IORDY for reset
  sata_fsl: Add power mgmt support
  [libata] PATA driver for CF interface on AT91SAM9260 SoC
  [libata] beautify module parameters
2009-06-23 10:39:36 -07:00
Linus Torvalds 4843a3baf2 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6:
  ide cmd64x: Remove serialize setting.
  ide: Take over as maintainer.
2009-06-23 10:39:00 -07:00
Roland Dreier 4a7eca824c Merge branches 'ehca', 'misc', 'mlx4', 'mthca' and 'nes' into for-linus 2009-06-23 10:38:47 -07:00
Peter Huewe 716abb1fdf RDMA: Add __init/__exit macros to addr.c and cma.c
Add __init and __exit annotations to the module_init/module_exit
functions from drivers/infiniband/core/addr.c and cma.c.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Acked-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2009-06-23 10:38:42 -07:00
Alexander Schmidt 1d4d6da535 IB/ehca: Bump version number
Increment version number for DMEM toleration.

Signed-off-by: Alexander Schmidt <alexs@linux.vnet.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2009-06-23 10:30:04 -07:00
Grégoire Henry b5aa8a0fc1 drm/i915: initialize fence registers to zero when loading GEM
Unitialized fence register could leads to corrupted display. Problem
encountered on MacBooks (revision 1 and 2), directly booting from EFI
or through BIOS emulation.

(bug #21710 at freedestop.org)

Signed-off-by: Grégoire Henry <henry@pps.jussieu.fr>
Signed-off-by: Eric Anholt <eric@anholt.net>
2009-06-23 09:22:11 -07:00
Heiko Carstens 0cf08dcb78 net: let KS8842 driver depend on HAS_IOMEM
Fixes this compile error on s390:

  CC      drivers/net/ks8842.o
drivers/net/ks8842.c: In function 'ks8842_select_bank':
drivers/net/ks8842.c:124: error: implicit declaration of function 'iowrite16'
drivers/net/ks8842.c: In function 'ks8842_write8':
drivers/net/ks8842.c:131: error: implicit declaration of function 'iowrite8'

Cc: Richard Rojfors <richard.rojfors.ext@mocean-labs.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-23 04:16:44 -07:00
Heiko Carstens fec37ab56f can: let SJA1000 driver depend on HAS_IOMEM
Fixes this compile error on s390:

drivers/net/can/sja1000/sja1000_platform.c: In function 'sp_read_reg':
drivers/net/can/sja1000/sja1000_platform.c:42: error: implicit declaration of function 'ioread8'
drivers/net/can/sja1000/sja1000_platform.c: In function 'sp_write_reg':
drivers/net/can/sja1000/sja1000_platform.c:47: error: implicit declaration of function 'iowrite8'
drivers/net/can/sja1000/sja1000_platform.c: In function 'sp_probe':
drivers/net/can/sja1000/sja1000_platform.c:79: error: implicit declaration of function 'ioremap_nocache'

Cc: Wolfgang Grandegger <wg@grandegger.com>
Cc: Oliver Hartkopp <oliver.hartkopp@volkswagen.de>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-23 04:16:44 -07:00
Dhananjay Phadke 96f2ebd2e1 netxen: fix firmware init handshake
Make sure all functions run firmware init handshake.

If PCI function 0 fails to initialize firmware, mark the
state failed so that other functions on the same board
bail out quickly instead of waiting 30s for firmware
handshake.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-23 04:16:43 -07:00
Dhananjay Phadke 01542cd1bb netxen: fix build with without CONFIG_PM
wrap pci suspend() and resume() with CONFIG_PM check.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-23 04:16:42 -07:00
Wim Van Sebroeck 9b901ee0cb [WATCHDOG] wdt_pci.c: remove #ifdef CONFIG_WDT_501_PCI
Change the wdt_pci.c watchdog driver so that the code is the same for
both the PCI-WDT500 as the PCI-WDT501 card. The selection of the card
is now being done via the module parameter: 'type' instead of the
config option CONFIG_WDT_501_PCI.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2009-06-23 07:13:52 +00:00
Tom Mingarelli 44df75353b [WATCHDOG] hpwdt: Add NMI priority option
Add a priority option so that the user can choose if we do the NMI
first or last.

Signed-off-by: Thomas Mingarelli <thomas.mingarelli@hp.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2009-06-23 07:13:45 +00:00
Ulrik Bech Hald 789cd4702b [WATCHDOG] OMAP fixes: enable clock in probe, trigger timer reload
This patch contains two fixes:

1)In omap_wdt_probe() the watchdog is reset and disabled. This
requires register access and the clks needs to be enabled temporarily

2)In omap_wdt_open() the timer register needs to be reloaded
to trigger a new timer value (the default of 60s)

Tested on OMAP34xx platform (Zoom1)

Reviewed-by: Kevin Hilman <khilman@ti.deeprootsystems.com>
Signed-off-by: Ulrik Bech Hald <ubh@ti.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2009-06-23 07:13:36 +00:00
Manu Abraham eebf8d86ac V4L/DVB (12131): BUGFIX: An incorrect Carrier Recovery Loop optimization table was being
loaded for a given chip version. This would cause the optimization in
tuning not to be applied and thus a failed expectation, in tuning speed
increment. The patch swaps the tables in use. It also fixes a possible
one in a million condition where state->dev_ver implies an older Cut
(Cut < 2.0, eventhough the driver doesn't attach to any Cut older than
2.0) or even negative (due to a bad I2C bus master driver) for the card
combination.

Thanks to Mauro Carvalho Chehab <mchehab@infradead.org> for pointing
out the issue at large.

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-23 03:29:57 -03:00
Manu Abraham 0a5ded56fd V4L/DVB (12130): Fix a redundant compiler warning
drivers/media/dvb/frontends/stv090x.c: In function ‘stv090x_optimize_carloop_short’:
drivers/media/dvb/frontends/stv090x.c:2677: warning: ‘short_crl’ may be used uninitialized in this function

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-23 03:29:50 -03:00
Trent Piepho d8b2996607 V4L/DVB (12003): v4l2: Move bounding code outside I2C ifdef block
On Fri, 12 Jun 2009, Randy Dunlap wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
>
> Move v4l_bound_align_image() outside of an #ifdef CONFIG_I2C block
> so that it is always built.  Fixes a build error:

clamp_align() should be moved as well, since it's only used by
v4l_bound_align_image().  I'm attaching an alternate version that fixes
this.  Labeled the endif too.

Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-23 03:21:20 -03:00
Trent Piepho 1ca27379f3 V4L/DVB (11913): cx231xx: TRY_FMT should not actually set anything
In the TRY_FMT handler the function get_scale() is called to find what the
scaler hardware will produce for a requested size.

The problem is that get_scale(struct cx231xx *dev, ..., unsigned int *vscale,
unsigned int *hscale) saves the calculated scale values into both the
pointer arguments and into dev's hscale and vscale fields.  TRY_FMT shouldn't
actually change anything in the device state.

The code to in get_scale() that writes to dev->[hv]scale can just be
deleted.  In all cases when dev's fields should be modified, get_scale()
was called with get_scale(dev, ..., &dev->hscale, &dev->vscale), so dev was
getting updated anyway.

This didn't actually cause a problem because nothing ever actually made use
of the hscale and vscale fields.  I changed cx231xx_resolution_set() to use
those fields rather than re-calculate them with a call to get_scale().

Updating [hv]scale in cx231xx_resolution_set() isn't necessary because
every call of cx231xx_resolution_set() was already preceded by a call to
get_scale() or setting the [hv]scale fields, so they will be always be
up-to-date w.r.t. width and height.

Removing the call to get_scale() from cx231xx_resolution_set() allowed
making get_scale() a static function, which is a good thing for something
with such a short name.  There is already another function with the same
name in the em28xx driver, but that one is static.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-23 03:21:20 -03:00
Trent Piepho ccb83408b2 V4L/DVB (11912): em28xx: Use v4l bounding/alignment function
The v4l function has a better algorithm for aligning image size.

It appears that the em2800 can only scale by 50% or 100%, i.e. the only
heights supported might be 240 and 480.  In that case the old code would
set any height other than 240 to 480.  Request 240 get 240, but request 239
and then you get 480.  Change it to round to the nearest supported value.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-23 03:21:19 -03:00
Trent Piepho 9bd0e8d7d1 V4L/DVB (11911): cx231xx: Use v4l bounding/alignment function
The v4l function has a better algorithm for aligning image size.

Cc: Srinivasa Deevi <srinivasa.deevi@conexant.com>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-23 03:21:19 -03:00
Trent Piepho 653dc59b64 V4L/DVB (11910): mt9: Use v4l bounding/alignment function
The v4l function has a better algorithm for aligning image size.

Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-23 03:21:19 -03:00
Trent Piepho 2449afcbcc V4L/DVB (11909): cx23885: Use v4l bounding/alignment function
The v4l function has a better algorithm for aligning image size.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-23 03:21:19 -03:00
Trent Piepho 1c657a99fd V4L/DVB (11908): w8968cf: Use v4l bounding/alignment function
The v4l function has a better algorithm for aligning image size.

The existing code was casting pointers to u32 and to unsigned int into
pointers to u16.  This could mess up if someone passed in an image size
greater than 65,535 and on big-endian platforms it won't work at all.

The existing bounding code would shrink an image if it was too big, but
returned ERANGE if it was too small.  The code will not shrink or expand as
necessary.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-23 03:21:19 -03:00
Trent Piepho 4b89945e59 V4L/DVB (11907): cx88: Use v4l bounding/alignment function
The v4l function has a better algorithm for aligning image size.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-23 03:21:19 -03:00
Trent Piepho bc52d6eb44 V4L/DVB (11906): saa7134: Use v4l bounding/alignment function
The v4l function has a better algorithm for aligning image size.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-23 03:21:18 -03:00
Trent Piepho 3adbbb8e2a V4L/DVB (11905): vivi: Use v4l bounding/alignment function
The v4l function has a better algorithm for aligning image size.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-23 03:21:18 -03:00
Trent Piepho 728f5b93f4 V4L/DVB (11904): zoran: Use v4l bounding/alignment functiob
The v4l function has a better algorithm for aligning image size.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-23 03:21:18 -03:00
Trent Piepho bc44fc061e V4L/DVB (11903): sh_mobile_ceu_camera: Use v4l bounding/alignment function
The v4l function has a better algorithm for aligning image size.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-23 03:21:18 -03:00
Trent Piepho 4a6b8df213 V4L/DVB (11902): pxa-camera: Use v4l bounding/alignment function
The v4l function has a better algorithm for aligning image size.

For instance the old code would change 159x243 into 156x240 to meet the
alignment requirements.  The new function will use 160x243, which is a lot
closer to what was asked for originally.

Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-23 03:21:18 -03:00
Trent Piepho b0d3159be9 V4L/DVB (11901): v4l2: Create helper function for bounding and aligning images
Most hardware has limits on minimum and maximum image dimensions and also
requirements about alignment.  For example, image width must be even or a
multiple of four.  Some hardware has requirements that the total image size
(width * height) be a multiple of some power of two.

v4l_bound_align_image() will enforce min and max width and height, power of
two alignment on width and height, and power of two alignment on total
image size.

It uses an efficient algorithm that will try to find the "closest" image
size that meets the requirements.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-23 03:21:18 -03:00