Daniel Gl?ckner [Wed, 11 Aug 2010 01:02:25 +0000 (18:02 -0700)]
gpiolib: get rid of struct poll_desc and worklet
As sysfs_notify_dirent has been made irq safe, there is no reason to not
call it directly from irq. With the work_struct removed, the remaining
element in poll_desc is a sysfs_dirent pointer which may not be NULL. We
can therefore store it directly in the idr and pass it as context to the
irq handler.
Most part of the patch deals with renaming defines and variables to
reflect their new use without functional change.
I also took the opportunity to initialize the idr statically.
Signed-off-by: Daniel Gl?ckner <dg@emlix.com> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Brownell [Wed, 11 Aug 2010 01:02:24 +0000 (18:02 -0700)]
gpiolib: decouple might_sleep_if() from DEBUG
Be more consistent about runtime programming interface abuse warnings,
which can reduce some confusion and trigger bugfixes. Based on an
observation and patch from Jani Nikula.
Also update doc to highlight some sleeping-call issues and to match some
recent changes.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Jani Nikula <ext-jani.1.nikula@nokia.com> Cc: "Ryan Mallon" <ryan@bluewatersys.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
gpio: max730x: make pullups configurable via platformdata
The gpios on the max730x chips have support for internal pullups while in
input mode.
This patch adds support for configuring these pullups via platform data.
A new member ("input_pullup_active") to the platform data struct is
introduced. A set bit in this variable activates the pullups while the
respective port is in input mode. This is a compatible enhancement since
unset bits lead to disables pullups which was the default in the original
driver.
_Note_: the 4 lowest bits in "input_pullup_active" are unused because the
first 4 ports of the controller are not used, too.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Reviewed-by: Wolfram Sang <w.sang@pengutronix.de> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Because CONFIG_PM is a precondition to CONFIG_ACPI, the ifdef CONFIG_PM
within ifdef CONFIG_ACPI is redundant.
Signed-off-by: Christian Dietrich <qy03fugy@stud.informatik.uni-erlangen.de> Acked-by: Wan ZongShun <mcuos.com@gmail.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Wan ZongShun [Wed, 11 Aug 2010 01:02:19 +0000 (18:02 -0700)]
rtc/nuc900: modify enable/disable IRQs and driver data setting location
This patch does two modifications:
(1) Adjust enable/disable IRQs location,enable it after rtc
registration and disable it prior to unregistration.
(2) Put 'platform_set_drvdata(pdev, nuc900_rtc)' in front of rtc
registration still be safety, though there is no need to do this, when
I move enable irq after rtc registration, I think still put
'platform_set_drvdata' before rtc registration that would be a good
habit.
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Wan ZongShun [Wed, 11 Aug 2010 01:02:18 +0000 (18:02 -0700)]
rtc/nuc900: make returning time checking function valid
Make returning time checking function valid. In spite of using the
'rtc_valid_tm', nevertheless, the read time function omits its returning
value, that means the 'rtc_valid_tm' is useless here.
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Wan ZongShun [Wed, 11 Aug 2010 01:02:11 +0000 (18:02 -0700)]
rtc/pxa: remove unnecessary private ops->ioctl()
We shouldn't implement private ops->ioctl() unless absolutely necessary.
pxa series RTC driver's ioctl() is unnecessary, since RTC subsystem has
implement the ioctl() very well,so we can only use the API of
'.alarm_irq_enable' and '.update_irq_enable' to do enable irq action.
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Acked-by: Eric Miao <eric.y.miao@gmail.com> Cc: Paul Gortmaker <p_gortmaker@yahoo.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
According to the datasheet, setting match bit '0' indicates that the
corresponding alarm field will be used in the match process
- add operation alarm_irq_enable operation which is responsible for
handling RTC_AIE_ON, RTC_AIE_OFF ioctls
- remove clearing of AF bit after reading rtc/alarm control register:
according to datasheet this bit is cleared anyway when rtc/alarm control
register is read
[akpm@linux-foundation.org: make fm3130_alarm_irq_enable() static, fix comment layout] Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com> Acked-by: Wan ZongShun <mcuos.com@gmail.com> Acked-by: Sergey Lapin <slapin@ossfans.org> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Wan ZongShun [Wed, 11 Aug 2010 01:02:07 +0000 (18:02 -0700)]
rtc/nuc900: fix checking of args during time-setting
When a user application wants to set the rtc time, the RTC subsystem takes
advantage of 'rtc_valid_tm(tm)' to check 'rtc_time *tm' value validity, it
make sure the 'tm->tm_year' is larger than 70,so if '70< tm_year < 100',
the '(settm->tm_year - 100)' will be negative. ' Setting the negative
value to hardware register will be invalid, so I add the 'if' condition to
make sure set a valid value to register.
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Wan ZongShun [Wed, 11 Aug 2010 01:02:05 +0000 (18:02 -0700)]
nuc900/rtc: change the waiting for device ready implement
- add an mdelay(1) to the polling loop to cause less frequent access to
the hardware register.
- change the return value from ENODEV to EPERM if the loop timed out. I
think the 'Operation not permitted' description is more suitable for the
meaning of 'check_rtc_access_enable()' function, it just be used to
judge rtc access operation is permitted or not.
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Dan Carpenter [Wed, 11 Aug 2010 01:02:04 +0000 (18:02 -0700)]
autofs4: remove unneeded null check in try_to_fill_dentry()
After 97e7449a7ad: "autofs4: fix indirect mount pending expire race" we no
longer assumed that "ino" can be null. The other null checks got removed
but this was one was missed.
Signed-off-by: Dan Carpenter <error27@gmail.com> Cc: Ian Kent <raven@themaw.net> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Kulikov Vasiliy [Wed, 11 Aug 2010 01:02:04 +0000 (18:02 -0700)]
i2o: check return code from put_user()
Check return value of put_user() and return -EFAULT if it failed.
Original comment "We did a get user...so assuming mem is ok...is this
bad?" is incorrect because memory can be read only.
Kulikov Vasiliy [Wed, 11 Aug 2010 01:02:03 +0000 (18:02 -0700)]
i2o: fix overflow of copy_to_user()
If (len > reslen) we must not call copy_to_user() since kernel buffer is
smaller than we want to copy. Similar code in this file is correct, so
this bug was a typo.
Roy Zang [Wed, 11 Aug 2010 01:02:01 +0000 (18:02 -0700)]
dts: add ESDHC weird voltage bits workaround
P4080 ESDHC controller does not support 1.8V and 3.0V voltage. but the
host controller capabilities register wrongly set the bits. This patch
adds the workaround to correct the weird voltage setting bits. Only 3.3V
voltage is supported for P4080 ESDHC controller.
Signed-off-by: Roy Zang <tie-fei.zang@freescale.com> Cc: Jerry Huang <Chang-Ming.Huang@freescale.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Kumar Gala <galak@gate.crashing.org> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Roy Zang [Wed, 11 Aug 2010 01:02:00 +0000 (18:02 -0700)]
dts: add sdhci,auto-cmd12 field for p4080 device tree
Signed-off-by: Roy Zang <tie-fei.zang@freescale.com> Cc: Jerry Huang <Chang-Ming.Huang@freescale.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Kumar Gala <galak@gate.crashing.org> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jerry Huang [Wed, 11 Aug 2010 01:01:59 +0000 (18:01 -0700)]
sdhci: add auto CMD12 support for eSDHC driver
Add auto CMD12 command support for eSDHC driver. This is needed by P4080
and P1022 for block read/write. Manual asynchronous CMD12 abort operation
causes protocol violations on these silicons.
Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com> Signed-off-by: Roy Zang <tie-fei.zang@freescale.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Kumar Gala <galak@gate.crashing.org> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Marek Szyprowski [Wed, 11 Aug 2010 01:01:59 +0000 (18:01 -0700)]
sdhci: add regulator support
This patch adds support for regulator API to sdhci core driver.
Regulators can be used to disable power in suspended state to reduce
dissipated energy.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Marek Szyprowski [Wed, 11 Aug 2010 01:01:58 +0000 (18:01 -0700)]
sdhci-s3c: add support for new card detection methods
On some Samsung SoCs not all SDHCI controllers have card detect (CD) line.
For some embedded designs it is not even needed, because ususally the
device (like SDIO flash memory or wifi controller) is permanently wired to
the controller. There are also systems which have a card detect line
connected to some of the external interrupt lines or the presence of the
card depends on some other actions (like enabling a power regulator).
This patch adds support for all these cases. The following card detection
methods are possible:
1. internal sdhci host card detect line
2. external event
3. external gpio interrupt
4. no card detect line, controller will poll for the card
5. no card detect line, card is permanently wired to the controller
(once detected host won't poll it any more)
By default, all existing code would use method #1, what is compatible with
the previous version of the driver.
In case of external event, two callbacks must be provided in platdata:
ext_cd_init and ext_cd_cleanup. Both of them get a callback to a function
that notifies the s3c-sdhci host contoller as their argument. That
callback function should be called from the even dispatcher to let host
notice the card insertion/removal.
In case of external gpio interrupt, a gpio pin number must be provided in
platdata (ext_cd_gpio parameter), as well as the information about the
polarity of that gpio pin (ext_cd_gpio_invert). By default
(ext_cd_gpio_invert == 0) gpio value 0 means 'card has been removed', but
this can be changed to 'card has been removed' when ext_cd_gpio_invert ==
1.
This patch adds all required changes to sdhci-s3c driver.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Marek Szyprowski [Wed, 11 Aug 2010 01:01:57 +0000 (18:01 -0700)]
sdhci-s3c: enable SDHCI_QUIRK_NO_HISPD_BIT quirk
This patch enables SDHCI_QUIRK_NO_HISPD_BIT on Samsung SDHCI driver. This
solves detection problems with some external SD cards. This change has
been tested on S5PC100 and S5PC110. It has no inpact on driver speed.
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Marek Szyprowski [Wed, 11 Aug 2010 01:01:56 +0000 (18:01 -0700)]
sdhci-s3c: add support for the non standard minimal clock value
S3C SDHCI host controller can change the source for generating mmc clock.
By default host bus clock is used, what causes some problems on machines
with 133MHz bus, because the SDHCI divider cannot be as high get proper
clock value for identification mode. This is not a problem for the
controller, because it can generate lower frequencies from other clock
sources. This patch changes sdhci driver to use get_min_clock() call if
it has been provided.
This fixes the flood of the following warnings on Samsung S5PV210 SoCs:
mmc0: Minimum clock frequency too high for identification mode
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
On Samsung's SDMMC hosts the timeout clock is derivied from the SD Clock
which is set dynamically. So checked SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK
quirk and removed 'sdhci_s3c_get_timeout_clk' callback which doesn't need
any more.
Signed-off-by: Hyuk Lee <hyuk1.lee@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Venkatraman S [Wed, 11 Aug 2010 01:01:54 +0000 (18:01 -0700)]
omap hsmmc: fix processing of all dma interrupts as block completion
If other informative interrupts are enabled for the DMA channel used by
hsmmc, those are incorrectly treated as block completion. This patch lets
only the block completion interrupt to be processed.
Signed-off-by: Venkatraman S <svenkatr@ti.com> Acked-by: Madhusudhan Chikkature <madhu.cr@ti.com> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/mmc/host/msm-sdcc: remove dead config options
CONFIG_MMC_MSM7X00A_RESUME_IN_WQ and CONFIG_MMC_EMBEDDED_SDIO don't exist
in Kconfig and is never defined anywhere else, therefore removing all
references for it from the source code.
Signed-off-by: Christian Dietrich <qy03fugy@stud.informatik.uni-erlangen.de> Acked-by: David Brown <davidb@codeaurora.org> Cc: Daniel Walker <dwalker@codeaurora.org> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
There are some chips (like TI WL12xx series) that can be interfaced over
SDIO but don't support the SDIO specification, meaning that they are
missing CIA (Common I/O Area) with all it's registers. Current Linux SDIO
implementation relies on those registers to identify and configure the
card, so non-standard cards can not function and cause lots of warnings
from the core when it reads invalid data from non-existent registers.
After this patch, init_card() host callback can now set new quirk
MMC_QUIRK_NONSTD_SDIO, which means that SDIO core should not try to access
any standard SDIO registers and rely on init_card() to fill all SDIO
structures instead. As those cards are usually embedded chips, all the
required information can be obtained from machine board files by the host
driver when it's called through init_card() callback.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Cc: Adrian Hunter <adrian.hunter@nokia.com> Cc: Tony Lindgren <tony@atomide.com> Cc: Bob Copeland <me@bobcopeland.com> Cc: Kalle Valo <kvalo@adurom.com> Cc: Madhusudhan Chikkature <madhu.cr@ti.com> Cc: Kishore Kadiyala <kishore.kadiyala@ti.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Anton Vorontsov [Wed, 11 Aug 2010 01:01:49 +0000 (18:01 -0700)]
sdhci-pltfm: reorganize Makefile entries to support SoC devices
Due to build system limitations, intermediate and final objects can't have
the same names. And as we're going to start building SoC-specific
objects, let's rename the module to sdhci-platform, into which we'll link
sdhci-pltfm and SoC-specifc objects.
There should be no issue in renaming as the driver uses modalias
mechanism.
This is exactly the same approach as in sdhci-of driver.
Signed-off-by: Anton Vorontsov <avorontsov@mvista.com> Cc: Ben Dooks <ben@simtec.co.uk> Cc: Richard R?jfors <richard.rojfors@pelagicore.com> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Anton Vorontsov [Wed, 11 Aug 2010 01:01:47 +0000 (18:01 -0700)]
sdhci-pltfm: switch to module device table matching
Sometimes want to place SoC-specific parts alongside with the generic
driver, and to do so, we have to switch the driver over to the module
device table matching.
Note that drivers/mmc/host/sdhci-pltfm.h is so far empty, but it'll hold
SoC-specific driver data handlers soon.
Signed-off-by: Anton Vorontsov <avorontsov@mvista.com> Cc: Ben Dooks <ben@simtec.co.uk> Cc: Richard R?jfors <richard.rojfors@pelagicore.com> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Kishore Kadiyala [Wed, 11 Aug 2010 01:01:46 +0000 (18:01 -0700)]
mmc: omap: fix for bus width which improves SD card's peformance.
This patch improves low speeds for SD cards.
OMAP-MMC controller's can support maximum bus width of '8'. when bus
width is mentioned as "8" in controller data,the SD stack will check
whether bus width is "4" and if not it will set bus width to "1" and there
by degrading performance. This patch fixes the issue and improves the
performance of SD cards.
Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com> Signed-off-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Acked-by: Madhusudhan Chikkature <madhu.cr@ti.com> Tested-by: Jarkko Nikula <jhnikula@gmail.com> Cc: Adrian Hunter <adrian.hunter@nokia.com> Cc: Matt Fleming <matt@console-pimps.org> Cc: Tony Lindgren <tony@atomide.com> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Hanumath Prasad [Wed, 11 Aug 2010 01:01:45 +0000 (18:01 -0700)]
mmc: only set blockaddressed for > 2GiB cards
A non-zero value of SEC_COUNT does not indicate that the card is sector
addressed. According to the MMC specification, cards with a density
greater than 2GiB are sector addressed.
Maxim Levitsky [Wed, 11 Aug 2010 01:01:42 +0000 (18:01 -0700)]
mmc: make sdhci work with ricoh mmc controller
The current way of disabling it is not well tested by vendor and has all
kinds of bugs that show up on resume from ram/disk. A very good example
is a dead SDHCI controller.
Old way of disabling is still supported by continuing to use
CONFIG_MMC_RICOH_MMC.
Based on 'http://list.drzeus.cx/pipermail/sdhci-devel/2007-December/002085.html'
Therefore most of the credit for this goes to Andrew de Quincey
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Cc: Andrew de Quincey <adq_dvb@lidskialf.net> Acked-by: Philip Langdale <philipl@overt.org> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Maxim Levitsky [Wed, 11 Aug 2010 01:01:41 +0000 (18:01 -0700)]
mmc: fix all hangs related to mmc/sd card insert/removal during suspend/resume
If you don't use CONFIG_MMC_UNSAFE_RESUME, as soon as you attempt to
suspend, the card will be removed, therefore this patch doesn't change the
behavior of this option.
However the removal will be done by pm notifier, which runs while
userspace is still not frozen and thus can freely use del_gendisk, without
the risk of deadlock which would happen otherwise.
Card detect workqueue is now disabled while userspace is frozen, Therefore
if you do use CONFIG_MMC_UNSAFE_RESUME, and remove the card during
suspend, the removal will be detected as soon as userspace is unfrozen,
again at the moment it is safe to call del_gendisk.
Tested with and without CONFIG_MMC_UNSAFE_RESUME with suspend and hibernate.
[akpm@linux-foundation.org: clean up function prototype]
[akpm@linux-foundation.org: fix CONFIG_PM-n linkage, small cleanups]
[akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Cc: David Brownell <david-b@pacbell.net> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Michal Miroslaw [Wed, 11 Aug 2010 01:01:40 +0000 (18:01 -0700)]
mmc: split mmc_sd_init_card()
This series adds support for SD combo cards to MMC/SD driver stack.
SD combo consists of SD memory and SDIO parts in one package. Since the
parts have a separate SD command sets, after initialization, they can be
treated as independent cards on one bus.
Changes are divided into two patches. First is just moving initialization
code around so that SD memory part init can be called from SDIO init.
Second patch is a proper change enabling SD memory along SDIO. I tried to
move as much no-op changes to the first patch so that it's easier to
follow the required changes to initialization flow for SDIO cards.
This is based on Simplified SDIO spec v.2.00. The init sequence is
slightly modified to follow current SD memory init implementation.
Command sequences, assuming SD memory and SDIO indeed ignore unknown
commands, are the same as before for both parts.
This patch:
Prepare for SD-combo (IO+mem) support by splitting SD memory
card init and related functions.
Signed-off-by: Michal Miroslaw <mirq-linux@rere.qmqm.pl> Cc: Adrian Hunter <adrian.hunter@nokia.com> Cc: Chris Ball <cjb@laptop.org> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Kyungmin Park [Wed, 11 Aug 2010 01:01:36 +0000 (18:01 -0700)]
mmc: recognize CSD structure
The eMMC spec 4.4 and 4.3 + additional feature chips has CSD structure
version 3 and version 3 have to check the CSD_STRUCTURE byte in the
EXT_CSD register.
Also fix EXT_CSD revision message.
[akpm@linux-foundation.org: fix comment, per Chris Ball] Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Adrian Hunter <adrian.hunter@nokia.com> Cc: Chris Ball <cjb@laptop.org> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Wu Fengguang [Wed, 11 Aug 2010 01:01:29 +0000 (18:01 -0700)]
vfs: O_* bit numbers uniqueness check
The O_* bit numbers are defined in 20+ arch/*, and can silently overlap.
Add a compile time check to ensure the uniqueness as suggested by David
Miller.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Cc: David Miller <davem@davemloft.net> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@infradead.org> Cc: Eric Paris <eparis@redhat.com> Cc: Roland Dreier <rdreier@cisco.com> Cc: Jamie Lokier <jamie@shareable.org> Cc: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Randy Dunlap [Wed, 11 Aug 2010 01:01:28 +0000 (18:01 -0700)]
virtio_9p.h: include linux/types.h
Add <linux/types.h> to <linux/virtio_9p.h> so that types are explicitly
defined:
linux/virtio_9p.h:15: found __[us]{8,16,32,64} type without #include <linux/types.h>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Eric Van Hensbergen <ericvh@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andrew Morton [Wed, 11 Aug 2010 01:01:26 +0000 (18:01 -0700)]
scsi: remove private BIT macros
A couple of scsi drivers define a BIT() macro, duplicating the one in
bitops.h.
Cc: Jing Huang <huangj@brocade.com> Cc: Robert Love <robert.w.love@intel.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Peter Korsgaard [Wed, 11 Aug 2010 01:01:24 +0000 (18:01 -0700)]
scsi: use __uX types for headers exported to user space
Commit 9e4f5e29 ("FC Pass Thru support") exported a number of header files
in include/scsi to user space, but didn't change the uX types to the
userspace-compatible __uX types. Without that you'll get compile errors
when including them - E.G.:
include/scsi/scsi.h:145: error: expected specifier-qualifier-list before `u8'
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Cc: Boaz Harrosh <bharrosh@panasas.com> Cc: James Smart <james.smart@emulex.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Joe Perches [Wed, 11 Aug 2010 01:01:22 +0000 (18:01 -0700)]
drivers/scsi/ch.c: don't use vprintk as macro
It's an exported symbol of kernel/printk.c
Rename vprintk and dprintk macros to more common VPRINTK and DPRINTK
Add do { } while(0) around macros
Add level to VPRINTK so KERN_CONT can be used a couple of times.
Signed-off-by: Joe Perches <joe@perches.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
In sd_store_cache_type the symbol 'len' is declared twice. Remove the
second declaration to quiet the following sparse warning.
warning: symbol 'len' shadows an earlier one
In sd_probe the variable 'index' is declared as a u32. This variable is
used in a call to ida_get_new which is expecting an int *. Make the
variable an int to quiet the following sparse warning.
warning: incorrect type in argument 2 (different signedness)
There are 4 symbols in the file that are not exported and produce
the following sparse warnings.
warning: symbol 'sd_cdb_cache' was not declared. Should it be static?
warning: symbol 'sd_cdb_pool' was not declared. Should it be static?
warning: symbol 'sd_read_protection_type' was not declared. Should it be static?
warning: symbol 'sd_read_app_tag_own' was not declared. Should it be static?
Make them static to quiet the warnings.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: James E.J. Bottomley <James.Bottomley@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Roel Kluin [Wed, 11 Aug 2010 01:01:17 +0000 (18:01 -0700)]
dc395x: decrease iteration for tag_number of max_command in start_scsi()
The tag_number reaches dcb->max_command + 1 after the loop, but when
the tag_number equals dcb->max_command an error message is already
issued. The last iteration therefore appears obsolete.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Oliver Neukum <oliver@neukum.name> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ondrej Zary [Wed, 11 Aug 2010 01:01:16 +0000 (18:01 -0700)]
g_NCR5380: fix broken MMIO compilation
The ifdefs are broken so the MMIO code is never compiled and so it's
broken too. Fix them all. Untested as I don't have the hardware.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Andy Walls <awalls@md.metrocast.net> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Eric Moore <Eric.Moore@lsi.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
In commit 0dca94baeab4 ("hwmon: coretemp: update hotplug condition
check") we merged v2 of this patch. Update that to v3.
The difference is to remove the new and unnecesary references to
CPU_*_FROZEN.
Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Chen Gong <gong.chen@linux.intel.com> Cc: Rudolf Marek <r.marek@assembler.cz> Cc: Huaxu Wan <huaxu.wan@intel.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/net/wireless/libertas/cfg.c: In function 'lbs_scan_worker':
drivers/net/wireless/libertas/cfg.c:722: error: 'TASK_NORMAL' undeclared (first use in this function)
drivers/net/wireless/libertas/cfg.c:722: error: (Each undeclared identifier is reported only once
drivers/net/wireless/libertas/cfg.c:722: error: for each function it appears in.)
drivers/net/wireless/libertas/cfg.c: In function 'lbs_cfg_connect':
drivers/net/wireless/libertas/cfg.c:1267: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
drivers/net/wireless/libertas/cfg.c:1267: error: implicit declaration of function 'signal_pending'
drivers/net/wireless/libertas/cfg.c:1267: error: implicit declaration of function 'schedule_timeout'
So wait.h has a dependency on sched.h, but doesn't include sched.h. This
patch doesn't fix that.
Cc: Dan Williams <dcbw@redhat.com> Cc: "John W. Linville" <linville@tuxdriver.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Tested-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Alexey Fomenko <ext-alexey.fomenko@nokia.com> Cc: Trevor Keith <tsrk@tsrk.net> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Tue, 10 Aug 2010 22:38:19 +0000 (15:38 -0700)]
Merge branch 'for-linus' of git://neil.brown.name/md
* 'for-linus' of git://neil.brown.name/md: (24 commits)
md: clean up do_md_stop
md: fix another deadlock with removing sysfs attributes.
md: move revalidate_disk() back outside open_mutex
md/raid10: fix deadlock with unaligned read during resync
md/bitmap: separate out loading a bitmap from initialising the structures.
md/bitmap: prepare for storing write-intent-bitmap via dm-dirty-log.
md/bitmap: optimise scanning of empty bitmaps.
md/bitmap: clean up plugging calls.
md/bitmap: reduce dependence on sysfs.
md/bitmap: white space clean up and similar.
md/raid5: export raid5 unplugging interface.
md/plug: optionally use plugger to unplug an array during resync/recovery.
md/raid5: add simple plugging infrastructure.
md/raid5: export is_congested test
raid5: Don't set read-ahead when there is no queue
md: add support for raising dm events.
md: export various start/stop interfaces
md: split out md_rdev_init
md: be more careful setting MD_CHANGE_CLEAN
md/raid5: ensure we create a unique name for kmem_cache when mddev has no gendisk
...
Linus Torvalds [Tue, 10 Aug 2010 22:35:10 +0000 (15:35 -0700)]
x86: fix up system call numbering nit
As pointed out by Jiri Slaby: when I resolved the the 32-bit x85 system
call entry tables for prlimit (due to the conflict with fanotify), I
forgot to add the numbering in comments that we do for every fifth entry.
Randy Dunlap [Mon, 9 Aug 2010 23:37:16 +0000 (16:37 -0700)]
i2c.h: fix kernel-doc warnings
Fix kernel-doc warnings in linux/i2c.h:
Warning(include/linux/i2c.h:176): No description found for parameter 'alert'
Warning(include/linux/i2c.h:259): No description found for parameter 'of_node'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Randy Dunlap [Mon, 9 Aug 2010 23:30:40 +0000 (16:30 -0700)]
docbook: fixup media support files for htmldocs also
'make htmldocs' produces errors due to missing a supporting media
file, so add 'xmldoclinks' to the htmldocs dependencies so that the
needed supporting file will be present.
Documentation/DocBook/media.xml:4: warning: failed to load external entity "Documentation/DocBook/media-entities.tmpl"
Randy Dunlap [Mon, 9 Aug 2010 23:28:30 +0000 (16:28 -0700)]
docbook: fix fatal error from libata
'make htmldocs' has a fatal error when processing libata.xml, as seen
below. The string "Example patterns:" (or any string with "example.*:"
in it AFAIK) causes some part of the doc generation tool chain to try to
produce an <informalexample> block without a beginning <para>, but
there is an ending </para> generated, which throws things out of kilter.
I don't even know where (what program) this is happening in.
I searched in docproc and xmlto and in some XML stylesheets without
finding anything. If anyone can give me pointers about this, please do.
Until this is fixed, let's just spell "Example" as "Sample"
and match up the double quotation marks while there.
Documentation/DocBook/libata.xml:6575: parser error : Opening and ending tag mismatch: programlisting line 6573 and para
</para><para>
^
Documentation/DocBook/libata.xml:6580: parser error : Opening and ending tag mismatch: para line 6575 and programlisting
</programlisting></informalexample>
^
unable to parse Documentation/DocBook/libata.xml
make[2]: *** [Documentation/DocBook/libata.html] Error 1
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Dave Kleikamp [Mon, 9 Aug 2010 20:57:38 +0000 (15:57 -0500)]
jfs: don't allow os2 xattr namespace overlap with others
It's currently possible to bypass xattr namespace access rules by
prefixing valid xattr names with "os2.", since the os2 namespace stores
extended attributes in a legacy format with no prefix.
This patch adds checking to deny access to any valid namespace prefix
following "os2.".
Linus Torvalds [Tue, 10 Aug 2010 22:22:42 +0000 (15:22 -0700)]
Merge branch 'for-2.6.36' of git://git.kernel.dk/linux-2.6-block
* 'for-2.6.36' of git://git.kernel.dk/linux-2.6-block: (149 commits)
block: make sure that REQ_* types are seen even with CONFIG_BLOCK=n
xen-blkfront: fix missing out label
blkdev: fix blkdev_issue_zeroout return value
block: update request stacking methods to support discards
block: fix missing export of blk_types.h
writeback: fix bad _bh spinlock nesting
drbd: revert "delay probes", feature is being re-implemented differently
drbd: Initialize all members of sync_conf to their defaults [Bugz 315]
drbd: Disable delay probes for the upcomming release
writeback: cleanup bdi_register
writeback: add new tracepoints
writeback: remove unnecessary init_timer call
writeback: optimize periodic bdi thread wakeups
writeback: prevent unnecessary bdi threads wakeups
writeback: move bdi threads exiting logic to the forker thread
writeback: restructure bdi forker loop a little
writeback: move last_active to bdi
writeback: do not remove bdi from bdi_list
writeback: simplify bdi code a little
writeback: do not lose wake-ups in bdi threads
...
Fixed up pretty trivial conflicts in drivers/block/virtio_blk.c and
drivers/scsi/scsi_error.c as per Jens.
Linus Torvalds [Tue, 10 Aug 2010 22:09:54 +0000 (15:09 -0700)]
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (94 commits)
V4L/DVB: tvp7002: fix write to H-PLL Feedback Divider LSB register
V4L/DVB: dvb: siano: free spinlock before schedule()
V4L/DVB: media: video: pvrusb2: remove custom hex_to_bin()
V4L/DVB: drivers: usbvideo: remove custom implementation of hex_to_bin()
V4L/DVB: Report supported QAM modes on bt8xx
V4L/DVB: media: ir-keytable: null dereference in debug code
V4L/DVB: ivtv: convert to the new control framework
V4L/DVB: ivtv: convert gpio subdev to new control framework
V4L/DVB: wm8739: convert to the new control framework
V4L/DVB: cs53l32a: convert to new control framework
V4L/DVB: wm8775: convert to the new control framework
V4L/DVB: cx2341x: convert to the control framework
V4L/DVB: cx25840: convert to the new control framework
V4L/DVB: cx25840/ivtv: replace ugly priv control with s_config
V4L/DVB: saa717x: convert to the new control framework
V4L/DVB: msp3400: convert to the new control framework
V4L/DVB: saa7115: convert to the new control framework
V4L/DVB: v4l2: hook up the new control framework into the core framework
V4L/DVB: Documentation: add v4l2-controls.txt documenting the new controls API
V4L/DVB: v4l2-ctrls: Whitespace cleanups
...
* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
watchdog: hpwdt: formatting of pointers in printk()
watchdog: Adding support for ARM Primecell SP805 Watchdog
watchdog: f71808e_wdt: new watchdog driver for Fintek F71808E and F71882FG
watchdog: sch311x_wdt.c: set parent before registeriing the misc device in probe() function
watchdog: wdt_pci.c: move ids to pci_ids.h
watchdog: s3c2410_wdt - Fix removing of platform device