summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2012-04-25dma: pl330: fix a couple of compilation warningsOlof Johansson
Move a couple of tests and do a minor refactor to avoid: drivers/dma/pl330.c: In function 'pl330_probe': drivers/dma/pl330.c:2929:215: warning: comparison of distinct pointer types lacks a cast [enabled by default] drivers/dma/pl330.c: In function 'pl330_tasklet': drivers/dma/pl330.c:2250:8: warning: 'pch' may be used uninitialized in this function [-Wuninitialized] drivers/dma/pl330.c:2228:25: note: 'pch' was declared here drivers/dma/pl330.c:2277:130: warning: 'pch' may be used uninitialized in this function [-Wuninitialized] drivers/dma/pl330.c:2260:25: note: 'pch' was declared here Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
2012-04-24Merge branches 'mad-response' and 'mlx4' into fixesRoland Dreier
2012-04-24IB/mlx4: Fix memory leaks in ib_link_query_port()Jesper Juhl
If the call to mlx4_MAD_IFC() fails in ib_link_query_port() we will currently do 'return err;' which will leak 'in_mad' and 'out_mad'. We should instead do 'goto out;' where we'll properly free the memory we previously allocated. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Acked-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
2012-04-24IB/mad: Don't send response for failed MADsJack Morgenstein
Commit 0b307043049f ("IB/mad: Return error response for unsupported MADs") does not failed MADs (eg those that return IB_MAD_RESULT_FAILURE) properly -- these MADs should be silently discarded. (We should not force the lower-layer drivers to return SUCCESS | CONSUMED in this case, since the MAD is NOT successful). Unsupported MADs are not failures -- they return SUCCESS, but with an "unsupported error" status value inside the response MAD. Reviewed-by: Hal Rosenstock <hal@mellanox.com> Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Roland Dreier <roland@purestorage.com>
2012-04-24IB/mad: Set 'D' bit in response for unhandled MADsJack Morgenstein
Commit 0b307043049f ("IB/mad: Return error response for unsupported MADs") does not handle directed-route MADs properly -- it fails to set the 'D' bit in the response MAD status field. This is a problem for SmInfo MADs when the receiver does not have an SM running. Reviewed-by: Hal Rosenstock <hal@mellanox.com> Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Roland Dreier <roland@purestorage.com>
2012-04-24USB: EHCI: fix crash during suspend on ASUS computersAlan Stern
This patch (as1545) fixes a problem affecting several ASUS computers: The machine crashes or corrupts memory when going into suspend if the ehci-hcd driver is bound to any controllers. Users have been forced to unbind or unload ehci-hcd before putting their systems to sleep. After extensive testing, it was determined that the machines don't like going into suspend when any EHCI controllers are in the PCI D3 power state. Presumably this is a firmware bug, but there's nothing we can do about it except to avoid putting the controllers in D3 during system sleep. The patch adds a new flag to indicate whether the problem is present, and avoids changing the controller's power state if the flag is set. Runtime suspend is unaffected; this matters only for system suspend. However as a side effect, the controller will not respond to remote wakeup requests while the system is asleep. Hence USB wakeup is not functional -- but of course, this is already true in the current state of affairs. This fixes Bugzilla #42728. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Tested-by: Steven Rostedt <rostedt@goodmis.org> Tested-by: Andrey Rahmatullin <wrar@wrar.name> Tested-by: Oleksij Rempel (fishor) <bug-track@fisher-privat.net> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-24usb gadget: uvc: uvc_request_data::length field must be signedLaurent Pinchart
The field is used to pass the UVC request data length, but can also be used to signal an error when setting it to a negative value. Switch from unsigned int to __s32. Reported-by: Fernandez Gonzalo <gfernandez@copreci.es> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-24staging: octeon-ethernet: fix build errors by including interrupt.hImre Kaloz
This patch fixes the following build failures: drivers/staging/octeon/ethernet.c: In function 'cvm_oct_cleanup_module': drivers/staging/octeon/ethernet.c:799:2: error: implicit declaration of function 'free_irq' drivers/staging/octeon/ethernet-rx.c: In function 'cvm_oct_no_more_work': drivers/staging/octeon/ethernet-rx.c:119:3: error: implicit declaration of function 'enable_irq' drivers/staging/octeon/ethernet-rx.c: In function 'cvm_oct_do_interrupt': drivers/staging/octeon/ethernet-rx.c:136:2: error: implicit declaration of function 'disable_irq_nosync' drivers/staging/octeon/ethernet-rx.c: In function 'cvm_oct_rx_initialize': drivers/staging/octeon/ethernet-rx.c:532:2: error: implicit declaration of function 'request_irq' drivers/staging/octeon/ethernet-tx.c: In function 'cvm_oct_tx_initialize': drivers/staging/octeon/ethernet-tx.c:712:2: error: implicit declaration of function 'request_irq' drivers/staging/octeon/ethernet-tx.c: In function 'cvm_oct_tx_shutdown': drivers/staging/octeon/ethernet-tx.c:723:2: error: implicit declaration of function 'free_irq' Signed-off-by: Imre Kaloz <kaloz@openwrt.org> Acked-by: David Daney <david.daney@cavium.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-24staging: zcache: fix Kconfig crypto dependencySeth Jennings
ZCACHE is a boolean in the Kconfig. When selected, it should require that CRYPTO be builtin (=y). Currently, ZCACHE=y and CRYPTO=m is a valid configuration when it should not be. This patch changes the zcache Kconfig to enforce this dependency. Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com> Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-24staging: tidspbridge: remove usage of OMAP2_L4_IO_ADDRESSOmar Ramirez Luna
Instead now use ioremap. This is needed for 3.4 since this change emerged in mainline during one of the previous rc cycles. These solves the following compilation breaks: drivers/staging/tidspbridge/core/tiomap3430.c: In function ‘bridge_brd_start’: drivers/staging/tidspbridge/core/tiomap3430.c:425:4: error: implicit declaration of function ‘OMAP2_L4_IO_ADDRESS’ drivers/staging/tidspbridge/core/wdt.c: In function ‘dsp_wdt_init’: drivers/staging/tidspbridge/core/wdt.c:56:2: error: implicit declaration of function ‘OMAP2_L4_IO_ADDRESS’ For control registers a new function needs to be defined so we can get rid of a layer violation, but that approach must be queued for the next merge window. As seen in: http://www.arm.linux.org.uk/developer/build/ platform: omap4430-sdp build: uImage config: randconfig version: 3.4.0-rc3 start time: Apr 20 2012 01:07 Reported-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-24Merge tag 'hsi_fixes_for_3.4' of git://gitorious.org/kernel-hsi/kernel-hsiLinus Torvalds
Pull HSI fixes and ABI documentation from Carlos Chinea * tag 'hsi_fixes_for_3.4' of git://gitorious.org/kernel-hsi/kernel-hsi: HSI: Add HSI ABI documentation HSI: hsi_char: Remove max_data_size from sysfs HSI: hsi: Rework hsi_event interface HSI: hsi: Remove controllers and ports from the bus HSI: hsi: Fix error path cleanup on client registration HSI: hsi: Rework hsi_controller release
2012-04-23Merge tag 'md-3.4-fixes' of git://neil.brown.name/mdLinus Torvalds
Pull a few more md bug fixes from NeilBrown: "2 are tagged for -stable, one being for a fairly serious bug that can corrupt metadata and make it hard to recovery an array. The other is for a more recent regression since 3.3" * tag 'md-3.4-fixes' of git://neil.brown.name/md: md: fix possible corruption of array metadata on shutdown. md: don't call ->add_disk unless there is good reason. DM RAID: Use safe version of rdev_for_each
2012-04-24md: fix possible corruption of array metadata on shutdown.NeilBrown
commit c744a65c1e2d59acc54333ce8 md: don't set md arrays to readonly on shutdown. removed the possibility of a 'BUG' when data is written to an array that has just been switched to read-only, but also introduced the possibility that the array metadata could be corrupted. If, when md_notify_reboot gets the mddev lock, the array is in a state where it is assembled but hasn't been started (as can happen if the personality module is not available, or in other unusual situations), then incorrect metadata will be written out making it impossible to re-assemble the array. So only call __md_stop_writes() if the array has actually been activated. This patch is needed for any stable kernel which has had the above commit applied. Cc: stable@vger.kernel.org Reported-by: Christoph Nelles <evilazrael@evilazrael.de> Signed-off-by: NeilBrown <neilb@suse.de>
2012-04-24md: don't call ->add_disk unless there is good reason.NeilBrown
Commit 7bfec5f35c68121e7b18 md/raid5: If there is a spare and a want_replacement device, start replacement. cause md_check_recovery to call ->add_disk much more often. Instead of only when the array is degraded, it is now called whenever md_check_recovery finds anything useful to do, which includes updating the metadata for clean<->dirty transition. This causes unnecessary work, and causes info messages from ->add_disk to be reported much too often. So refine md_check_recovery to only do any actual recovery checking (including ->add_disk) if MD_RECOVERY_NEEDED is set. This fix is suitable for 3.3.y: Cc: stable@vger.kernel.org Reported-by: Jan Ceuleers <jan.ceuleers@computer.org> Signed-off-by: NeilBrown <neilb@suse.de>
2012-04-24DM RAID: Use safe version of rdev_for_eachJonathan Brassow
Fix segfault caused by using rdev_for_each instead of rdev_for_each_safe Commit dafb20fa34320a472deb7442f25a0c086e0feb33 mistakenly replaced a safe iterator with an unsafe one when making some macro changes. Signed-off-by: Jonathan Brassow <jbrassow@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
2012-04-23drm/i915: fix integer overflow in i915_gem_do_execbuffer()Xi Wang
On 32-bit systems, a large args->num_cliprects from userspace via ioctl may overflow the allocation size, leading to out-of-bounds access. This vulnerability was introduced in commit 432e58ed ("drm/i915: Avoid allocation for execbuffer object list"). Signed-off-by: Xi Wang <xi.wang@gmail.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-23drm/i915: fix integer overflow in i915_gem_execbuffer2()Xi Wang
On 32-bit systems, a large args->buffer_count from userspace via ioctl may overflow the allocation size, leading to out-of-bounds access. This vulnerability was introduced in commit 8408c282 ("drm/i915: First try a normal large kmalloc for the temporary exec buffers"). Signed-off-by: Xi Wang <xi.wang@gmail.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-23ACPI: Convert wake_sleep_flags to a value instead of functionKonrad Rzeszutek Wilk
With commit a2ef5c4fd44ce3922435139393b89f2cce47f576 "ACPI: Move module parameter gts and bfs to sleep.c" the wake_sleep_flags is required when calling acpi_enter_sleep_state, which means that if there are functions outside the sleep.c code they can't get the wake_sleep_flags values. This converts the function in to a exported value and converts the module config operands to a function. Acked-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Lin Ming <ming.m.lin@intel.com> [v2: Parameters can be turned on/off dynamically] [v3: unsigned char -> u8] [v4: val -> kp->arg] Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Link: http://lkml.kernel.org/r/1335150198-21899-2-git-send-email-konrad.wilk@oracle.com Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2012-04-23dma/ste_dma40: fix erroneous comparisonLinus Walleij
A small fallout from Vinod's conversions to dma_transfer_direction, this small comparison was done with a dma_data_direction instead. Fix it by comparing against the correct enum. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
2012-04-23dma/ste_dma40: explicitly include regulator consumer headerLinus Walleij
The patch "ARM: amba: Remove AMBA level regulator support" breaks the DMA40 driver since the <linux/amba/bus.h> header implicitly included the regulator consumer header. So include it explicitly and fix the build error. Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
2012-04-23dma40: Improve the logic of stopping logical chanNarayanan G
can be directly stopped by issuing a SUSPEND_REQ on the EE bits. There is no need to suspend the physical channel and restart it. Also, the support for pre-V2 hw is discontinued. EE bits for writing: 00: disable only if AS=11 or AS=00 01: enable 10: suspend_req only if AS=01 & EE=01 or EE=11 11: round / no change for writing Signed-off-by: Narayanan G <narayanan.gopalakrishnan@stericsson.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
2012-04-23drm/exynos: added missed vm area region mapping type.Inki Dae
with this patch, if the memory region is physically non-continuous then VM_MIXEDMAP is set to vm->vm_flags otherwise VM_PFNMAP. we had missed this flag setting. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2012-04-23drm/exynos: fixed exynos_drm_gem_map_pages bug.Inki Dae
this patch fixes the problem that the physical memory region to be mapped to user space could be exceeded. if page fault address was placed at between buffer start and end then memory region to be mapped would be exceeded. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2012-04-23drm/exynos: fixed duplicatd memory allocation bug.Inki Dae
the gem was already allocated at gem allocation time but is allocated at page fault handler so this patch fixes the problem that gem was allocated one more time. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2012-04-23HSI: hsi_char: Remove max_data_size from sysfsCarlos Chinea
Remove max_data_size sysfs entry. Otherwise is possible to have a buffer overrun if its value is increased after the device is open. Signed-off-by: Carlos Chinea <carlos.chinea@nokia.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2012-04-23HSI: hsi: Rework hsi_event interfaceCarlos Chinea
Remove custom hack and make use of the notifier chain interfaces for delivering events from the ports to their associated clients. Clients that want to receive port events need to register their callbacks using hsi_register_port_event(). The callbacks can be called in interrupt context. Use hsi_unregestier_port_event() to undo the registration. Signed-off-by: Carlos Chinea <carlos.chinea@nokia.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2012-04-23HSI: hsi: Remove controllers and ports from the busCarlos Chinea
HSI controllers and ports do not belong to the HSI bus. Those devices are not supposed to have a driver attached to them. Signed-off-by: Carlos Chinea <carlos.chinea@nokia.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2012-04-23HSI: hsi: Fix error path cleanup on client registrationCarlos Chinea
HSI client structure should be freed on error path after calling device_registration by dropping a reference to it. Signed-off-by: Carlos Chinea <carlos.chinea@nokia.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2012-04-23HSI: hsi: Rework hsi_controller releaseCarlos Chinea
Use the proper release mechanism for hsi_controller and hsi_ports structures. Free the structures through their associated device release callbacks. Signed-off-by: Carlos Chinea <carlos.chinea@nokia.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2012-04-22Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds
Pull networking fixes from David Miller: 1) Fix namespace init and cleanup in phonet to fix some oopses, from Eric W. Biederman. 2) Missing kfree_skb() in AF_KEY, from Julia Lawall. 3) Refcount leak and source address handling fix in l2tp from James Chapman. 4) Memory leak fix in CAIF from Tomasz Gregorek. 5) When routes are cloned from ipv6 addrconf routes, we don't process expirations properly. Fix from Gao Feng. 6) Fix panic on DMA errors in atl1 driver, from Tony Zelenoff. 7) Only enable interrupts in 8139cp driver after we've registered the IRQ handler. From Jason Wang. 8) Fix too many reads of KS_CIDER register in ks8851 during probe, fixing crashes on spurious interrupts. From Matt Renzelmann. 9) Missing include in ath5k driver and missing iounmap on probe failure, from Jonathan Bither. 10) Fix RX packet handling in smsc911x driver, from Will Deacon. 11) Fix ixgbe WoL on fiber by leaving the laser on during shutdown. 12) ks8851 needs MAX_RECV_FRAMES increased otherwise the internal MAC buffers are easily overflown. Fix from Davide Cimingahi. 13) Fix memory leaks in peak_usb CAN driver, from Jesper Juhl. 14) gred packet scheduler can dump in WRED more when doing a netlink dump. Fix from David Ward. 15) Fix MTU in USB smsc75xx driver, from Stephane Fillod. 16) Dummy device needs ->ndo_uninit handler to properly handle ->ndo_init failures. From Hiroaki SHIMODA. 17) Fix TX fragmentation in ath9k driver, from Sujith Manoharan. 18) Missing RTNL lock in ixgbe PM resume, from Benjamin Poirier. 19) Missing iounmap in farsync WAN driver, from Julia Lawall. 20) With LRO/GRO, tcp_grow_window() is easily tricked into not growing the receive window properly, and this hurts performance. Fix from Eric Dumazet. 21) Network namespace init failure can leak net_generic data, fix from Julian Anastasov. 22) Fix skb_over_panic due to mis-accounting in TCP for partially ACK'd SKBs. From Eric Dumazet. 23) New IDs for qmi_wwan driver, from Bjørn Mork. 24) Fix races in ax25_exit(), from Eric W. Biederman. 25) IPV6 TCP doesn't handle TCP_MAXSEG socket option properly, copy over logic from the IPV4 side. From Neal Cardwell. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (59 commits) tcp: fix TCP_MAXSEG for established IPv6 passive sockets drivers/net: Do not free an IRQ if its request failed drop_monitor: allow more events per second ks8851: Fix request_irq/free_irq mismatch net/hyperv: Adding cancellation to ensure rndis filter is closed ks8851: Fix mutex deadlock in ks8851_net_stop() net ax25: Reorder ax25_exit to remove races. icplus: fix interrupt for IC+ 101A/G and 1001LF net: qmi_wwan: support Sierra Wireless MC77xx devices in QMI mode bnx2x: off by one in bnx2x_ets_e3b0_sp_pri_to_cos_set() ksz884x: don't copy too much in netdev_set_mac_address() tcp: fix retransmit of partially acked frames netns: do not leak net_generic data on failed init net/sock.h: fix sk_peek_off kernel-doc warning tcp: fix tcp_grow_window() for large incoming frames drivers/net/wan/farsync.c: add missing iounmap davinci_mdio: Fix MDIO timeout check ipv6: clean up rt6_clean_expires ipv6: fix rt6_update_expires arcnet: rimi: Fix device name in debug output ...
2012-04-22hwmon: (ad7314) Fix build warningGuenter Roeck
The following build warning is seen in some configurations. drivers/hwmon/ad7314.c: In function 'ad7314_show_temperature': drivers/hwmon/ad7314.c:70: warning: 'data' may be used uninitialized in this function Fix by overloading the return value from ad7314_spi_read with both data and error code (the returned data is really u16 and needs to be converted into a signed value anyway). Signed-off-by: Guenter Roeck <linux@roeck-us.net> Cc: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-04-22drm/i915: fixup load-detect on enabled, but not active pipeDaniel Vetter
Somehow we have a fast-path that tries to avoid going through the load-detect code when the encode already has a crtc associated. But this fails horribly when the crtc is off. The load detect pipe itself manages this case well (and also does not forget to restore the dpms state), so just rip out this special case. The issue seems to go back all the way to the commit that originally introduced load-detection on the vga output: commit e4a5d54f924ea5ce2913d9d0687d034004816465 Author: Ma Ling <ling.ma@intel.com> Date: Tue May 26 11:31:00 2009 +0800 drm/i915: Add support for VGA load detection (pre-945). Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43020 Reported-by: Jean Delvare <khali@linux-fr.org> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-21drivers/net: Do not free an IRQ if its request failedLee Jones
Refrain from attempting to free an interrupt line if the request fails and hence, there is no IRQ to free. CC: netdev@vger.kernel.org Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-21ks8851: Fix request_irq/free_irq mismatchMatt Renzelmann
The dev_id parameter passed to free_irq needs to match the one passed to the corresponding request_irq. Signed-off-by: Matt Renzelmann <mjr@cs.wisc.edu> Acked-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-21Merge tag 'fixes-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull "ARM: SoC fixes" from Olof Johansson: * at91, ux500, imx, omap and bcmring: - at91 fixes for =m driver build issues, irqdomain fixes and config dependency fixes - ux500 kconfig dependency fixes and a smp wakeup bugfix - imx idle bugfix and build fix due to irq domain changes - omap uart pinmux fixes, softreset regression revert and misc fixes - bcmring build error regression fix * ux500 and imx had some small defconfig updates in this branch * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (27 commits) ARM: bcmring: fix UART declarations ARM: imx: Fix imx5 idle logic bug ARM: imx27-dt: Fix build due to removal of irq_domain_add_simple() ARM: imx_v4_v5_defconfig: Add support for CONFIG_REGULATOR_FIXED_VOLTAGE ARM: OMAP1: DMTIMER: fix broken timer clock source selection ARM: OMAP: serial: Fix the ocp smart idlemode handling bug ARM: OMAP2+: UART: Fix incorrect population of default uart pads ARM: OMAP: sram: fix BUG in dpll code for !PM case dmaengine: Kconfig: fix Atmel at_hdmac entry USB: gadget/at91_udc: add gpio_to_irq() function to vbus interrupt USB: ohci-at91: change annotations for probe/remove functions leds-atmel-pwm.c: Make pwmled_probe() __devinit ARM: at91: fix at91sam9261ek Ethernet dm9000 irq ARM: at91: fix rm9200ek flash size ARM: at91: remove empty at91_init_serial function ARM: at91: fix typo in at91_pmc_base assembly declaration ARM: at91: Export at91_matrix_base ARM: at91: Export at91_pmc_base ARM: at91: Export at91_ramc_base ARM: at91: Export at91_st_base ...
2012-04-21Merge tag 'mmc-fixes-for-3.4-rc4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc Pull MMC fixes from Chris Ball: - Build fix for omap_hsmmc with OF against 3.4-rc1. - Fix CONFIG_MMC_UNSAFE_RESUME semantics regression against 3.3, which broke hotplug card detection when UNSAFE_RESUME is set. - Fix a race condition in omap_hsmmc with runtime PM. - Fix two libertas SDIO-powered-resume regressions. - Small fixes for discard/sanitize, dw_mmc, cd-gpio and esdhc-imx. * tag 'mmc-fixes-for-3.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: mmc: core: Do not pre-claim host in suspend mmc: dw_mmc: prevent NULL dereference for dma_ops mmc: unbreak sdhci-esdhc-imx on i.MX25 mmc: cd-gpio: Include header to pickup exported symbol prototypes mmc: sdhci: refine non-removable card checking for card detection mmc: dw_mmc: Fix switch from DMA to PIO mmc: remove MMC bus legacy suspend/resume method mmc: omap_hsmmc: Get rid of of_have_populated_dt() usage mmc: omap_hsmmc: build fix for CONFIG_OF=y and CONFIG_MMC_OMAP_HS=m mmc: fixes for eMMC v4.5 sanitize operation mmc: fixes for eMMC v4.5 discard operation
2012-04-21Merge branch 'v4l_for_linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: - Fixes a regression at DVB core when switching from DVB-S2 to DVB-S on Kaffeine (Fedora 16 Bugzilla #812895); - Fixes a mutex unlock at an error condition at drx-k; - Fix winbond-cir set mode; - mt9m032: Fix a compilation breakage with some random Kconfig; - mt9m032: fix two dead locks; - xc5000: don't require an special firmware (that won't be provided by the vendor) just because the xtal frequency is different; - V4L DocBook: fix some typos at multi-plane formats description. * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] xc5000: support 32MHz & 31.875MHz xtal using the 41.024.5 firmware [media] V4L: mt9m032: fix compilation breakage [media] V4L: DocBook: Fix typos in the multi-plane formats description [media] V4L: mt9m032: fix two dead-locks [media] rc-core: set mode for winbond-cir [media] drxk: Does not unlock mutex if sanity check failed in scu_command() [media] dvb_frontend: Fix a regression when switching back to DVB-S
2012-04-21Merge tag 'mfd-for-linus-3.4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6 Pull MFD fixes from Samuel Ortiz: "We have 3 build fixes, a OMAP USB host PHY reset fix and the twl6040 conversion to an i2c driver. The latter may not sound like a fix but the twl6040 MFD driver won't probe without it, triggering an OMAP4 audio regression." * tag 'mfd-for-linus-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: mfd: Fix modular builds of rc5t583 regulator support mfd: Fix asic3_gpio_to_irq ARM: OMAP3: USB: Fix the EHCI ULPI PHY reset issue mfd: Convert twl6040 to i2c driver, and separate it from twl core mfd : Fix dbx500 compilation error
2012-04-21net/hyperv: Adding cancellation to ensure rndis filter is closedWenqi Ma
Although the network interface is down, the RX packets number which could be observed by ifconfig may keep on increasing. This is because the WORK scheduled in netvsc_set_multicast_list() may be executed after netvsc_close(). That means the rndis filter may be re-enabled by do_set_multicast() even if it was closed by netvsc_close(). By canceling possible WORK before close the rndis filter, the issue could be never happened. Signed-off-by: Wenqi Ma <wenqi_ma@trendmicro.com.cn> Reviewed-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-21ks8851: Fix mutex deadlock in ks8851_net_stop()Stephen Boyd
There is a potential deadlock scenario when the ks8851 driver is removed. The interrupt handler schedules a workqueue which acquires a mutex that ks8851_net_stop() also acquires before flushing the workqueue. Previously lockdep wouldn't be able to find this problem but now that it has the support we can trigger this lockdep warning by rmmoding the driver after an ifconfig up. Fix the possible deadlock by disabling the interrupts in the chip and then release the lock across the workqueue flushing. The mutex is only there to proect the registers anyway so this should be ok. ======================================================= [ INFO: possible circular locking dependency detected ] 3.0.21-00021-g8b33780-dirty #2911 ------------------------------------------------------- rmmod/125 is trying to acquire lock: ((&ks->irq_work)){+.+...}, at: [<c019e0b8>] flush_work+0x0/0xac but task is already holding lock: (&ks->lock){+.+...}, at: [<bf00b850>] ks8851_net_stop+0x64/0x138 [ks8851] which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&ks->lock){+.+...}: [<c01b89c8>] __lock_acquire+0x940/0x9f8 [<c01b9058>] lock_acquire+0x10c/0x130 [<c083dbec>] mutex_lock_nested+0x68/0x3dc [<bf00bd48>] ks8851_irq_work+0x24/0x46c [ks8851] [<c019c580>] process_one_work+0x2d8/0x518 [<c019cb98>] worker_thread+0x220/0x3a0 [<c01a2ad4>] kthread+0x88/0x94 [<c0107008>] kernel_thread_exit+0x0/0x8 -> #0 ((&ks->irq_work)){+.+...}: [<c01b7984>] validate_chain+0x914/0x1018 [<c01b89c8>] __lock_acquire+0x940/0x9f8 [<c01b9058>] lock_acquire+0x10c/0x130 [<c019e104>] flush_work+0x4c/0xac [<bf00b858>] ks8851_net_stop+0x6c/0x138 [ks8851] [<c06b209c>] __dev_close_many+0x98/0xcc [<c06b2174>] dev_close_many+0x68/0xd0 [<c06b22ec>] rollback_registered_many+0xcc/0x2b8 [<c06b2554>] rollback_registered+0x28/0x34 [<c06b25b8>] unregister_netdevice_queue+0x58/0x7c [<c06b25f4>] unregister_netdev+0x18/0x20 [<bf00c1f4>] ks8851_remove+0x64/0xb4 [ks8851] [<c049ddf0>] spi_drv_remove+0x18/0x1c [<c0468e98>] __device_release_driver+0x7c/0xbc [<c0468f64>] driver_detach+0x8c/0xb4 [<c0467f00>] bus_remove_driver+0xb8/0xe8 [<c01c1d20>] sys_delete_module+0x1e8/0x27c [<c0105ec0>] ret_fast_syscall+0x0/0x3c other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&ks->lock); lock((&ks->irq_work)); lock(&ks->lock); lock((&ks->irq_work)); *** DEADLOCK *** 4 locks held by rmmod/125: #0: (&__lockdep_no_validate__){+.+.+.}, at: [<c0468f44>] driver_detach+0x6c/0xb4 #1: (&__lockdep_no_validate__){+.+.+.}, at: [<c0468f50>] driver_detach+0x78/0xb4 #2: (rtnl_mutex){+.+.+.}, at: [<c06b25e8>] unregister_netdev+0xc/0x20 #3: (&ks->lock){+.+...}, at: [<bf00b850>] ks8851_net_stop+0x64/0x138 [ks8851] Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-21kill mm argument of vm_munmap()Al Viro
it's always current->mm Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-04-20mmc: core: Do not pre-claim host in suspendUlf Hansson
Since SDIO drivers may want to do some SDIO operations in their suspend callback functions, we must not keep the host claimed when calling them. Daniel Drake reported that libertas_sdio encountered a deadlock in its suspend function. Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com> Tested-by: Daniel Drake <dsd@laptop.org> [stable@: please apply to 3.2-stable and 3.3-stable] Cc: stable <stable@vger.kernel.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-04-20mmc: dw_mmc: prevent NULL dereference for dma_opsJaehoon Chung
Now, dma_ops is assumed that use the IDMAC. But if dma_ops is assigned the pdata->dma_ops, we didn't ensure that callback function is defined. If the callback isn't defined, then we should run in PIO mode. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Will Newton <will.newton@imgtec.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-04-20mmc: unbreak sdhci-esdhc-imx on i.MX25Eric Bénard
This was broken by me in 37865fe91582582a6f6c00652f6a2b1ff71f8a78 ("mmc: sdhci-esdhc-imx: fix timeout on i.MX's sdhci") where more extensive tests would have shown that read or write of data to the card were failing (even if the partition table was correctly read). Signed-off-by: Eric Bénard <eric@eukrea.com> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Cc: stable <stable@vger.kernel.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-04-20mmc: cd-gpio: Include header to pickup exported symbol prototypesH Hartley Sweeten
Include the linux/mmc/cd-gpio.h header to pickup the prototypes for the two exported symbols. This quiets the sparse warnings: warning: symbol 'mmc_cd_gpio_request' was not declared. Should it be static? warning: symbol 'mmc_cd_gpio_free' was not declared. Should it be static? Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-04-20mmc: sdhci: refine non-removable card checking for card detectionDaniel Drake
Commit c79396c191bc19 ("mmc: sdhci: prevent card detection activity for non-removable cards") disables card detection where the cards are marked as non-removable. This makes sense, but the implementation detail of calling mmc_card_is_removable() causes some problems, because mmc_card_is_removable() is overloaded with CONFIG_MMC_UNSAFE_RESUME semantics. In the OLPC XO case, we need CONFIG_MMC_UNSAFE_RESUME because our root filesystem is stored on SD, but we also have external SD card slots where we want automatic card detection. Refine the check to only apply to hosts marked as MMC_CAP_NONREMOVABLE, which is defined to mean that the card is *really* nonremovable. This could be revisited in future if we find a way to improve CONFIG_MMC_UNSAFE_RESUME semantics. Signed-off-by: Daniel Drake <dsd@laptop.org> Acked-by: Chuanxiao Dong <chuanxiao.dong@intel.com> [stable@: please apply to 3.3-stable] Cc: stable <stable@vger.kernel.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-04-20mmc: dw_mmc: Fix switch from DMA to PIOSeungwon Jeon
When dw_mci_pre_dma_transfer returns failure in some reasons, dw_mci_submit_data will prepare to switch the PIO mode from DMA. After switching to PIO mode, DMA(IDMAC in particular) is still enabled. This makes the corruption in handling interrupt and the driver lock-up. Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com> Acked-by: Will Newton <will.newton@imgtec.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-04-20mmc: remove MMC bus legacy suspend/resume methodChuanxiao Dong
MMC bus is using legacy suspend/resume method, which is not compatible if runtime pm callbacks are used. In this scenario, MMC bus suspend/resume callbacks cannot be called when system entering S3. So change to use the new defined dev_pm_ops for system sleeping mode. Tested on AM335x Platform. Solves major issue/crash reported at http://www.mail-archive.com/linux-omap@vger.kernel.org/msg65425.html Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com> Tested-by: Hebbar, Gururaja <gururaja.hebbar@ti.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Ulf Hansson <ulf.hansson@stericsson.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-04-20VM: add "vm_mmap()" helper functionLinus Torvalds
This continues the theme started with vm_brk() and vm_munmap(): vm_mmap() does the same thing as do_mmap(), but additionally does the required VM locking. This uninlines (and rewrites it to be clearer) do_mmap(), which sadly duplicates it in mm/mmap.c and mm/nommu.c. But that way we don't have to export our internal do_mmap_pgoff() function. Some day we hopefully don't have to export do_mmap() either, if all modular users can become the simpler vm_mmap() instead. We're actually very close to that already, with the notable exception of the (broken) use in i810, and a couple of stragglers in binfmt_elf. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-20VM: add "vm_munmap()" helper functionLinus Torvalds
Like the vm_brk() function, this is the same as "do_munmap()", except it does the VM locking for the caller. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>