summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2012-05-22md/raid10: add reshape supportNeilBrown
A 'near' or 'offset' lay RAID10 array can be reshaped to a different 'near' or 'offset' layout, a different chunk size, and a different number of devices. However the number of copies cannot change. Unlike RAID5/6, we do not support having user-space backup data that is being relocated during a 'critical section'. Rather, the data_offset of each device must change so that when writing any block to a new location, it will not over-write any data that is still 'live'. This means that RAID10 reshape is not supportable on v0.90 metadata. The different between the old data_offset and the new_offset must be at least the larger of the chunksize multiplied by offset copies of each of the old and new layout. (for 'near' mode, offset_copies == 1). A larger difference of around 64M seems useful for in-place reshapes as more data can be moved between metadata updates. Very large differences (e.g. 512M) seem to slow the process down due to lots of long seeks (on oldish consumer graded devices at least). Metadata needs to be updated whenever the place we are about to write to is considered - by the current metadata - to still contain data in the old layout. [unbalanced locking fix from Dan Carpenter <dan.carpenter@oracle.com>] Signed-off-by: NeilBrown <neilb@suse.de>
2012-05-20md/raid10: split out interpretation of layout to separate function.NeilBrown
We will soon be interpreting the layout (and chunksize etc) from multiple places to support reshape. So split it out into separate function. Signed-off-by: NeilBrown <neilb@suse.de>
2012-05-20md/raid10: Introduce 'prev' geometry to support reshape.NeilBrown
When RAID10 supports reshape it will need a 'previous' and a 'current' geometry, so introduce that here. Use the 'prev' geometry when before the reshape_position, and the current 'geo' when beyond it. At other times, use both as appropriate. For now, both are identical (And reshape_position is never set). When we use the 'prev' geometry, we must use the old data_offset. When we use the current (And a reshape is happening) we must use the new_data_offset. Signed-off-by: NeilBrown <neilb@suse.de>
2012-05-20md: use resync_max_sectors for reshape as well as resync.NeilBrown
Some resync type operations need to act on the address space of the device, others on the address space of the array. This only affects RAID10, so it sets resync_max_sectors to the array size (it defaults to the device size), and that is currently used for resync only. However reshape of a RAID10 must be done against the array size, not device size, so change code to use resync_max_sectors for both the resync and the reshape cases. This does not affect RAID5 or RAID1, just RAID10. Signed-off-by: NeilBrown <neilb@suse.de>
2012-05-20md: teach sync_page_io about new_data_offset.NeilBrown
Some code in raid1 and raid10 use sync_page_io to read/write pages when responding to read errors. As we will shortly support changing data_offset for raid10, this function must understand new_data_offset. So add that understanding. Signed-off-by: NeilBrown <neilb@suse.de>
2012-05-20md/raid10: collect some geometry fields into a dedicated structure.NeilBrown
We will shortly be adding reshape support for RAID10 which will require it having 2 concurrent geometries (before and after). To make that easier, collect most geometry fields into 'struct geom' and access them from there. Then we will more easily be able to add a second set of fields. Note that 'copies' is not in this struct and so cannot be changed. There is little need to change this number and doing so is a lot more difficult as it requires reallocating more things. So leave it out for now. Signed-off-by: NeilBrown <neilb@suse.de>
2012-05-20md/raid5: allow for change in data_offset while managing a reshape.NeilBrown
The important issue here is incorporating the different in data_offset into calculations concerning when we might need to over-write data that is still thought to be valid. To this end we find the minimum offset difference across all devices and add that where appropriate. Signed-off-by: NeilBrown <neilb@suse.de>
2012-05-20md/raid5: Use correct data_offset for all IO.NeilBrown
As there can now be two different data_offsets - an 'old' and a 'new' - we need to carefully choose between them. Signed-off-by: NeilBrown <neilb@suse.de>
2012-05-20md: add possibility to change data-offset for devices.NeilBrown
When reshaping we can avoid costly intermediate backup by changing the 'start' address of the array on the device (if there is enough room). So as a first step, allow such a change to be requested through sysfs, and recorded in v1.x metadata. (As we didn't previous check that all 'pad' fields were zero, we need a new FEATURE flag for this. A (belatedly) check that all remaining 'pad' fields are zero to avoid a repeat of this) The new data offset must be requested separately for each device. This allows each to have a different change in the data offset. This is not likely to be used often but as data_offset can be set per-device, new_data_offset should be too. This patch also removes the 'acknowledged' arg to rdev_set_badblocks as it is never used and never will be. At the same time we add a new arg ('in_new') which is currently always zero but will be used more soon. When a reshape finishes we will need to update the data_offset and rdev->sectors. So provide an exported function to do that. Signed-off-by: NeilBrown <neilb@suse.de>
2012-05-20md: allow a reshape operation to be reversed.NeilBrown
Currently a reshape operation always progresses from the start of the array to the end unless the number of devices is being reduced, in which case it progressed in the opposite direction. To reverse a partial reshape which changes the number of devices you can stop the array and re-assemble with the raid-disks numbers reversed and it will undo. However for a reshape that does not change the number of devices it is not possible to reverse the reshape in the middle - you have to wait until it completes. So add a 'reshape_direction' attribute with is either 'forwards' or 'backwards' and can be explicitly set when delta_disks is zero. This will become more important when we allow the data_offset to change in a reshape. Then the explicit statement of what direction is being used will be more useful. This can be enabled in raid5 trivially as it already supports reverse reshape and just needs to use a different trigger to request it. Signed-off-by: NeilBrown <neilb@suse.de>
2012-05-20md: using GFP_NOIO to allocate bio for flush requestShaohua Li
A flush request is usually issued in transaction commit code path, so using GFP_KERNEL to allocate memory for flush request bio falls into the classic deadlock issue. This is suitable for any -stable kernel to which it applies as it avoids a possible deadlock. Cc: stable@vger.kernel.org Signed-off-by: Shaohua Li <shli@fusionio.com> Signed-off-by: NeilBrown <neilb@suse.de>
2012-05-18md/raid10: fix transcription error in calc_sectors conversion.NeilBrown
The old code was sector_div(stride, fc); the new code was sector_dir(size, conf->near_copies); 'size' is right (the stride various wasn't really needed), but 'fc' means 'far_copies', and that is an important difference. Signed-off-by: NeilBrown <neilb@suse.de>
2012-05-17MD: Add del_timer_sync to mddev_suspend (fix nasty panic)Jonathan Brassow
Use del_timer_sync to remove timer before mddev_suspend finishes. We don't want a timer going off after an mddev_suspend is called. This is especially true with device-mapper, since it can call the destructor function immediately following a suspend. This results in the removal (kfree) of the structures upon which the timer depends - resulting in a very ugly panic. Therefore, we add a del_timer_sync to mddev_suspend to prevent this. Cc: stable@vger.kernel.org Signed-off-by: NeilBrown <neilb@suse.de>
2012-05-17md/raid10: set dev_sectors properly when resizing devices in array.NeilBrown
raid10 stores dev_sectors in 'conf' separately from the one in 'mddev' because it can have a very significant effect on block addressing and so need to be updated carefully. However raid10_resize isn't updating it at all! To update it correctly, we need to make sure it is a proper multiple of the chunksize taking various details of the layout in to account. This calculation is currently done in setup_conf. So split it out from there and call it from raid10_resize as well. Then set conf->dev_sectors properly. Signed-off-by: NeilBrown <neilb@suse.de>
2012-05-04md/bitmap: fix calculation of 'chunks' - missing shift.NeilBrown
commit 61a0d80c "md/bitmap: discard CHUNK_BLOCK_SHIFT macro" replaced CHUNK_BLOCK_RATIO() by the same text that was replacing CHUNK_BLOCK_SHIFT() - which is clearly wrong. The result is that 'chunks' is often too small by 1, which can sometimes result in a crash (not sure how). So use the correct replacement, and get rid of CHUNK_BLOCK_RATIO which is no longe used. Reported-by: Karl Newman <siliconfiend@gmail.com> Tested-by: Karl Newman <siliconfiend@gmail.com> Signed-off-by: NeilBrown <neilb@suse.de>
2012-04-29Merge tag 'staging-3.4-rc4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging tree fixes from Greg Kroah-Hartman: "Here are some tiny drivers/staging/ bugfixes. Some build fixes that were recently reported, as well as one kfree bug that is hitting a number of users." * tag 'staging-3.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: ozwpan: Fix bug where kfree is called twice. staging: octeon-ethernet: fix build errors by including interrupt.h staging: zcache: fix Kconfig crypto dependency staging: tidspbridge: remove usage of OMAP2_L4_IO_ADDRESS
2012-04-29Merge tag 'usb-3.4-rc5' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg Kroah-Hartman: "Here are a number of small USB fixes for 3.4-rc5. Nothing major, as before, some USB gadget fixes. There's a crash fix for a number of ASUS laptops on resume that had been reported by a number of different people. We think the fix might also pertain to other machines, as this was a BIOS bug, and they seem to travel to different models and manufacturers quite easily. Other than that, some other reported problems fixed as well." * tag 'usb-3.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: gadget: udc-core: fix incompatibility with dummy-hcd usb: gadget: udc-core: fix wrong call order USB: cdc-wdm: fix race leading leading to memory corruption USB: EHCI: fix crash during suspend on ASUS computers usb gadget: uvc: uvc_request_data::length field must be signed usb: gadget: dummy: do not call pullup() on udc_stop() usb: musb: davinci.c: add missing unregister usb: musb: drop __deprecated flag USB: gadget: storage gadgets send wrong error code for unknown commands usb: otg: gpio_vbus: Add otg transceiver events and notifiers
2012-04-28Merge 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: "Nothing controversial, just another batch of fixes: - Samsung/exynos fixes for more merge window fallout: build errors and warnings mostly, but also some clock/device setup issues on exynos4/5 - PXA bug and warning fixes related to gpio and pinmux - IRQ domain conversion bugfixes for U300 and MSM - A regulator setup fix for U300" * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: PXA2xx: MFP: fix potential direction bug ARM: PXA2xx: MFP: fix bug with MFP_LPM_KEEP_OUTPUT arm/sa1100: fix sa1100-rtc memory resource ARM: pxa: fix gpio wakeup setting ARM: SAMSUNG: add missing MMC_CAP2_BROKEN_VOLTAGE capability ARM: EXYNOS: Fix compilation error when CONFIG_OF is not defined ARM: EXYNOS: Fix resource on dev-dwmci.c ARM: S3C24XX: Fix build warning for S3C2410_PM ARM: mini2440_defconfig: Fix build error ARM: msm: Fix gic irqdomain support ARM: EXYNOS: Fix incorrect initialization of GIC ARM: EXYNOS: use 'exynos4-sdhci' as device name for sdhci controllers ARM: u300: bump all IRQ numbers by one ARM: ux300: Fix unimplementable regulation constraints
2012-04-28drm/i915: Set the Stencil Cache eviction policy to non-LRA mode.Kenneth Graunke
Clearing bit 5 of CACHE_MODE_0 is necessary to prevent GPU hangs in OpenGL programs such as Google MapsGL, Google Earth, and gzdoom when using separate stencil buffers. Without it, the GPU tries to use the LRA eviction policy, which isn't supported. This was supposed to be off by default, but seems to be on for many machines. This cannot be done in gen6_init_clock_gating with most of the other workaround bits; the render ring needs to exist. Otherwise, the register write gets dropped on the floor (one printk will show it changed, but a second printk immediately following shows the value reverts to the old one). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47535 Cc: stable@vger.kernel.org Cc: Rob Castle <futuredub@gmail.com> Cc: Eric Appleman <erappleman@gmail.com> Cc: aaron667@gmx.net Cc: Keith Packard <keithp@keithp.com> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-04-28drm/radeon/kms: need to set up ss on DP bridges as wellAlex Deucher
Makes Nutmeg DP to VGA bridges work for me. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=42490 Noticed by Jerome Glisse (after weeks of debugging). Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-04-28Merge tag 'stable/for-linus-3.4-rc4-tag' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen Pull Xen fixes from Konrad Rzeszutek Wilk: "Some of these had been in existence since the 2.6.27 days, some since 3.0 - and some due to new features added in v3.4. The one that is most interesting is David's one - in the low-level assembler code we had be checking events needlessly. With his patch now we do it when the appropriate flag is set - with the added benefit that we can process events faster. Stefano's is fixing a mistake where the Linux IRQ numbers were ACK-ed instead of the Xen IRQ, resulting in missing interrupts. The other ones are bootup related that can show up on various hardware." - In the low-level assembler code we would jump to check events even if none were present. This incorrect behavior had been there since 2.6.27 days! - When using the fast-path for ACK-ing interrupts we were using the Linux IRQ numbers instead of the Xen ones (and they can differ) and missing interrupts in process. - Fix bootup crashes when ACPI hotplug CPUs were present and they would expand past the set number of CPUs we were allocated. - Deal with broken BIOSes when uploading C-states to the hypervisor. - Disable the cpuid check for MWAIT_LEAF if the ACPI PAD driver is loaded. If the ACPI PAD driver is used it will crash, so lets not export the functionality so the ACPI PAD driver won't load. * tag 'stable/for-linus-3.4-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: xen: correctly check for pending events when restoring irq flags xen/acpi: Workaround broken BIOSes exporting non-existing C-states. xen/smp: Fix crash when booting with ACPI hotplug CPUs. xen: use the pirq number to check the pirq_eoi_map xen/enlighten: Disable MWAIT_LEAF so that acpi-pad won't be loaded.
2012-04-28Merge tag 'spi-for-linus' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds
Pull misc SPI device driver bug fixes from Grant Likely. * tag 'spi-for-linus' of git://git.secretlab.ca/git/linux-2.6: spi/spi-bfin5xx: Fix flush of last bit after each spi transfer spi/spi-bfin5xx: fix reversed if condition in interrupt mode spi/spi_bfin_sport: drop bits_per_word from client data spi/bfin_spi: drop bits_per_word from client data spi/spi-bfin-sport: move word length setup to transfer handler spi/bfin5xx: rename config macro name for bfin5xx spi controller driver spi/pl022: Allow request for higher frequency than maximum possible spi/bcm63xx: set master driver mode_bits. spi/bcm63xx: don't use the stopping state spi/bcm63xx: convert to the pump message infrastructure spi/spi-ep93xx.c: use dma_transfer_direction instead of dma_data_direction spi: fix spi.h kernel-doc warning spi/pl022: Fix calculate_effective_freq() spi/pl022: Fix range checking for bits per word
2012-04-28Merge tag 'hwmon-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon patches from Guenter Roeck: - Fix build warning in ad7314 driver - Fix pci_device_id array access in fam15h_power driver, introduced by commit 00250ec90963 ("hwmon: fam15h_power: fix bogus values with current BIOSes") * tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (fam15h_power) Fix pci_device_id array hwmon: (ad7314) Fix build warning
2012-04-28Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds
Pull drm fixes from Dave Airlie: "For your Friday pull request stack, nothing astounding or shattering this week some exynos, some intel, some radeon fixes. One intel fix for a regression somwehere back in 2.6.35 land." * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/radeon/kms: use frac fb div on APUs drm/radeon: add a missing entry to encoder_names drm/i915: handle input/output sdvo timings separately in mode_set drm/i915: fix integer overflow in i915_gem_do_execbuffer() drm/i915: fix integer overflow in i915_gem_execbuffer2() drm/exynos: added missed vm area region mapping type. drm/exynos: fixed exynos_drm_gem_map_pages bug. drm/exynos: fixed duplicatd memory allocation bug. drm/i915: fixup load-detect on enabled, but not active pipe
2012-04-28Merge branch 'for-v3.4-rc5' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux Pull build fixes for less mainstream architectures from Paul Gortmaker: "These are fixes for frv(1), blackfin(2), powerpc(1) and xtensa(4). Fortunately the touches are nearly all specific to files just used by the arch in question. The two touches to shared/common files [kernel/irq/debug.h and drivers/pci/Makefile] are trivial to assess as no risk to anyone. Half of them relate to xtensa directly. It was only when I fixed the last xtensa issue that I realized that the arch has been broken for a significant time, and isn't a specific v3.4 regression. So if you wanted, we could leave xtensa lying bleeding in the street for a couple more weeks and queue those for 3.5. But given they are no risk to anyone outside of xtensa, I figured to just leave them in. If you are OK with taking the xtensa fixes, then please pull to get: - one last implicit include uncovered by system.h that is in a file specific to just one powerpc defconfig. (I'd sync'd with BenH). - fix an oversight in the PCI makefile where shared code wasn't being compiled for ARCH=frv - fix a missing include for GPIO in blackfin framebuffer. - audit and tag endif in blackfin ezkit board file, in order to find and fix the misplaced endif masking a block of code. - fix irq/debug.h choice of temporary macro names to be more internal so they don't conflict with names used by xtensa. - fix a reference to an undeclared local var in xtensa's signal.c - fix an implicit bug.h usage in xtensa's asm/io.h uncovered by my removing bug.h from kernel.h - fix xtensa to properly indicate it is using asm-generic/hardirq.h in order to resolve the link error - undefined ack_bad_irq The xtensa still fails final link as my latest binutils does something evil when ld forward-relocates unlikely() blocks, but in theory people who have older/valid toolchains could now use the thing." * 'for-v3.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: xtensa: fix build fail on undefined ack_bad_irq blackfin: fix ifdef fustercluck in mach-bf538/boards/ezkit.c blackfin: fix compile error in bfin-lq035q1-fb.c pci: frv architecture needs generic setup-bus infrastructure irq: hide debug macros so they don't collide with others. xtensa: fix build error in xtensa/include/asm/io.h xtensa: fix build failure in xtensa/kernel/signal.c powerpc: fix system.h fallout in sysdev/scom.c [chroma_defconfig]
2012-04-27spi/spi-bfin5xx: Fix flush of last bit after each spi transferScott Jiang
This patch ensures that the last bit of a transfer gets correctly flushed out of the register. Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-04-27spi/spi-bfin5xx: fix reversed if condition in interrupt modeScott Jiang
This condition is used to determine 8 bits or 16 and 32 bits transfer. Obviously it is reversed. Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-04-27spi/spi_bfin_sport: drop bits_per_word from client dataScott Jiang
Since the member was dropped from the common Blackfin header, we need to stop using it in the SPORT driver too. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-04-27spi/bfin_spi: drop bits_per_word from client dataScott Jiang
No other SPI controller has this field, and SPI clients should be setting this up in their own drivers. So drop it from the Blackfin controller to keep people from using it. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-04-27spi/spi-bfin-sport: move word length setup to transfer handlerScott Jiang
Each transfer may have its own bits per word. Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-04-27spi/bfin5xx: rename config macro name for bfin5xx spi controller driverScott Jiang
This controller is only for blackfin 5xx soc, so rename it to BFIN5XX Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-04-27spi/pl022: Allow request for higher frequency than maximum possibleViresh Kumar
Currently, if we request for frequency greater than maximum possible, spi driver returns error. For example, if the spi block src frequency is 333/4 MHz, i.e. 83.33.. MHz, maximum frequency programmable would be src/2. Which would come around 41.6... It is difficult to pass frequency in these figures. We normally try to program in round figures, like 42 MHz and it should get programmed to <= requested_frequency, i.e. 41.6... For this to happen, we must not return error even if requested freq is higher than max possible. But should program it to max possible. Reported-by: Vinit Kamalaksha Shenoy <vinit.shenoy@st.com> Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-04-27spi/bcm63xx: set master driver mode_bits.Florian Fainelli
We were not properly advertising the MODE bits supported by this driver, fix that. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-04-27spi/bcm63xx: don't use the stopping stateFlorian Fainelli
We do not need to use a flag to indicate if the master driver is stopping it is sufficient to perform spi master unregistering in the platform driver's remove function. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-04-27spi/bcm63xx: convert to the pump message infrastructureFlorian Fainelli
This patch converts the bcm63xx SPI driver to use the SPI infrastructure pump message queue. Since we were previously sleeping in the SPI driver's transfer() function (which is not allowed) this is now fixed as well. To complete that conversion a certain number of changes have been made: - the transfer len is split into multiple hardware transfers in case its size is bigger than the hardware FIFO size - the FIFO refill is no longer done in the interrupt context, which was a bad idea leading to quick interrupt handler re-entrancy Tested-by: Tanguy Bouzeloc <tanguy.bouzeloc@efixo.com> Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-04-27spi/spi-ep93xx.c: use dma_transfer_direction instead of dma_data_directionH Hartley Sweeten
A new enum indicating the dma channel direction was introduced by: commit 49920bc66984a512f4bcc7735a61642cd0e4d6f2 dmaengine: add new enum dma_transfer_direction The following commit changed spi-ep93xx to use the new enum: commit a485df4b4404379786c4bdd258bc528b2617449d spi, serial: move to dma_transfer_direction In doing so a sparse warning was introduced: warning: mixing different enum types int enum dma_data_direction versus int enum dma_transfer_direction This is produced because the 'dir' passed in ep93xx_spi_dma_prepare is an enum dma_data_direction and is being used to set the dma_slave_config 'direction' which is now an enum dma_transfer_direction. Fix this by converting spi-ep93xx to use the new enum type in all places. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Mika Westerberg <mika.westerberg@iki.fi> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-04-27spi/pl022: Fix calculate_effective_freq()Viresh Kumar
calculate_effective_freq() was still not optimized and there were cases when it returned without error and with values of cpsr and scr as zero. Also, the variable named found is not used well. This patch targets to optimize and correct this routine. Tested for SPEAr. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Tested-by: Vinit Kamalaksha Shenoy <vinit.shenoy@st.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-04-27Merge tag 'fixes-for-v3.4-rc5' of ↵Greg Kroah-Hartman
git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus usb: fixes for v3.4-rc cycle A few more fixes for v3.4-rc cycle. It includes a couple of fixes to the ordering of the methods in udc-core.c. Without these two patches, we will have issues when either unregistering a gadget driver (triggered with dummy_hcd only) or issuing a device-initiated disconnect through sysfs. There's also a fix on dummy_hcd to not call ->pullup() from udc_stop() because udc-core.c already handles that. A fix to MUSB as promised, to kill the compile warnings regarding deprecated interfaces. We are essentially dropping the __deprecated flag because it doesn't look like we will ever be able to live without it when we consider the amount of silicon issues we find on different MUSB instantiations. A couple of other fixes are also available, one adding the missing transceiver events to gpio_vbus and another adding a missing unregister call to MUSB's davinci glue layer.
2012-04-27usb: gadget: udc-core: fix incompatibility with dummy-hcdAlan Stern
This patch (as1548) fixes a recently-introduced incompatibility between the UDC core and the dummy-hcd driver. Commit 8ae8090c82eb407267001f75b3d256b3bd4ae691 (usb: gadget: udc-core: fix asymmetric calls in remove_driver) moved the usb_gadget_udc_stop() call in usb_gadget_remove_driver() below the usb_gadget_disconnect() call. As a result, usb_gadget_disconnect() gets called at a time when the gadget driver believes it has been unbound but dummy-hcd believes it has not. A nasty error ensues when dummy-hcd calls the gadget driver's disconnect method a second time. To fix the problem, this patch moves the gadget driver's unbind notification after the usb_gadget_disconnect() call. Now nothing happens between the two unbind notifications, so nothing goes wrong. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Tested-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-04-27usb: gadget: udc-core: fix wrong call orderFelipe Balbi
commit 6d258a4 (usb: gadget: udc-core: stop UDC on device-initiated disconnect) introduced another case of asymmetric calls when issuing a device-initiated disconnect. Fix it. Reported-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-04-27drm/radeon/kms: use frac fb div on APUsAlex Deucher
Seems to be more stable on certain monitors. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=48880 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-04-27drm/radeon: add a missing entry to encoder_namesIlija Hadzic
An entry for INTERNAL_VCE encoder was missing. Add it. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-04-27Merge branch 'drm-intel-fixes' of ↵Dave Airlie
git://people.freedesktop.org/~danvet/drm-intel into drm-fixes From Daniel Vetter - VGA load-detect fix. This bug seems to be as old as the load-detect code (2.6.30), but needs stupid userspace (upowerd trying to detect connectors on dpms-off outputs) to actually kill the machine. And obviously a machine without VGA-hotplug, otherwise we don't do load detect. - 2 interger overflow fixes for unpriviledged ioctls from Xi Wang. - Fix SDVO regression for low-res (pixelclock < 100MHz) digital outputs, introduce in 2.6.36. * 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel: drm/i915: handle input/output sdvo timings separately in mode_set drm/i915: fix integer overflow in i915_gem_do_execbuffer() drm/i915: fix integer overflow in i915_gem_execbuffer2() drm/i915: fixup load-detect on enabled, but not active pipe
2012-04-27Merge branch 'exynos-drm-fixes' of ↵Dave Airlie
git://git.infradead.org/users/kmpark/linux-2.6-samsung into drm-fixes From Inki Dae: this patch set fixes gem allocation and mapping issue between user space and physical memory region. * 'exynos-drm-fixes' of git://git.infradead.org/users/kmpark/linux-2.6-samsung: drm/exynos: added missed vm area region mapping type. drm/exynos: fixed exynos_drm_gem_map_pages bug. drm/exynos: fixed duplicatd memory allocation bug.
2012-04-27ARM: pxa: fix gpio wakeup settingRobert Jarzmik
In 3.3, gpio wakeup setting was broken. The call enable_irq_wake() didn't set up the PXA gpio registers (PWER, ...) anymore. Fix it at least for pxa27x. The driver doesn't seem to be used in pxa25x (weird ...), and the fix doesn't extend to pxa3xx and pxa95x (which don't have a gpio_set_wake() available). Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
2012-04-27xen/acpi: Workaround broken BIOSes exporting non-existing C-states.Konrad Rzeszutek Wilk
We did a similar check for the P-states but did not do it for the C-states. What we want to do is ignore cases where the DSDT has definition for sixteen CPUs, but the machine only has eight CPUs and we get: xen-acpi-processor: (CX): Hypervisor error (-22) for ACPI CPU14 Reported-by: Tobias Geiger <tobias.geiger@vido.info> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2012-04-26USB: cdc-wdm: fix race leading leading to memory corruptionOliver Neukum
This patch fixes a race whereby a pointer to a buffer would be overwritten while the buffer was in use leading to a double free and a memory leak. This causes crashes. This bug was introduced in 2.6.34 Signed-off-by: Oliver Neukum <oneukum@suse.de> Tested-by: Bjørn Mork <bjorn@mork.no> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-26Merge tag 'ib-fixes' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband Pull infiniband fixes from Roland Dreier: "A few fixes for regressions introduced in 3.4-rc1: - fix memory leak in mlx4 - fix two problems with new MAD response generation code" * tag 'ib-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: IB/mlx4: Fix memory leaks in ib_link_query_port() IB/mad: Don't send response for failed MADs IB/mad: Set 'D' bit in response for unhandled MADs
2012-04-26Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dmaLinus Torvalds
Pull [GIT PULL] slave-dmaengine fixes from Vinod Koul. * 'fixes' of git://git.infradead.org/users/vkoul/slave-dma: dmaengine/amba-pl08x : reset phychan_hold on terminate all dma: pl330: fix a couple of compilation warnings dma/ste_dma40: fix erroneous comparison dma/ste_dma40: explicitly include regulator consumer header dma40: Improve the logic of stopping logical chan dmaengine: at_hdmac: remove clear-on-read in atc_dostart() dma: mxs-dma: enable channel in device_issue_pending call dmaengine: imx-dma: dont complete descriptor for cyclic dma
2012-04-26Merge git://www.linux-watchdog.org/linux-watchdogLinus Torvalds
Pull a watchdog fix from Wim Van Sebroeck: "It will fix the size when reading or writing to WD Timer port 0x72 in the hpwdt driver." * git://www.linux-watchdog.org/linux-watchdog: hpwdt: Only BYTE reads/writes to WD Timer port 0x72