summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2012-12-06mmc: dw_mmc: Add sdio power bindingsAbhilash Kesavan1-3/+17
Add dt-based retrieval of host sdio pm capabilities. Based on the dt based discovery do a bus init in the resume function. Signed-off-by: Olof Johansson <olofj@chromium.org> Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: sdhci-pltfm: Support optional pm propertiesAbhilash Kesavan1-0/+6
Add support for optional pm capabilities such as MMC_PM_KEEP_POWER and MMC_PM_WAKE_SDIO_IRQ. Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: sdhci-pxav3: add quirks2Kevin Liu1-0/+2
Acked-by: Zhangfei Gao <zhangfei.gao@marvell.com> Signed-off-by: Kevin Liu <kliu5@marvell.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: sdhci: Use regulator min/max voltage range according to specKevin Liu1-10/+8
For regulator vmmc/vmmcq, use voltage range as below 3.3v/3.0v: (2.7v, 3.6v) 1.8v: (1.7v, 1.95v) Original code uses the precise value which may fail in regulator driver if it does NOT support the precise voltage. Signed-off-by: Jialing Fu <jlfu@marvell.com> Signed-off-by: Kevin Liu <kliu5@marvell.com> Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: SD/MMC Host Controller for Wondermedia WM8505/WM8650Tony Prisk3-0/+1041
This patch adds support for the SD/MMC host controller found on Wondermedia 8xxx series SoCs, currently supported under arm/arch-vt8500. A binding document is also included, based on mmc.txt with additional properties. Signed-off-by: Tony Prisk <linux@prisktech.co.nz> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: card: Add RPMB support in IOCTL interfaceLoic Pallardy1-0/+64
RPMB partition is accessing though /dev/block/mmcXrpmb device User callers can read and write entire data frame(s) as defined by JEDEC Standard JESD84-A441, using standard IOCTL interface. Signed-off-by: Alex Macro <alex.macro@stericsson.com> Signed-off-by: Loic Pallardy <loic.pallardy@stericsson.com> Reviewed-by: Namjae Jeon <linkinjeon@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Krishna Konda <kkonda@codeaurora.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: core: Add mmc_set_blockcount featureLoic Pallardy1-0/+14
Provide support for automatically sending Set Block Count (CMD23) messages. Used at least for RPMB support. Signed-off-by: Alex Macro <alex.macro@stericsson.com> Signed-off-by: Loic Pallardy <loic.pallardy@stericsson.com> Reviewed-by: Namjae Jeon <linkinjeon@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Johan Rudholm <johan.rudholm@stericsson.com> Acked-by: Krishna Konda <kkonda@codeaurora.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: core: Extend sysfs to ext_csd parameters for RPMB supportLoic Pallardy1-0/+4
Extend current sysfs access to ext_csd rpmb parameters (RPMB partition size) and rel_sector information. Signed-off-by: Loic Pallardy <loic.pallardy@stericsson.com> Reviewed-by: Namjae Jeon <linkinjeon@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Johan Rudholm <johan.rudholm@stericsson.com> Acked-by: Krishna Konda <kkonda@codeaurora.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: card: Do not scan RPMB partitionsLoic Pallardy1-0/+2
Do not scan rpmb partitions for "soft" partitions, since the rpmb partition contains protected data. Silences the following message during boot: mmcblkXRPMB: unknown partition table Signed-off-by: Johan Rudholm <johan.rudholm@stericsson.com> Reviewed-by: Namjae Jeon <linkinjeon@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Krishna Konda <kkonda@codeaurora.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: core: Expose access to RPMB partitionLoic Pallardy1-0/+11
Following JEDEC standard, if the mmc supports RPMB partition, a new interface is created and exposed via /dev/block. Users will be able to access RPMB partition using standard mmc IOCTL commands. Signed-off-by: Alex Macro <alex.macro@stericsson.com> Signed-off-by: Loic Pallardy <loic.pallardy@stericsson.com> Reviewed-by: Namjae Jeon <linkinjeon@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Johan Rudholm <johan.rudholm@stericsson.com> Acked-by: Krishna Konda <kkonda@codeaurora.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: sdhci-pxav3: Add base clock quirkKevin Liu1-1/+10
Enable the quirk SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN since SD_CAPABILITIES_1[15:8](BASE_FREQ) can't get correct base clock value. It returns a fixed pre-set value like 200 on some sdhci-pxav3 based platforms like MMP3 while return 0 on the other sdhci-pxav3 based platforms. So we enable the quirk and get the base clock via function get_max_clock. Also add get_max_clock. Reported-by: Philip Rakity <prakity@marvell.com> Reviewed-by: Philip Rakity <prakity@Marvell.com> Acked-by: Zhangfei Gao <zhangfei.gao@marvell.com> Signed-off-by: Kevin Liu <kliu5@marvell.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: Standardise capability typeLee Jones1-1/+1
There are discrepancies with regards to how MMC capabilities are carried throughout the subsystem. Let's standardise them to eliminate any confusion. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: mxs-mmc: Remove platform dataFabio Estevam1-21/+10
All MXS users have been converted to device tree and the board files have been removed. No need to keep platform data in the driver. Also move bus_width declaration in the beggining of mxs_mmc_probe() to avoid: 'warning: ISO C90 forbids mixed declarations and code'. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Marek Vasut <marex@denx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: sdio: Use multiple scatter/gather listKyoungil Kim2-11/+31
Before this patch, we always used only single sg entry for SDIO transfer. This patch switches to using multiple sg entries. In the case of dwmci, it supports only up to 4KB size per single sg entry. So if we want to transfer more than 4KB, we should send more than 1 command. When we tested before applying this patch, it took around 335 us for 5K(5120) bytes transfer with dwmci controller. After applying this patch, it takes 242 us for 5K bytes. So this patch makes around 38% performance improvement for 5K bytes transfer. If the transfer size is bigger, then the performance improvement ratio will be increased. Signed-off-by: Kyoungil Kim <ki0351.kim@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: core: Fix some driver hangs when dealing with broken devicesTrey Ramsay3-1/+43
There are infinite loops in the mmc code that can be caused by bad hardware. The code will loop forever if the device never comes back from program mode, R1_STATE_PRG, and it is not ready for data, R1_READY_FOR_DATA. A long timeout is added to prevent the code from looping forever. The timeout will occur if the device never comes back from program state or the device never becomes ready for data. It's not clear whether the timeout will do more than log a pr_err() and then start a fresh hang all over again. We may need to extend this patch later to perform some kind of reset of the device (is that possible?) or rejection of new I/O to the device. Signed-off-by: Trey Ramsay <tramsay@linux.vnet.ibm.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: dw_mmc: fix more const pointer warningsArnd Bergmann1-5/+5
The patch "dw_mmc: fix multiple drv_data NULL dereferences" has unfortunately clashed with my "mmc: dw_mmc: constify dw_mci_idmac_ops in exynos back-end" patch, causing new warnings to appear. This should hopefully fix the issue for good. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: at91-mci: remove obsolete driverLudovic Desroches4-1356/+1
The at91-mci driver is not needed anymore since the atmel-mci driver now supports all Atmel devices. Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: omap_hsmmc: remove warning message for debounce clockBalaji T K1-1/+0
MMC debounce clock is applicable only for omap2430, warning message gets printed when enable fails for debounce clock. Remove the get debounce clock failure message as it is noisy for other platforms. Signed-off-by: Balaji T K <balajitk@ti.com> Reported-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: omap_hsmmc: add DT property for max bus frequencyDaniel Mack1-1/+4
Maximum bus frequency can be limited by external circuitry like level shifters etc. Allow passing this value from DT. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: omap_hsmmc: claim pinctrl at probe timeDaniel Mack1-0/+7
This allows DT-driven board to set up the pin mux only when the driver is in use. Signed-off-by: Daniel Mack <zonque@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: mxcmmc: fix SD cards not being detected sometimes.Javier Martin1-1/+1
When a SD card is initialized some data transfers of 64 and 8 bytes are issued. It seems the DMA has some problems dealing with these kind of "short" transfers, leading sometimes to the SD card not being detected. In order to solve this problem, do not use DMA for transfer sizes lower than the sector size. Signed-off-by: Javier Martin <javier.martin@vista-silicon.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: dw_mmc: use helper macro module_platform_driver()Andy Shevchenko1-12/+2
Since v3.2 we have nice macro to define the platform driver's init and exit calls. This patch simplifies the dw_mmc platform driver by using that macro. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Girish K S <girish.shivanajappa@linaro.org> Acked-by: Will Newton <will.newton@imgtec.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: dw_mmc: use __devexit_p macro for .remove()Andy Shevchenko2-2/+2
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Girish K S <girish.shivananjappa@linaro.org> Acked-by: Will Newton <will.newton@imgtec.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: queue: amend buffer swap for non-blocking transferSeungwon Jeon1-7/+10
In case both 'req' and 'mq->mqrq_prev->req' are null, there is no request to be processed. That means there is no need to switch buffer. Switching buffer is required only after finishing 'issue_fn'. Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com> Reviewed-by: Per Forlin <per.forlin@stericsson.com> Tested-by: Johan Rudholm <johan.rudholm@stericsson.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: core: debugfs: Add signal_voltage to ios dumpJohan Rudholm1-0/+16
Signed-off-by: Johan Rudholm <johan.rudholm@stericsson.com> Reviewed-by: Philip Rakity <prakity@nvidia.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: sh-mmcif: avoid oops on spurious interrupts (second try)Guennadi Liakhovetski1-2/+2
On some systems, e.g., kzm9g, MMCIF interfaces can produce spurious interrupts without any active request. To prevent the Oops, that results in such cases, don't dereference the mmc request pointer until we make sure, that we are indeed processing such a request. Reported-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Tested-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp> Cc: stable@vger.kernel.org Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: sdhci: Balance vmmc regulator_enable(), and always enable vqmmcKevin Liu1-7/+8
The vmmc regulator enable in sdhci_add_host is NOT necessary since it can be enabled during mmc_power_up by function mmc_regulator_set_ocr. And this extra enable will make regulator_enable/regulator_disable unbalanced. Consequently, vmmc can't be disabled during mmc_power_off. Also, if the vqmmc regulator exists, it should be enabled regardless it support 1.8v or not. Signed-off-by: Kevin Liu <kliu5@marvell.com> Signed-off-by: Philip Rakity <prakity@marvell.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06Revert misapplied "mmc: sh-mmcif: avoid oops on spurious interrupts"Chris Ball1-4/+0
This reverts commit 8464dd52d3198dd05, which was a misapplied debugging version of the patch, not the final patch itself. Signed-off-by: Chris Ball <cjb@laptop.org> Cc: stable@vger.kernel.org
2012-12-06mmc: sdhci-s3c: fix missing clock for gpio card-detectHeiko Stübner1-0/+7
2abeb5c5ded2 ("Add clk_(enable/disable) in runtime suspend/resume") added the capability to stop the clocks when the device is runtime suspended, but forgot to handle the case of the card-detect using an external gpio. Therefore in the case that runtime-pm is enabled, start the io-clock when a card is inserted and stop it again once it is removed. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-05hwmon: (da9055) Fix chan_mux[DA9055_ADC_ADCIN3] settingAxel Lin1-1/+1
Set chan_mux[DA9055_ADC_ADCIN3] = DA9055_ADC_MUX_ADCIN3. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-12-05hwmon: DA9055 HWMON driverAshish Jangam3-0/+347
This is the HWMON patch for DA9055 PMIC and has got dependency on the DA9055 MFD core. This patch monitors the DA9055 PMIC's ADC channels vddout, junction temperature and auxiliary channels. This patch is functionally tested on Samsung SMDKV6410. Signed-off-by: David Dajun Chen <dchen@diasemi.com> Signed-off-by: Ashish Jangam <ashish.jangam@kpitcummins.com> [Guenter Roeck: Dropped __devinit, __devexit, __devexit_p] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-12-05hwmon: (coretemp) Drop N4xx, N5xx, D4xx, D5xx CPUs from tjmax tableGuenter Roeck1-8/+0
Since N4xx, N5xx, D4xx, and D5xx are now reliably detected using the model ID and the stepping/mask, drop the respective entries from tjmax_table. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-12-05hwmon: (coretemp) Use model table instead of if/else to identify CPU modelsGuenter Roeck1-14/+27
Make the code easier to extend and easier to adjust by using a model table listing CPU models, stepping/mask, and associated TjMax. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-12-05hwmon: da9052: Use da9052_reg_update for rmw operationsAxel Lin1-20/+7
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-12-05hwmon: (coretemp) Drop dependency on PCI for TjMax detection on Atom CPUsGuenter Roeck2-23/+16
So far, we use the NM10 Express Chipset PCI chip ID to detect TjMax for Atom CPUs with model 0x1c. As it turns out, we can use the CPU stepping (x86_mask) for the same purpose; stepping is 10 for all model 0x1c CPUs with TjMax of 100 degrees C. This was verified by checking the output of /proc/cpuinfo for the respective CPUs (D4xx, D5xx, N4xx, N5xx). Other CPUs currently covered by the same code (Exx, Z6xx, Z2460) are not supported by the NM10 Express Chipset. Most of those CPUs have TjMax of 90 degrees C, except for E6xxT models which have a TjMax of 110 degrees C. E6xxT CPUs can however not be detected by software. Calculate TjMax for Atom CPUs as follows. Note that the listed values are not correct in some cases (230, 330). tjmax_table is used for those to override the default values. ID Stepping TjMax Models 0x1c 10 100 D4xx, N4xx, D5xx, N5xx 0x1c not 10 90 Z5xx, N2xx, 230, 330, others 0x26 - 90 Atom Tunnel Creek (Exx), Lincroft (Z6xx) 0x27 - 90 Atom Medfield (Z2460) 0x36 - 100 Atom Cedar Trail (N2xxx, D2xxx) Also drop the module dependency on PCI. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-12-05hwmon: (ina2xx) use module_i2c_driver to simplify the codeWei Yongjun1-12/+1
Use the module_i2c_driver() macro to make the code smaller and a bit simpler. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-12-05hwmon: (ads7828) add support for ADS7830Guillaume Roguez2-9/+23
The ADS7830 device is almost the same as the ADS7828, except that it does 8-bit sampling, instead of 12-bit. This patch extends the ads7828 driver to support this chip. Signed-off-by: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-12-05hwmon: (ads7828) driver cleanupVivien Didelot1-142/+86
As there is no reliable way to identify the chip, it is preferable to remove the detect callback, to avoid misdetection. Module parameters are not worth it here, so let's get rid of them and add an ads7828_platform_data structure instead. Clean the code by removing unused macros, fixing coding style issues, avoiding function prototypes and using convenient macros such as module_i2c_driver(). Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-12-05x86,AMD: Power driver support for AMD's family 16h processorsBoris Ostrovsky1-0/+4
Add family 16h PCI ID to AMD's power driver to allow it report power consumption on these processors. Signed-off-by: Boris Ostrovsky <boris.ostrovsky@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-12-04clk: ux500: fix bit errorLinus Walleij1-1/+1
This fixes a bit error in the U8500 clock implementation: the unused p2_pclk12 registered at bit 12 in periphereral group 6 was defined as using bit 11 rather than bit 12. When walking over and disabling the unused clocks in the tree at late init time, p2_pclk12 was disabled, by effectively clearing the but for p2_pclk11 instead of bit 12 as it should have, thus disabling gpio block 6 and 7. Reported-by: Lee Jones <lee.jones@linaro.org> Acked-by: Ulf Hansson <ulf.hansson@linaro.org> Cc: Philippe Begnic <philippe.begnic@st.com> Cc: stable@kernel.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mike Turquette <mturquette@linaro.org>
2012-12-04Merge tag 'upstream-3.7-rc9' of git://git.infradead.org/linux-ubiLinus Torvalds1-10/+16
Pull UBI changes from Artem Bityutskiy: "Fixes for 2 brown-paperbag bugs introduced this merge window by the fastmap code: 1. The UBI background thread got stuck when a bit-flip happened because free LEBs was not removed from the "free" tree when we started using it. 2. I/O debugging checks did not work because we called a sleeping function in atomic context." * tag 'upstream-3.7-rc9' of git://git.infradead.org/linux-ubi: UBI: dont call ubi_self_check_all_ff() in __wl_get_peb() UBI: remove PEB from free tree in get_peb_for_wl()
2012-12-04Merge branch 'for-3.7-fixes' of ↵Linus Torvalds2-9/+7
git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue fixes from Tejun Heo: "So, safe fixes my ass. Commit 8852aac25e79 ("workqueue: mod_delayed_work_on() shouldn't queue timer on 0 delay") had the side-effect of performing delayed_work sanity checks even when @delay is 0, which should be fine for any sane use cases. Unfortunately, megaraid was being overly ingenious. It seemingly wanted to use cancel_delayed_work_sync() before cancel_work_sync() was introduced, but didn't want to waste the space for full delayed_work as it was only going to use 0 @delay. So, it only allocated space for struct work_struct and then cast it to struct delayed_work and passed it into delayed_work functions - truly awesome engineering tradeoff to save some bytes. Xiaotian fixed it by making megraid allocate full delayed_work for now. It should be converted to use work_struct and cancel_work_sync() but I think we better do that after 3.7. I added another commit to change BUG_ON()s in __queue_delayed_work() to WARN_ON_ONCE()s so that the kernel doesn't crash even if there are more such abuses." * 'for-3.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: convert BUG_ON()s in __queue_delayed_work() to WARN_ON_ONCE()s megaraid: fix BUG_ON() from incorrect use of delayed work
2012-12-04megaraid: fix BUG_ON() from incorrect use of delayed workXiaotian Feng2-9/+7
megaraid use INIT_WORK to declare a hotplug_work, but cast the hotplug_work from work_struct to delayed_work and schedule_delayed_work on it. This is very dangerous, as other part of delayed_work might be kernel memories allocated by others. With commit 8852aac ("workqueue: mod_delayed_work_on() shouldn't queue timer on 0 delay"), schedule_delayed_work() will check dwork->timer before queue_work even when @delay is 0, this causes megaraid code to hit the BUG_ON() in workqueue code. Change megaraid code to use delayed work. Signed-off-by: Xiaotian Feng <dannyfeng@tencent.com> Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Neela Syam Kolli <megaraidlinux@lsi.com> Cc: "James E.J. Bottomley" <JBottomley@parallels.com> Cc: linux-scsi@vger.kernel.org
2012-12-04UBI: dont call ubi_self_check_all_ff() in __wl_get_peb()Richard Weinberger1-9/+9
As ubi_self_check_all_ff() might sleep we are not allowed to call it from atomic context. For now we call it only from ubi_wl_get_peb(). There are some code paths where it would also make sense, but these paths are currently atomic and only enabled when fastmap is used. Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-12-04UBI: remove PEB from free tree in get_peb_for_wl()Richard Weinberger1-1/+7
If UBI is built without fastmap, get_peb_for_wl() has to remove the PEB manially from the free tree. Otherwise the requested PEB lives in two trees. Reported-by: Zach Sadecki <zsadecki@itwatchdogs.com> Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-12-04EDAC, pci_sysfs: Use for_each_pci_dev to simplify the codeWei Yongjun1-8/+4
Use for_each_pci_dev to simplify the code. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> [Boris: cleanup comments and drop loop brackets] Signed-off-by: Borislav Petkov <bp@alien8.de>
2012-12-03Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edacLinus Torvalds4-17/+22
Pull EDAC fixes from Mauro Carvalho Chehab: "One EDAC core fix, and a few driver fixes (i7300, i9275x, i7core)." * git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac: i7core_edac: fix panic when accessing sysfs files i7300_edac: Fix error flag testing edac: Fix the dimm filling for csrows-based layouts i82975x_edac: Fix dimm label initialization
2012-12-03Merge branch 'v4l_for_linus' of ↵Linus Torvalds8-25/+27
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: "Some driver fixes for s5p/exynos (mostly race fixes)" * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] s5p-mfc: Handle multi-frame input buffer [media] s5p-mfc: Bug fix of timestamp/timecode copy mechanism [media] exynos-gsc: Add missing video device vfl_dir flag initialization [media] exynos-gsc: Fix settings for input and output image RGB type [media] exynos-gsc: Don't use mutex_lock_interruptible() in device release() [media] fimc-lite: Don't use mutex_lock_interruptible() in device release() [media] s5p-fimc: Don't use mutex_lock_interruptible() in device release() [media] s5p-fimc: Prevent race conditions during subdevs registration
2012-12-03Merge branch 'block-dev'Linus Torvalds1-1/+1
Merge 'block-dev' branch. I was going to just mark everything here for stable and leave it to the 3.8 merge window, but having decided on doing another -rc, I migth as well merge it now. This removes the bd_block_size_semaphore semaphore that was added in this release to fix a race condition between block size changes and block IO, and replaces it with atomicity guaratees in fs/buffer.c instead, along with simplifying fs/block-dev.c. This removes more lines than it adds, makes the code generally simpler, and avoids the latency/rt issues that the block size semaphore introduced for mount. I'm not happy with the timing, but it wouldn't be much better doing this during the merge window and then having some delayed back-port of it into stable. * block-dev: blkdev_max_block: make private to fs/buffer.c direct-io: don't read inode->i_blkbits multiple times blockdev: remove bd_block_size_semaphore again fs/buffer.c: make block-size be per-page and protected by the page lock
2012-12-03Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds4-97/+55
Pull networking fixes from David Miller: 1) 8139cp leaks memory in error paths, from Francois Romieu. 2) do_tcp_sendpages() cannot handle order > 0 pages, but they can certainly arrive there now, fix from Eric Dumazet. 3) Race condition and sysfs fixes in bonding from Nikolay Aleksandrov. 4) Remain-on-Channel fix in mac80211 from Felix Liao. 5) CCK rate calculation fix in iwlwifi, from Emmanuel Grumbach. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: 8139cp: fix coherent mapping leak in error path. tcp: fix crashes in do_tcp_sendpages() bonding: fix race condition in bonding_store_slaves_active bonding: make arp_ip_target parameter checks consistent with sysfs bonding: fix miimon and arp_interval delayed work race conditions mac80211: fix remain-on-channel (non-)cancelling iwlwifi: fix the basic CCK rates calculation