aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* Merge branch 'for-linus' of ↵Linus Torvalds2007-05-05
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc: (46 commits) mmc-omap: Clean up omap set_ios and make MMC_POWER_ON work mmc-omap: Fix omap to use MMC_POWER_ON mmc-omap: add missing '\n' mmc: make tifm_sd_set_dma_data() static mmc: remove old card states mmc: support unsafe resume of cards mmc: separate out reading EXT_CSD mmc: break apart switch function MMC: Fix handling of low-voltage cards MMC: Consolidate voltage definitions mmc: add bus handler wbsd: check for data opcode earlier mmc: Separate out protocol ops mmc: Move core functions to subdir mmc: deprecate mmc bus topology mmc: remove card upon suspend mmc: allow suspended block driver to be removed mmc: Flush pending detects on host removal mmc: Move host and card drivers to subdirs mmc: Move queue functions to mmc_block ...
| * mmc-omap: Clean up omap set_ios and make MMC_POWER_ON workTony Lindgren2007-05-01
| | | | | | | | | | | | | | | | Move divisor calculation into a separate function and re-arrange the init order to make MMC_POWER_ON work. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * mmc-omap: Fix omap to use MMC_POWER_ONTony Lindgren2007-05-01
| | | | | | | | | | | | | | | | | | As discussed earlier on LKML: http://lkml.org/lkml/2006/5/4/44 Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * mmc-omap: add missing '\n'Arnaud Patard2007-05-01
| | | | | | | | | | | | | | | | | | This patch add a missing '\n' at the end of the 'cover is open' string in mmc_omap_switch_handler(). Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * mmc: make tifm_sd_set_dma_data() staticAdrian Bunk2007-05-01
| | | | | | | | | | | | | | This patch makes the needlessly global tifm_sd_set_dma_data() static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * mmc: remove old card statesPierre Ossman2007-05-01
| | | | | | | | | | | | Remove card states that no longer make any sense. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * mmc: support unsafe resume of cardsPierre Ossman2007-05-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since many have the system root on MMC/SD we must allow some foot shooting when it comes to resume. We cannot detect if a card is removed and reinserted during suspend, so the safe approach would be to assume it was, avoiding potential filesystem corruption. This will of course not work if you cannot release the card before suspend. This commit adds a compile time option that makes the MMC layer assume the card wasn't touched if it is redetected upon resume. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * mmc: separate out reading EXT_CSDPierre Ossman2007-05-01
| | | | | | | | | | | | | | Separate the reading and decoding of the EXT_CSD register with the actions taken on it. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * mmc: break apart switch functionPierre Ossman2007-05-01
| | | | | | | | | | | | | | Break apart the SD switch function into one that reads the capabilities and one that acts on them. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * MMC: Fix handling of low-voltage cardsPhilip Langdale2007-05-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix handling of low voltage MMC cards. The latest MMC and SD specs both agree that support for low-voltage operations is indicated by bit 7 in the OCR. The MMC spec states that the low voltage range is 1.65-1.95V while the SD spec leaves the actual voltage range undefined - meaning that there is still no such thing as a low voltage SD card. However, an old Sandisk spec implied that bits 7.0 represented voltages below 2.0V in 1V or 0.5V increments, and the code was accordingly written with that expectation. This confusion meant that host drivers attempting to support the typical low voltage (1.8V) would set the wrong bits in the host OCR mask (usually bits 5 and/or 6) resulting in the the low voltage mode never being used. This change corrects the low voltage range and adds sanity checks on the reserved bits (0-6) and for SD cards that claim to support low-voltage operations. Signed-off-by: Philip Langdale <philipl@overt.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * MMC: Consolidate voltage definitionsPhilip Langdale2007-05-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consolidate the list of available voltages. Up until now, a separate set of defines has been used for host->vdd than that used for the OCR voltage mask values. Having two sets of defines allows them to get out of sync and the current sets are already inconsistent with one claiming to describe ranges and the other specific voltages. Only the SDHCI driver uses the host->vdd defines and it is easily fixed to use the OCR defines. Signed-off-by: Philip Langdale <philipl@overt.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * mmc: add bus handlerPierre Ossman2007-05-01
| | | | | | | | | | | | | | | | | | | | | | Delegate protocol handling to "bus handlers". This allows the core to just handle the task of arbitrating the bus. Initialisation and pampering of cards is now done by the different bus handlers. This design also allows MMC and SD (and later SDIO) to be more cleanly separated, allowing easier maintenance. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * wbsd: check for data opcode earlierPierre Ossman2007-05-01
| | | | | | | | | | | | | | Move the check for supported data opcodes to the beginning of the request function to avoid wedging the card. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * mmc: Separate out protocol opsPierre Ossman2007-05-01
| | | | | | | | | | | | | | | | Move protocol operations and definitions into their own files in an effort to separate protocol handling and bus arbitration more clearly. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * mmc: Move core functions to subdirPierre Ossman2007-05-01
| | | | | | | | | | | | | | Create a "core" subdirectory to house the central bus handling functions. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * mmc: deprecate mmc bus topologyPierre Ossman2007-05-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The classic MMC bus was defined as multi card bus system, which is reflected in the design in the MMC layer. When SD showed up, the bus topology was abandoned and a star topology (one card per host) was mandated. MMC version 4 has followed this, officially deprecating the bus topology. As we do not have any known users of the bus topology we can remove support for it. This will simplify the code and rectify some incorrect assumptions in the newer additions. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * mmc: remove card upon suspendPierre Ossman2007-05-01
| | | | | | | | | | | | | | Suspending MMC/SD cards (versus removing and readding them) is an inherently unsafe operation and has even been broken for some time. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * mmc: allow suspended block driver to be removedPierre Ossman2007-05-01
| | | | | | | | | | | | | | | | Make sure we don't deadlock when removing a suspended block queue, something that might happen if the card is removed during suspend. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * mmc: Flush pending detects on host removalPierre Ossman2007-05-01
| | | | | | | | | | | | | | | | | | Make sure we kill of any pending detection runs when the host is removed instead of when it is freed. Also add some debugging to make sure the driver doesn't queue up more detection after it has removed the host. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * mmc: Move host and card drivers to subdirsPierre Ossman2007-05-01
| | | | | | | | | | | | | | Clean up the drivers/mmc directory by moving card and host drivers into subdirectories. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * mmc: Move queue functions to mmc_blockPierre Ossman2007-05-01
| | | | | | | | | | | | | | The mmc block queue functions are tailored for the mmc_block driver, so move those functions into that module. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * mmc: Move "present" markingPierre Ossman2007-05-01
| | | | | | | | | | | | | | The "present" state indicates that the card is a registered device, so it is more clear to put it together with the actual registration. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * mmc: Move OCR bit definesPierre Ossman2007-05-01
| | | | | | | | | | | | | | All host drivers were #include:ing mmc/protocol.h just to get access to the OCR bit defines. Move these to host.h instead. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * mmc: add type field to cardsPierre Ossman2007-05-01
| | | | | | | | | | | | | | Split out the type of card into its own field as it hardly qualifies as a state. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * mmc: MMC sector based cardsPierre Ossman2007-05-01
| | | | | | | | | | | | | | Support for MMC 4.2 sector based cards. This tweaks the init a bit and reads a new field out of the EXT_CSD. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * mmc: use right timing mode constantPierre Ossman2007-05-01
| | | | | | | | | | | | Fix copy-n-paste error. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * tifm: add missing include for DMA_32BIT_MASKAndrew Morton2007-05-01
| | | | | | | | | | | | | | | | | | | | sparc64: drivers/misc/tifm_7xx1.c: In function `tifm_7xx1_probe': drivers/misc/tifm_7xx1.c:294: error: `DMA_32BIT_MASK' undeclared Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * tifm: layout fixes, small changes to comments and printfsAlex Dubov2007-05-01
| | | | | | | | | | | | | | Cosmetic changes to the code. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * tifm_sd: implement software scatter-gatherAlex Dubov2007-05-01
| | | | | | | | | | | | | | | | | | | | | | It was found that delays associated with issue and completion of the commands severely limit performance of the new, fast SD cards. To alleviate this issue scatter-gather emulation in software is implemented for both dma and pio transfer modes. Non-block aligned and high memory sg entries are accounted for. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * tifm_sd: fix resume handlerAlex Dubov2007-05-01
| | | | | | | | | | | | | | | | | | Resume should not explicitly check for media type. Instead, it may relay on success of socket initialization. Small changes are introduced to tifm_sd_initialize to make it more robust. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * tifm_sd: replace command completion state machine with full checkingAlex Dubov2007-05-01
| | | | | | | | | | | | | | | | | | State machine used to to track mmc command state was found to be fragile and unreliable, making many cards unusable. The safer solution is to perform all needed checks at every card event. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * tifm_sd: merge dma and pio request processing pathsAlex Dubov2007-05-01
| | | | | | | | | | | | | | | | To allow for switching of trasfer mode (dma/pio) on a per-request basis, pio and dma request issue and completion function are now merged. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * tifm_sd: separate command flags, socket flags and register bit masksAlex Dubov2007-05-01
| | | | | | | | | | | | | | | | | | | | host->flags variable was hosting a collection of bits with different semantics. For clarity, hardware bit masks are now defined as macros, socket flags represented as bit fields and flags (now cmd_flags) only hosts command processing modifiers. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * tifm_sd: remove wait for power off on removeAlex Dubov2007-05-01
| | | | | | | | | | | | | | | | | | This wait was needed because of the mmc layer failure to wait for completion of all outstanding commands before host removal. It should be fixed now in the mmc layer. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * tifm_sd: remove tifm_sd_terminate functionAlex Dubov2007-05-01
| | | | | | | | | | | | | | | | tifm_sd_terminate can only lawfully be called on device removal so it can be merged with tifm_sd_remove. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * tifm: add sysfs attribute for tifm devicesAlex Dubov2007-05-01
| | | | | | | | | | | | | | A sysfs attribute reflecting current media type is added. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * tifm_7xx1: fix adapter resume functionAlex Dubov2007-05-01
| | | | | | | | | | | | | | | | | | | | Fixes to the adapter resume function to correctly handle all possible cases: 1. Card is removed during suspend 2. Card is inserted during suspend into previously empty socket 3. Card is replaced during suspend by same or different media type card. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * tifm: move common device management tasks from tifm_7xx1 to tifm_coreAlex Dubov2007-05-01
| | | | | | | | | | | | | | | | Some details of the device management (create, add, remove) are really belong to the tifm_core, as they are not hardware specific. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * tifm: move common adapter management tasks from tifm_7xx1 to tifm_coreAlex Dubov2007-05-01
| | | | | | | | | | | | | | | | Some details of the adapter management (create, add, remove) are really belong to the tifm_core, as they are not hardware specific. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * tifm_7xx1: improve card detection routineAlex Dubov2007-05-01
| | | | | | | | | | | | | | | | Remove unneeded conditions and change a sleeping regime a little in the card type detection routine. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * tifm: replace per-adapter kthread with freezeable workqueueAlex Dubov2007-05-01
| | | | | | | | | | | | | | | | | | Freezeable workqueue makes sure that adapter work items (device insertions and removals) would be handled after the system is fully resumed. Previously this was achieved by explicit freezing of the kthread. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * tifm: simplify bus match and uevent handlersAlex Dubov2007-05-01
| | | | | | | | | | | | | | | | Remove code duplicating the kernel functionality and clean up data structures involved in driver matching. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * tifm: use bus methods to handle probe/remove instead of driver ones.Alex Dubov2007-05-01
| | | | | | | | | | Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * tifm: hide details of interrupt processing from socket driversAlex Dubov2007-05-01
| | | | | | | | | | | | | | | | | | Instead of passing transformed value of adapter interrupt status to socket drivers, implement two separate callbacks - one for card events and another for dma events. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * wbsd: remove block crc testPierre Ossman2007-05-01
| | | | | | | | | | | | | | | | | | Block completion interrupts occur faster than we can process them, so just ignore them competely. Commit also fixes up some incorrect register defines. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * mmc: enforce correct sg listPierre Ossman2007-05-01
| | | | | | | | | | | | | | | | Now that we've fixed our only offender when it comes to strange sg list, add a check so that future users keep the sg list proper with regard to transfer size. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * mmc: cull sg list to match mmc request sizeAlex Dubov2007-05-01
| | | | | | | | | | | | | | | | | | | | | | | | mmc layer may introduce additional (compared to block layer) limits on request size. Culling of the sg list to match adjusted request size simplifies the handling of such cases in the low level driver, allowing it to skip block count checks while processing sg entries. (fixes for wbsd and sdhci by Pierre Ossman) Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* | Merge branch 'upstream-linus' of ↵Linus Torvalds2007-05-04
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2 * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2: ocfs2: Force use of GFP_NOFS in ocfs2_write() ocfs2: fix sparse warnings in fs/ocfs2/cluster ocfs2: fix sparse warnings in fs/ocfs2/dlm ocfs2: fix sparse warnings in fs/ocfs2 [PATCH] Copy i_flags to ocfs2 inode flags on write [PATCH] ocfs2: use __set_current_state() ocfs2: Wrap access of directory allocations with ip_alloc_sem. [PATCH] fs/ocfs2/: make 3 functions static ocfs2: Implement compat_ioctl()
| * | ocfs2: Force use of GFP_NOFS in ocfs2_write()Mark Fasheh2007-05-02
| | | | | | | | | | | | | | | | | | We can otherwise recurse into the file system. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
| * | ocfs2: fix sparse warnings in fs/ocfs2/clusterMark Fasheh2007-05-02
| | | | | | | | | | | | Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>