Commit Graph

87883 Commits

Author SHA1 Message Date
Mattias Nissler 2ae23854dc rt2x00: Don't use unitialized rxdesc->size
rxdesc->size is unitialized before the desriptor has been read.
Move the truncation of the sk buffer to the moment all variables
have been initialized.

Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:02:34 -04:00
Ivo van Doorn 2d1be5b0d1 rt2x00: Don't use uninitialized desc_len
skbdesc->desc_len is uninitialized at the start
of the function. So it is a _bad_ idea to use it...

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:02:34 -04:00
Mattias Nissler 95db4d4d5f rt2x00: Use the correct size when copying the control info in txdone
The sizeof() operator was incorrectly applied to the pointer, not the struct.

Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:02:34 -04:00
Mattias Nissler 92f5ac6320 rt2x00: Initialize TX control field in data entries
In the TX path, the driver didn't copy the TX control data structure. Thus, it
was invalid in the TX done handler, causing serious trouble and misbehaviour.

Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:02:33 -04:00
Ivo van Doorn f855c10b6e rt2x00: Align RX descriptor to 4 bytes
Some architectures give problems when reading
RX frame descriptor words when the descriptor
is not aligned on a 4 byte boundrary.

Due to optimalizations for the ieee80211 payload
4 byte alignment, it is no longer guarenteed
that the descriptor is placed on the 4 byte
boundrary (In fact, for rt73usb it is absolutely
never aligned to 4 bytes, for rt2500usb it depends
on the length of the payload).

This will copy the descriptor to a 4 byte aligned
location before it is read for the first time.
This will also move the payload data alignment
in rt2x00usb (instead of inside the driver) where
it has always belonged.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:02:33 -04:00
Harvey Harrison 40e024de93 b43: pull out helpers for writing noise table
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:02:33 -04:00
Jussi Kivilinna 461b3f2aa3 rndis_wlan: cleanup, rename structure members
Rename members of ndis_80211_* structures to match the style of
the rest of the code.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:02:33 -04:00
Jussi Kivilinna 1e41e1d277 rndis_wlan: cleanup, rename and reorder enums and structures
Rename enums and structures to ndis_80211_* for greater readability.
Also change order so that enumerations are presented first.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:02:32 -04:00
Joe Perches e9010e2fdf drivers/net/wireless/ath5k - convert == (true|false) to simple logical tests
(test == true) is not nice.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:02:32 -04:00
Holger Schurig 52933d815b libertas: implement SSID scanning for SIOCSIWSCAN
After my bit scan re-writing the SIOCSIWSCAN wext ioctl no longer supported
scanning for a specific SSID. However, wpa_supplicant is a possible user of
this ioctl, so here is code that add's this.

While passing, removed even more of the debugfs-based scanning. You can (and
should) the SIOCSIWSCAN to ask for scans, so there is no need for
proprietary interfaces for scanning. And, besides, the scan result couldn't
be used further, e.g. not for associating.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:02:32 -04:00
Adrian Bunk d9357136ac the scheduled rc80211-simple.c removal
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:02:31 -04:00
Adrian Bunk 7524d7d6de the scheduled ieee80211 softmac removal
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:02:31 -04:00
Adrian Bunk 2079fcdc06 the scheduled bcm43xx removal
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: <Larry.Finger@lwfinger.net>
Cc: <stefano.brivio@polimi.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:01:04 -04:00
Adrian Bunk affe0a0218 make b43_mac_{enable,suspend}() static
b43_mac_{enable,suspend}() can now become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:01:04 -04:00
Ivo van Doorn 1682fe6de2 rt2x00: Add suspend/resume handlers to rt2x00rfkill
Add suspend/resume handlers to rt2x00rfkill to have it stop
the input-polldev and prevent it from calling rt2x00 during
suspend period. This could lead to a NULL pointer fault when
rt2x00 suspended, but polldev send a request, because
the csr_addr is NULL.

Also don't let the rfkill allocation/registration block
the initialization of the entire device. Just print a warning
and continue as if nothing happened.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 15:57:26 -04:00
Pavel Roskin f50e4a8494 ath5k: disable irq handling in ath5k_hw_detach()
Once ah has been freed, it may not be accessed.  Set ATH_STAT_INVALID
bit to make the interrupt handler return IRQ_NONE without accessing ah.

This fixes oops on unload with CONFIG_DEBUG_SHIRQ enabled.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 15:57:25 -04:00
Harvey Harrison 5abdc49d6e b43: phy.c fix typo in register write
Commit 61bca6eb85 b43: rewrite A PHY initialization
has a typo, the result of the register read should be masked, not the
register offset.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 15:57:25 -04:00
Masakazu Mokuno c1e889be18 PS3: gelic: change the prefix of the net interface for wireless
The gelic driver uses two net interfaces, one for ethernet and the
other for wireless. They share same MAC address and use 'eth' prefix
for the name.
As udev uses the MAC address to check uniqueness, this is
somewhat problematic.  So change the prefix of the network interface
name for the wireless so that udev can have an easy way to distinguish
interfaces.

Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 15:57:25 -04:00
Masakazu Mokuno aad4c7d3a6 PS3: gelic: ignore scan info from zero SSID beacons
Some implementations of the hidden SSID APs emit beacons which have the zero
length SSID information element instead of SSID padded by null (\0) characters.
If the firmware of the PS3 wireless hardware meets these beacons, it abandons parsing
IEs. Thus guest OSes get the invalid scan information for the AP.

To work around this, ignore these scan informations from the list.

Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 15:57:25 -04:00
Jan Slupski 43557e15c2 prism54: support for 124a:4025 - another version of IOGear GWU513 802.11g
Add support to p54usb driver for apparently another version of IOGear GWU513
802.11g USB network card that uses GW3887IK chipset and is recognized as
"124a:4025 AirVast" by lsusb.

Cc: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 15:57:22 -04:00
Dan Williams 3280ab3e88 async_tx: checkpatch says s/__FUNCTION__/__func__/g
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2008-03-13 10:57:10 -07:00
Harvey Harrison 3d9b525b69 iop-adma.c: replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2008-03-13 10:57:09 -07:00
Zhang Wei 9c98718e73 fsldma: Add a completed cookie updated action in DMA finish interrupt.
The patch 'fsldma: do not cleanup descriptors in hardirq context'
(commit 222ccf9ab8) removed descriptors
cleanup function to tasklet but the completed cookie do not updated.
Thus, the DMA controller will get lots of duplicated transfer
interrupts. Just make a completed cookie update in interrupt handler.
And keep other cleanup jobs in tasklet function.

Tested-by: Sebastian Siewior <bigeasy@linutronix.de>
Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2008-03-13 10:57:09 -07:00
Zhang Wei 2187c269ad fsldma: Add device_prep_dma_interrupt support to fsldma.c
This is a bug that I assigned DMA_INTERRUPT capability to fsldma
but missing device_prep_dma_interrupt function. For a bug in
dmaengine.c the driver passed BUG_ON() checking. The patch fixes it.

Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2008-03-13 10:57:08 -07:00
Zhang Wei 9b941c6660 dmaengine: Fix a bug about BUG_ON() on DMA engine capability DMA_INTERRUPT.
The device->device_prep_dma_interrupt function is used by
DMA_INTERRUPT capability, not DMA_ZERO_SUM.

Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
Acked-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2008-03-13 10:57:07 -07:00
Zhang Wei 56822843ff fsldma: Fix fsldma.c warning messages when it's compiled under PPC64.
There are warning messages reported by Stephen Rothwell with
ARCH=powerpc allmodconfig build:

drivers/dma/fsldma.c: In function 'fsl_dma_prep_memcpy':
drivers/dma/fsldma.c:439: warning: comparison of distinct pointer types
lacks a cast
drivers/dma/fsldma.c: In function 'fsl_chan_xfer_ld_queue':
drivers/dma/fsldma.c:584: warning: format '%016llx' expects type 'long long
unsigned int', but argument 4 has type 'dma_addr_t'
drivers/dma/fsldma.c: In function 'fsl_dma_chan_do_interrupt':
drivers/dma/fsldma.c:668: warning: format '%x' expects type 'unsigned int',
but argument 5 has type 'dma_addr_t'
drivers/dma/fsldma.c:684: warning: format '%016llx' expects type 'long long
unsigned int', but argument 4 has type 'dma_addr_t'
drivers/dma/fsldma.c:684: warning: format '%016llx' expects type 'long long
unsigned int', but argument 5 has type 'dma_addr_t'
drivers/dma/fsldma.c:701: warning: format '%02x' expects type 'unsigned
int', but argument 4 has type 'dma_addr_t'
drivers/dma/fsldma.c: In function 'fsl_dma_self_test':
drivers/dma/fsldma.c:840: warning: format '%d' expects type 'int', but
argument 5 has type 'size_t'
drivers/dma/fsldma.c: In function 'of_fsl_dma_probe':
drivers/dma/fsldma.c:1010: warning: format '%08x' expects type 'unsigned
int', but argument 5 has type 'resource_size_t'

This patch fixed the above warning messages.

Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2008-03-13 10:57:07 -07:00
Greg Kroah-Hartman cc74d96f47 PCI: fix issue with busses registering multiple times in sysfs
PCI busses can be registered multiple times, so we need to detect if we
have registered our bus structure in sysfs already.  If so, don't do it
again.

Thanks to Guennadi Liakhovetski <g.liakhovetski@gmx.de> for reporting
the problem, and to Linus for poking me to get me to believe that it was
a real problem.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-03-13 10:21:09 -07:00
Len Brown 29ea5171cb Merge branches 'release' and 'doc' into release 2008-03-13 01:59:53 -04:00
Len Brown b4de123a0b Merge branches 'release', 'ejd', 'sony' and 'wmi' into release 2008-03-13 01:59:52 -04:00
Len Brown c523aef0f7 Merge branches 'release', 'button-sysfs', 'misc', 'mismatch', 'randconfig' and 'toshiba' into release 2008-03-13 01:59:49 -04:00
Len Brown 160ff06b18 Merge branches 'release' and 'thermal' into release 2008-03-13 01:59:46 -04:00
Len Brown 1ca721cdb7 Merge branches 'release', 'bugzilla-8570', 'bugzilla-9966', 'bugzilla-9998', 'bugzilla-10100', 'bugzilla-10132', 'bugzilla-10138' and 'bugzilla-10206' into release 2008-03-13 01:59:45 -04:00
Zhang Yanmin f1dd9c379c [NET]: Fix tbench regression in 2.6.25-rc1
Comparing with kernel 2.6.24, tbench result has regression with
2.6.25-rc1.

1) On 2 quad-core processor stoakley: 4%.
2) On 4 quad-core processor tigerton: more than 30%.

bisect located below patch.

b4ce92775c is first bad commit
commit b4ce92775c
Author: Herbert Xu <herbert@gondor.apana.org.au>
Date:   Tue Nov 13 21:33:32 2007 -0800

    [IPV6]: Move nfheader_len into rt6_info

    The dst member nfheader_len is only used by IPv6.  It's also currently
    creating a rather ugly alignment hole in struct dst.  Therefore this patch
    moves it from there into struct rt6_info.

Above patch changes the cache line alignment, especially member
__refcnt. I did a testing by adding 2 unsigned long pading before
lastuse, so the 3 members, lastuse/__refcnt/__use, are moved to next
cache line. The performance is recovered.

I created a patch to rearrange the members in struct dst_entry.

With Eric and Valdis Kletnieks's suggestion, I made finer arrangement.

1) Move tclassid under ops in case CONFIG_NET_CLS_ROUTE=y. So
   sizeof(dst_entry)=200 no matter if CONFIG_NET_CLS_ROUTE=y/n. I
   tested many patches on my 16-core tigerton by moving tclassid to
   different place. It looks like tclassid could also have impact on
   performance.  If moving tclassid before metrics, or just don't move
   tclassid, the performance isn't good. So I move it behind metrics.

2) Add comments before __refcnt.

On 16-core tigerton:

If CONFIG_NET_CLS_ROUTE=y, the result with below patch is about 18%
better than the one without the patch;

If CONFIG_NET_CLS_ROUTE=n, the result with below patch is about 30%
better than the one without the patch.

With 32bit 2.6.25-rc1 on 8-core stoakley, the new patch doesn't
introduce regression.

Thank Eric, Valdis, and David!

Signed-off-by: Zhang Yanmin <yanmin.zhang@intel.com>
Acked-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-12 22:52:37 -07:00
Zhang, Rui 5e012760df ACPI: thermal: show temperature in millidegree Celsius
as now required by the generic thermal I/F

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-03-13 01:49:11 -04:00
Zhang, Rui 3152fb9f11 thermal: fix generic thermal I/F for hwmon
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-03-13 01:49:01 -04:00
Jiri Kosina 07d31ee559 acer-wmi: build depends on i8042
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-03-13 00:23:48 -04:00
Linus Torvalds 93d74463d0 Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm: (26 commits)
  [ARM] 4856/1: Orion: initialise the sixth PCIe MBUS mapping window as well
  [ARM] 4855/1: Orion: use correct ethernet unit address range
  [ARM] 4853/1: include uImage target in make help
  [ARM] 4851/1: ns9xxx: fix size of gpiores
  [ARM] AT91: correct at91sam9263ek LCD power gpio pin
  [ARM] replace remaining __FUNCTION__ occurrences
  [ARM] 4850/1: include generic pgtable.h for !CONFIG_MMU case
  [ARM] 4849/1: move ATAGS asm definitions
  [ARM] 4848/1: at91: remove false lockdep warnings
  [ARM] 4847/1: kprobes: fix compilation with CONFIG_DEBUG_FS=y
  [ARM] include/asm-arm - use angle brackets for includes
  [ARM] 4845/1: Orion: Ignore memory tags with invalid data
  ARM: OMAP2: Register the L4 io bus to boot OMAP2
  ARM: OMAP1: Compile in other 16xx boards to OSK defconfig
  ARM: OMAP1: Refresh H2 defconfig
  ARM: OMAP1: Refresh OSK defconfig
  ARM: OMAP: gpio lockdep updates
  ARM: OMAP1: omap1/pm.c build fix
  ARM: OMAP1: omap h2 regression fix
  ARM: OMAP1: Fix compile for boards depending on old gpio expander
  ...
2008-03-12 17:56:37 -07:00
Linus Torvalds c463be3520 Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (22 commits)
  [POWERPC] Fix large hash table allocation on Cell blades
  [POWERPC] Export empty_zero_page
  [POWERPC] Fix viodasd driver with scatterlist debug
  [POWERPC] Fix arch/powerpc/platforms/powermac/pic.c when !CONFIG_ADB_PMU
  [POWERPC] Fix drivers/macintosh/mediabay.c when !CONFIG_ADB_PMU
  [POWERPC] Fix undefined pmu_sys_suspended compilation error
  [POWERPC] Fix build of modular drivers/macintosh/apm_emu.c
  [POWERPC] Fix sleep on some powerbooks
  [POWERPC] Fix bogus test for unassigned PCI resources
  [POWERPC] Fix zImage-dtb.initrd build error
  [POWERPC] Add __ucmpdi2 for 64-bit comparisons in 32-bit kernels
  [POWERPC] spufs: fix rescheduling of non-runnable contexts
  [POWERPC] spufs: don't (ab)use SCHED_IDLE
  [POWERPC] QE: Make qe_get_firmware_info reentrant
  [POWERPC] 83xx: Make 83xx perfmon support selectable
  [PPC] 8xx: swap bug-fix
  [POWERPC] 85xx: sbc8548 - Fix incorrect PCI-X and PCI interrupt map
  [POWERPC] QE: Fix QE firmware uploading limit
  [POWERPC] 8xx: Fix wrapper platform for adder875, and combine defconfigs.
  [POWERPC] 8xx: fix swap
  ...
2008-03-12 17:00:35 -07:00
Michael Ellerman 31bf111944 [POWERPC] Fix large hash table allocation on Cell blades
My recent hack to allocate the hash table under 1GB on cell was poorly
tested, *cough*. It turns out on blades with large amounts of memory we
fail to allocate the hash table at all. This is because RTAS has been
instantiated just below 768MB, and 0-x MB are used by the kernel,
leaving no areas that are both large enough and also naturally-aligned.

For the cell IOMMU hack the page tables must be under 2GB, so use that
as the limit instead. This has been tested on real hardware and boots
happily.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-03-13 10:10:26 +11:00
Theodore Ts'o 07dc42f632 [POWERPC] Export empty_zero_page
Once again, this time with feeling....

						- Ted

>From c91cfaabc17f8a53807a2f31f067a732e34a1550 Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <tytso@mit.edu>
Date: Wed, 12 Mar 2008 11:50:39 -0400
Subject: Export empty_zero_page

The empty_zero_page symbol is exported by most other architectures
(s390, ia64, x86, um), and an upcoming ext4 patch needs it because
ZERO_PAGE() references empty_zero_page, and we need it to zero out an
unitialized extents in ext4 files.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-03-13 10:09:28 +11:00
Benjamin Herrenschmidt 25c0a7b832 [POWERPC] Fix viodasd driver with scatterlist debug
The iSeries viodasd drivers does some very strange things with
scatterlists, one of these causing a BUG_ON to trigger when
scatterlist debugging is enabled due to initializing the
scatterlist with memset instead of sg_init_table().

This fixes it by using sg_init_table().  The rest of the stuff
it does to that poor list is still pretty awful but it will work.

I may look into fixing things in a nicer way some other time.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-03-13 10:09:28 +11:00
Tony Breeds 98cddbfb32 [POWERPC] Fix arch/powerpc/platforms/powermac/pic.c when !CONFIG_ADB_PMU
When building arch/powerpc/platforms/powermac/pic.c when !CONFIG_ADB_PMU
we get the following warnings:

arch/powerpc/platforms/powermac/pic.c: In function 'pmacpic_find_viaint':
arch/powerpc/platforms/powermac/pic.c:623: warning: label 'not_found' defined but not used

This fixes it.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-03-13 10:09:27 +11:00
Tony Breeds a99d9a6ebd [POWERPC] Fix drivers/macintosh/mediabay.c when !CONFIG_ADB_PMU
When building drivers/macintosh/mediabay.c if CONFIG_ADB_PMU isn't
defined we get:

drivers/built-in.o: In function `media_bay_step':
mediabay.c:(.text+0x92b84): undefined reference to `pmu_suspend'
mediabay.c:(.text+0x92c08): undefined reference to `pmu_resume'

Create empty place holders in that scenario.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-03-13 10:09:27 +11:00
Tony Breeds 07c941d000 [POWERPC] Fix undefined pmu_sys_suspended compilation error
pmu_sys_suspended is declared extern when:
	defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
but only defined when:
	defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32)
which is wrong.  Let's fix that.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-03-13 10:09:27 +11:00
Guido Guenther 620a245978 [POWERPC] Fix build of modular drivers/macintosh/apm_emu.c
Currently, if drivers/macintosh/apm_emu is a module and the config
doesn't have CONFIG_SUSPEND we get:

ERROR: "pmu_batteries" [drivers/macintosh/apm_emu.ko] undefined!
ERROR: "pmu_battery_count" [drivers/macintosh/apm_emu.ko] undefined!
ERROR: "pmu_power_flags" [drivers/macintosh/apm_emu.ko] undefined!

on PPC32.  The variables aren't wrapped in '#if defined(CONFIG_SUSPEND)'
so we probably shouldn't wrap the exports either.  This removes the
CONFIG_SUSPEND part of the export, which fixes compilation on ppc32.

Signed-off-by: Guido Guenther <agx@sigxcpu.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-03-13 10:09:27 +11:00
Benjamin Herrenschmidt fa19d63488 [POWERPC] Fix sleep on some powerbooks
The PMU backlight code would kick in during sleep/resume even on
machines that use a different backlight method.  This breaks
sleep on some PowerBooks.

This fixes it by adding a flag to indicate whether the backlight
is controlled by the PMU, and testing that before trying to use
the PMU to turn off the backlight during sleep.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-03-13 10:09:27 +11:00
Benjamin Herrenschmidt 7f172890a8 [POWERPC] Fix bogus test for unassigned PCI resources
A bogus test for unassigned resources that came from our 32-bit
PCI code ended up being "merged" by my previous patch series,
breaking some 64-bit setups where devices have legal resources
ending at 0xffffffff.

This fixes it by completely changing the test.  We now test for
res->start == 0, as the generic code expects, and we also only
do so on platforms that don't have the PPC_PCI_PROBE_ONLY flag
set, as there are cases of pSeries and iSeries where it could
be a valid value and those can't reassign devices.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-03-13 10:09:27 +11:00
Grant Likely 595be948cc [POWERPC] Fix zImage-dtb.initrd build error
The pattern substitution rules were failing when used with zImage-dtb
targets.  If zImage-dtb.initrd was selected, the pattern substitution
would generate "zImage.initrd-dtb" instead of "zImage-dtb.initrd" which
caused the build to fail.

This renames zImage-dtb to dtbImage to avoid the problem entirely.
By not using the zImage prefix then is no potential for namespace
collisions.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-03-13 10:09:26 +11:00
Paul Mackerras 95ff54f517 [POWERPC] Add __ucmpdi2 for 64-bit comparisons in 32-bit kernels
Some drivers (such as V4L2) have code that causes gcc to generate
calls to __ucmpdi2 when compiling for 32-bit powerpc, which results
in either a link-time error or a module that can't be loaded, as
we don't currently have a __ucmpdi2.  This adds one so these drivers
can be used.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-03-13 09:39:55 +11:00
Randy Dunlap 53471121a8 documentation: Move power-related files to Documentation/power/
Move 00-INDEX entries to power/00-INDEX (and add entry for
pm_qos_interface.txt).

Update references to moved filenames.

Fix some trailing whitespace.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-03-12 18:10:51 -04:00