16 Jun, 2011
6 commits
-
Commit 4440673a95e6 ("leds: provide helper to register "leds-gpio"
devices") broke the display of the NEW_LEDS menu as it didn't depend on
NEW_LEDS and so made "LED drivers" and "LED Triggers" appear at the same
level as "LED Support" instead of below it as it was before 4440673a.Moving LEDS_GPIO_REGISTER out of the menuconfig NEW_LEDS fixes this
unintended side effect.Reported-by: Axel Lin
Signed-off-by: Uwe Kleine-König
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
We call led_classdev_unregister/led_classdev_register in
asic3_led_remove/asic3_led_probe, thus make LEDS_ASIC3 depend on
LEDS_CLASS.This patch fixes below build error if LEDS_CLASS is not configured.
LD .tmp_vmlinux1
drivers/built-in.o: In function `asic3_led_remove':
clkdev.c:(.devexit.text+0x1860): undefined reference to `led_classdev_unregister'
drivers/built-in.o: In function `asic3_led_probe':
clkdev.c:(.devinit.text+0xcee8): undefined reference to `led_classdev_register'
make: *** [.tmp_vmlinux1] Error 1Signed-off-by: Axel Lin
Cc: Paul Parsons
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Fix the wrong `if' condition for the check if the requested timer is
available.The bitmap avail is used to store if a timer is used already. test_bit()
is used to check if the requested timer is available. If a bit in the
avail bitmap is set it means that the timer is available.The runtime effect would be that allocating a specific timer always fails
(versus telling cs5535_mfgpt_alloc_timer to allocate the first available
timer, which works).Signed-off-by: Christian Gmeiner
Acked-by: Andres Salomon
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
In the case of goto err_kzalloc, we should kfree target.
Signed-off-by: Axel Lin
Acked-by: Pratyush Anand
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Cc: Michael Hennerich
Cc: Mike Frysinger
Cc: Matthew Garrett
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Michael Hennerich
Signed-off-by: Mike Frysinger
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
15 Jun, 2011
3 commits
-
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
drm: Compare only lower 32 bits of framebuffer map offsets
drm/i915: Don't leak in i915_gem_shmem_pread_slow()
drm/radeon/kms: do bounds checking for 3D_LOAD_VBPNTR and bump array limit
drm/radeon/kms: fix mac g5 quirk
x86/uv/x2apic: update for change in pci bridge handling.
alpha, drm: Remove obsolete Alpha support in MGA DRM code
alpha/drm: Cleanup Alpha support in DRM generic code
savage: remove unnecessary if statement
drm/radeon: fix GUI idle IH debug statements
drm/radeon/kms: check modes against max pixel clock
drm: fix fbs in DRM_IOCTL_MODE_GETRESOURCES ioctl -
* 'for-linus' of git://neil.brown.name/md:
md/raid5: remove unusual use of bio_iovec_idx()
md/raid5: fix FUA request handling in ops_run_io()
md/raid5: fix raid5_set_bi_hw_segments
md:Documentation/md.txt - fix typo
md/bitmap: remove unused fields from struct bitmap
md/bitmap: use proper accessor macro
md: check ->hot_remove_disk when removing disk
md: Using poll /proc/mdstat can monitor the events of adding a spare disks
MD: use is_power_of_2 macro
MD: raid5 do not set fullsync
MD: support initial bitmap creation in-kernel
MD: add sync_super to mddev_t struct
MD: raid1 changes to allow use by device mapper
MD: move thread wakeups into resume
MD: possible typo
MD: no sync IO while suspended
MD: no integrity register if no gendisk -
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
[CPUFREQ] Remove cpufreq_stats sysfs entries on module unload.
MAINTAINERS: Update CPU FREQUENCY patterns
14 Jun, 2011
14 commits
-
In the bio_for_each_segment loop, bvl always points current
bio_vec, so the same as bio_iovec_idx(, i). Let's get rid of
it.Cc: Dan Williams
Signed-off-by: Namhyung Kim
Signed-off-by: NeilBrown -
Commit e9c7469bb4f5 ("md: implment REQ_FLUSH/FUA support")
introduced R5_WantFUA flag and set rw to WRITE_FUA in that case.
However remaining code still checks whether rw is exactly same
as WRITE or not, so FUAed-write ends up with being treated as
READ. Fix it.This bug has been present since 2.6.37 and the fix is suitable for any
-stable kernel since then. It is not clear why this has not caused
more problems.Cc: Tejun Heo
Cc: stable@kernel.org
Signed-off-by: Namhyung Kim
Signed-off-by: NeilBrown -
The @bio->bi_phys_segments consists of active stripes count in the
lower 16 bits and processed stripes count in the upper 16 bits. So
logical-OR operator should be bitwise one.This bug has been present since 2.6.27 and the fix is suitable for any
-stable kernel since then. Fortunately the bad code is only used on
error paths and is relatively unlikely to be hit.Cc: stable@kernel.org
Signed-off-by: Namhyung Kim
Signed-off-by: NeilBrown -
Drivers using multiple framebuffers got broken by commit
41c2e75e60200a860a74b7c84a6375c105e7437f which ignored the framebuffer
(or register) map offset when looking for existing maps. The rationale
was that the kernel-userspace ABI is fixed at a 32-bit offset, so the
real offsets could not always be handed over for comparison.Instead of ignoring the offset we will compare the lower 32 bit. Drivers
using multiple framebuffers should just make sure that the lower 32 bit
are different. The existing drivers in question are practically limited
to 32-bit systems so that should be fine for them.It is assumed that current drivers always specify a correct framebuffer
map offset, even if this offset was ignored since above commit. So this
patch should not change anything for drivers using only one framebuffer.Drivers needing multiple framebuffers with 64-bit map offsets will need
to cook up something, for instance keeping an ID in the lower bit which
is to be aligned away when it comes to using the offset.All of above applies to _DRM_REGISTERS as well.
Signed-off-by: Tormod Volden
Signed-off-by: Dave Airlie -
It seems to me that we are leaking 'user_pages' in
drivers/gpu/drm/i915/i915_gem.c::i915_gem_shmem_pread_slow() if
read_cache_page_gfp() fails.Signed-off-by: Jesper Juhl
Signed-off-by: Chris Wilson
Signed-off-by: Dave Airlie -
To my knowledge, the limit is 16 on r300.
(the docs don't say what the limit is)The lack of bounds checking can be abused to do all sorts of things
(from bypassing parts of the CS checker to crashing the kernel).Bugzilla:
https://bugs.freedesktop.org/show_bug.cgi?id=36745Cc: stable@kernel.org
Signed-off-by: Marek Olšák
Signed-off-by: Dave Airlie -
Apple uses the same subsystem pci ids for lots of
hardware much of which is wired up differently. In
this case, the G5 imac and the G5 tower.Only apply the quirk configuration to G5 towers.
Reported-by: Joachim Henke
Signed-off-by: Alex Deucher
Cc: Joachim Henke
Cc: Michel Dänzer
Signed-off-by: Dave Airlie -
When I added 3448a19da479b6bd1e28e2a2be9fa16c6a6feb39
I forgot about the special uv handling code for this, so this
patch fixes it up.Acked-by: Jesse Barnes
Acked-by: Ingo Molnar
Signed-off-by: Dave Airlie -
Remove an obsolete Alpha adjustment in the drm for MGA on Alpha.
Signed-off-by: Jay Estabrook
Tested-by: Matt Turner
Signed-off-by: Dave Airlie -
Remove an obsolete Alpha adjustment, and modify another,
to go with the current Alpha architecture support.Signed-off-by: Jay Estabrook
Tested-by: Matt Turner
Signed-off-by: Dave Airlie -
the code always returns ret regardless, so if(ret) check is unnecessary.
v2: fixed up the spelling.
Signed-off-by: Greg Dietsche
Reviewed-by: Nicolas Kaiser
Signed-off-by: Dave Airlie -
…nel/git/tip/linux-2.6-tip
* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
rtc: Staticize non-exported __rtc_set_alarm()
rtc: Fix ioctl error path return
ptp: Fix some locking bugs in ptp_read()
ptp: Return -EFAULT on copy_to_user() errors -
…l/git/tip/linux-2.6-tip
* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
ftrace: Revert 8ab2b7efd ftrace: Remove unnecessary disabling of irqs
kprobes/trace: Fix kprobe selftest for gcc 4.6
ftrace: Fix possible undefined return code
oprofile, dcookies: Fix possible circular locking dependency
oprofile: Fix locking dependency in sync_start()
oprofile: Free potentially owned tasks in case of errors
oprofile, x86: Add comments to IBS LVT offset initialization -
* 'spi/merge' of git://git.secretlab.ca/git/linux-2.6:
spi-pl022: Add missing return value update
13 Jun, 2011
5 commits
-
Return error on out of range cpsdvsr value.
Acked-by: Linus Walleij
Signed-off-by: Virupax Sadashivpetimath
Signed-off-by: Grant Likely -
cpufreq_stats leaves behind its sysfs entries, which causes a panic
when something stumbled across them.
(Discovered by unloading cpufreq_stats while powertop was loaded).Signed-off-by: Dave Jones
Cc: stable@kernel.org -
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6:
ide-cd: signedness warning fix again -
* 'gpio/merge' of git://git.secretlab.ca/git/linux-2.6:
gpio/basic_mmio: add missing include of spinlock_types.h
gpio/nomadik: fix sleepmode for elder Nomadik -
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (55 commits)
ISDN, hfcsusb: Don't leak in hfcsusb_ph_info()
netpoll: call dev_put() on error in netpoll_setup()
net: ep93xx_eth: fix DMA API violations
net: ep93xx_eth: drop GFP_DMA from call to dma_alloc_coherent()
net: ep93xx_eth: allocate buffers using kmalloc()
net: ep93xx_eth: pass struct device to DMA API functions
ep93xx: set DMA masks for the ep93xx_eth
vlan: Fix the ingress VLAN_FLAG_REORDER_HDR check
dl2k: EEPROM CRC calculation wrong endianess on bigendian machine
NET: am79c961: fix assembler warnings
NET: am79c961: ensure multicast filter is correctly set at open
NET: am79c961: ensure asm() statements are marked volatile
ethtool.h: fix typos
ep93xx_eth: Update MAINTAINERS
ipv4: Fix packet size calculation for raw IPsec packets in __ip_append_data
netpoll: prevent netpoll setup on slave devices
net: pmtu_expires fixes
gianfar:localized filer table
iwlegacy: fix channel switch locking
mac80211: fix IBSS teardown race
...
12 Jun, 2011
10 commits
-
We leak the memory allocated to 'phi' when the variable goes out of scope
in hfcsusb_ph_info().Signed-off-by: Jesper Juhl
Signed-off-by: David S. Miller -
Russell King said:
>
> So, to summarize what its doing:
>
> 1. It allocates buffers for rx and tx.
> 2. It maps them with dma_map_single().
> This transfers ownership of the buffer to the DMA device.
> 3. In ep93xx_xmit,
> 3a. It copies the data into the buffer with skb_copy_and_csum_dev()
> This violates the DMA buffer ownership rules - the CPU should
> not be writing to this buffer while it is (in principle) owned
> by the DMA device.
> 3b. It then calls dma_sync_single_for_cpu() for the buffer.
> This transfers ownership of the buffer to the CPU, which surely
> is the wrong direction.
> 4. In ep93xx_rx,
> 4a. It calls dma_sync_single_for_cpu() for the buffer.
> This at least transfers the DMA buffer ownership to the CPU
> before the CPU reads the buffer
> 4b. It then uses skb_copy_to_linear_data() to copy the data out.
> At no point does it transfer ownership back to the DMA device.
> 5. When the driver is removed, it dma_unmap_single()'s the buffer.
> This transfers ownership of the buffer to the CPU.
> 6. It frees the buffer.
>
> While it may work on ep93xx, it's not respecting the DMA API rules,
> and with DMA debugging enabled it will probably encounter quite a few
> warnings.This patch fixes these violations.
Signed-off-by: Mika Westerberg
Acked-by: Russell King
Acked-by: H Hartley Sweeten
Tested-by: Petr Stetiar
Signed-off-by: David S. Miller -
Commit a197b59ae6e8 (mm: fail GFP_DMA allocations when ZONE_DMA is not
configured) made page allocator to return NULL if GFP_DMA is set but
CONFIG_ZONE_DMA is disabled.This causes ep93xx_eth to fail:
WARNING: at mm/page_alloc.c:2251 __alloc_pages_nodemask+0x11c/0x638()
Modules linked in:
[] (unwind_backtrace+0x0/0xf4) from [] (warn_slowpath_common+0x48/0x60)
[] (warn_slowpath_common+0x48/0x60) from [] (warn_slowpath_null+0x1c/0x24)
[] (warn_slowpath_null+0x1c/0x24) from [] (__alloc_pages_nodemask+0x11c/0x638)
[] (__alloc_pages_nodemask+0x11c/0x638) from [] (__dma_alloc+0x8c/0x3ec)
[] (__dma_alloc+0x8c/0x3ec) from [] (dma_alloc_coherent+0x54/0x60)
[] (dma_alloc_coherent+0x54/0x60) from [] (ep93xx_open+0x20/0x864)
[] (ep93xx_open+0x20/0x864) from [] (__dev_open+0xb8/0x108)
[] (__dev_open+0xb8/0x108) from [] (__dev_change_flags+0x70/0x128)
[] (__dev_change_flags+0x70/0x128) from [] (dev_change_flags+0x10/0x48)
[] (dev_change_flags+0x10/0x48) from [] (ip_auto_config+0x190/0xf68)
[] (ip_auto_config+0x190/0xf68) from [] (do_one_initcall+0x34/0x18c)
[] (do_one_initcall+0x34/0x18c) from [] (kernel_init+0x94/0x134)
[] (kernel_init+0x94/0x134) from [] (kernel_thread_exit+0x0/0x8)Since there is no restrictions for DMA on ep93xx, we can fix this by just
removing the GFP_DMA flag from the call.Signed-off-by: Mika Westerberg
Acked-by: Russell King
Acked-by: H Hartley Sweeten
Tested-by: Petr Stetiar
Signed-off-by: David S. Miller -
We can use simply kmalloc() to allocate the buffers. This also simplifies the
code and allows us to perform DMA sync operations more easily.Memory is allocated with only GFP_KERNEL since there are no DMA allocation
restrictions on this platform.Signed-off-by: Mika Westerberg
Acked-by: Russell King
Acked-by: H Hartley Sweeten
Tested-by: Petr Stetiar
Signed-off-by: David S. Miller -
We shouldn't use NULL for any DMA API functions, unless we are dealing with
ISA or EISA device. So pass correct struct dev pointer to these functions.Signed-off-by: Mika Westerberg
Signed-off-by: David S. Miller -
Signed-off-by: Daniel Hellstrom
Signed-off-by: David S. Miller -
Fix:
/tmp/ccvoZ6h8.s: Assembler messages:
/tmp/ccvoZ6h8.s:284: Warning: register range not in ascending order
/tmp/ccvoZ6h8.s:881: Warning: register range not in ascending order
/tmp/ccvoZ6h8.s:1087: Warning: register range not in ascending orderby ensuring that we have temporary variables placed into specific
registers. Reorder the code a bit to allow the resulting assembly
to be slightly more optimal.Signed-off-by: Russell King
Signed-off-by: David S. Miller -
We were clearing out the multicast filter whenever the interface was
upped, and not setting the mode bits correctly. This can cause
problems if there are any multicast addresses already set at this
point, or if ALLMULTI was set.Signed-off-by: Russell King
Signed-off-by: David S. Miller -
Without this the compiler can (and does) optimize register reads away
from within loops, and other such optimizations.Signed-off-by: Russell King
Signed-off-by: David S. Miller -
One of the legit warnings 'make W=3 drivers/ide/ide-cd.c'
generates is:
drivers/ide/ide-cd.c: In function ide_cd_do_request
drivers/ide/ide-cd.c:828:2: warning: conversion to int from \
unsigned int may change the sign of the result
drivers/ide/ide-cd.c:833:2: warning: conversion to int from \
unsigned int may change the sign of the resultnsectors is declared int, should be unsigned int.
blk_rq_sectors() returns unsigned int, and ide_complete_rq
expects unsigned int as well. Fixes both warnings.Signed-off-by: Connor Hansen
Signed-off-by: David S. Miller
10 Jun, 2011
2 commits
-
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
libata: fix unexpectedly frozen port after ata_eh_reset() -
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
sparc32, leon: bugfix in LEON SMP interrupt init
sparc32, sun4m: bugfix in SMP IPI traphandler
sparc: Remove unnecessary semicolons
Add support for allocating irqs for bootbus devices
Do not skip interrupt sources in sun4d interrupt handler and acknowledge interrupts correctly
Restructure sun4d_build_device_irq so that timer interrupts can be allocated
sparc: PCIC_PCI needs SPARC32 dependency
sparc: Do not select GENERIC_HARDIRQS_NO_DEPRECATED
sparc32,leon: add GRPCI2 PCI Host driver
sparc32,leon: added LEON-common low-level PCI routines
sparc32: added CONFIG_PCIC_PCI Kconfig setting