summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/card
Commit message (Collapse)AuthorAgeFilesLines
* [PATCH] switch mmcAl Viro2008-10-211-9/+8
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* [PATCH] beginning of methods conversionAl Viro2008-10-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | To keep the size of changesets sane we split the switch by drivers; to keep the damn thing bisectable we do the following: 1) rename the affected methods, add ones with correct prototypes, make (few) callers handle both. That's this changeset. 2) for each driver convert to new methods. *ALL* drivers are converted in this series. 3) kill the old (renamed) methods. Note that it _is_ a flagday; all in-tree drivers are converted and by the end of this series no trace of old methods remain. The only reason why we do that this way is to keep the damn thing bisectable and allow per-driver debugging if anything goes wrong. New methods: open(bdev, mode) release(disk, mode) ioctl(bdev, mode, cmd, arg) /* Called without BKL */ compat_ioctl(bdev, mode, cmd, arg) locked_ioctl(bdev, mode, cmd, arg) /* Called with BKL, legacy */ Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* mmc_block: tell block layer there is no seek penaltyPierre Ossman2008-10-141-0/+1
| | | | Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* Merge branch 'for-linus' of ↵Linus Torvalds2008-10-123-49/+23
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: (24 commits) MMC: Use timeout values from CSR MMC: CSD and CID timeout values sdhci: 'scratch' may be used uninitialized mmc: explicitly mention SDIO support in Kconfig mmc: remove redundant "depends on" Fix comment in include/linux/mmc/host.h sdio: high-speed support mmc_block: hard code 512 byte block size sdhci: force high speed capability on some controllers mmc_block: filter out PC requests mmc_block: indicate strict ordering mmc_block: inform block layer about sector count restriction sdio: give sdio irq thread a host specific name sdio: make sleep on error interruptable sdhci: reduce card detection delay sdhci: let the controller wait for busy state to end atmel-mci: Add missing flush_dcache_page() in PIO transfer code atmel-mci: Don't overwrite error bits when NOTBUSY is set atmel-mci: Add experimental DMA support atmel-mci: support multiple mmc slots ...
| * mmc: explicitly mention SDIO support in KconfigPierre Ossman2008-10-121-1/+1
| | | | | | | | Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * mmc: remove redundant "depends on"Pierre Ossman2008-10-121-1/+0
| | | | | | | | Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * mmc_block: hard code 512 byte block sizePierre Ossman2008-10-121-18/+5
| | | | | | | | | | | | | | We use 512 byte blocks on all cards, and newer cards support nothing else, so hard code it and make the code less complex. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * mmc_block: filter out PC requestsPierre Ossman2008-10-121-1/+1
| | | | | | | | | | | | | | We do not support PC (SCSI) commands, so don't pretend we do by letting them through. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * mmc_block: indicate strict orderingPierre Ossman2008-10-121-0/+1
| | | | | | | | | | | | | | | | The MMC block driver services requests one at a time and in strict order. Indicate this to the block layer so that it can handle barriers in an efficient manner. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * mmc_block: inform block layer about sector count restrictionPierre Ossman2008-10-122-28/+15
| | | | | | | | | | | | | | | | Make sure we consider the maximum block count when we tell the block layer about the maximum sector count. That way we don't have to chop up the request ourselves. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6Linus Torvalds2008-10-101-3/+7
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (37 commits) [SCSI] zfcp: fix double dbf id usage [SCSI] zfcp: wait on SCSI work to be finished before proceeding with init dev [SCSI] zfcp: fix erp list usage without using locks [SCSI] zfcp: prevent fc_remote_port_delete calls for unregistered rport [SCSI] zfcp: fix deadlock caused by shared work queue tasks [SCSI] zfcp: put threshold data in hba trace [SCSI] zfcp: Simplify zfcp data structures [SCSI] zfcp: Simplify get_adapter_by_busid [SCSI] zfcp: remove all typedefs and replace them with standards [SCSI] zfcp: attach and release SAN nameserver port on demand [SCSI] zfcp: remove unused references, declarations and flags [SCSI] zfcp: Update message with input from review [SCSI] zfcp: add queue_full sysfs attribute [SCSI] scsi_dh: suppress comparison warning [SCSI] scsi_dh: add Dell product information into rdac device handler [SCSI] qla2xxx: remove the unused SCSI_QLOGIC_FC_FIRMWARE option [SCSI] qla2xxx: fix printk format warnings [SCSI] qla2xxx: Update version number to 8.02.01-k8. [SCSI] qla2xxx: Ignore payload reserved-bits during RSCN processing. [SCSI] qla2xxx: Additional residual-count corrections during UNDERRUN handling. ...
| * | [SCSI] mmc_block: use generic helper to print capacitiesPierre Ossman2008-10-031-3/+7
| |/ | | | | | | | | Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* | block: don't depend on consecutive minor spaceTejun Heo2008-10-091-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | * Implement disk_devt() and part_devt() and use them to directly access devt instead of computing it from ->major and ->first_minor. Note that all references to ->major and ->first_minor outside of block layer is used to determine devt of the disk (the part0) and as ->major and ->first_minor will continue to represent devt for the disk, converting these users aren't strictly necessary. However, convert them for consistency. * Implement disk_max_parts() to avoid directly deferencing genhd->minors. * Update bdget_disk() such that it doesn't assume consecutive minor space. * Move devt computation from register_disk() to add_disk() and make it the only one (all other usages use the initially determined value). These changes clean up the code and will help disk->part dereference fix and extended block device numbers. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* Merge branch 'for-linus' of ↵Linus Torvalds2008-09-212-5/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | 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: mmc_test: initialize mmc_test_lock statically mmc_block: handle error from mmc_register_driver() atmel-mci: Set MMC_CAP_NEEDS_POLL if no detect_pin atmel-mci: Fix bogus debugfs file size atmel-mci: Fix memory leak in atmci_regs_show atmel-mci: debugfs: enable clock before dumping regs tmio_mmc: fix compilation with debug enabled
| * mmc_test: initialize mmc_test_lock staticallyAkinobu Mita2008-09-201-3/+1
| | | | | | | | | | | | | | | | | | | | | | The mutex mmc_test_lock is initialized at every time mmc_test device is probed. Probing another mmc_test device may break the mutex, if the probe function is called while the mutex is locked. This patch fixes it by statically initializing mmc_test_lock. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * mmc_block: handle error from mmc_register_driver()Akinobu Mita2008-09-201-2/+7
| | | | | | | | | | | | | | | | Check error from mmc_register_driver() and properly unwind block device registration. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* | drivers/mmc/card/block.c: fix refcount leak in mmc_block_open()Andrew Morton2008-09-051-1/+3
|/ | | | | | | | | | | | | | mmc_block_open() increments md->usage although it returns with -EROFS when default mounting a MMC/SD card with write protect switch on. This reference counting bug prevents /dev/mmcblkX from being released on card removal, and situation worsen with reinsertion until the minor number range runs out. Reported-by: <sasin@solomon-systech.com> Acked-by: Pierre Ossman <drzeus-list@drzeus.cx> Cc: <stable@kernel.org> [2.6.25.x, 2.6.26.x] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* mmc_block: use proper sg iteratorsPierre Ossman2008-08-011-6/+11
| | | | Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc_test: Revert "mmc_test: test oversized sg lists"Pierre Ossman2008-08-011-82/+3
| | | | | | | | This reverts commit 48b5352ea1891455eb8e824cf7d92f66931a090f. Oversized sg lists are not allowed anymore, and the core even checks for them in debug mode, so this test is entirely incorrect. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc_test: print message when attaching to cardPierre Ossman2008-07-231-0/+2
| | | | | | | | Make it a bit more obvious that the card has been claimed by the mmc_test driver so that people don't have to wonder why their block device never shows up. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc_block: bounce buffer highmem supportPierre Ossman2008-07-231-66/+31
| | | | | | | Support highmem pages in the bounce buffer code by using the sg_copy_from/to_buffer() functions. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc_test: test oversized sg listsPierre Ossman2008-07-231-3/+82
| | | | | | | | Add tests that make sure the driver properly checks the blocks and blksz fields and doesn't assume the sg list has a size that perfectly matches the current request. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc_test: highmem testsPierre Ossman2008-07-231-1/+137
| | | | | | | | | | Add a couple of tests to make sure the host driver handles highmem memory pages properly. Unfortunately there is no way to guarantee an allocation below 4 GB in i386, so it might give you addresses that are out of reach for the hardware (OTOH, so will any other highmem allocation in the kernel). Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio_uart: Fix SDIO break control to now return success or an errorDavid Howells2008-07-151-3/+6
| | | | | | | This is a consequence of patch 9ea761bfef52c116fed4715d4043392c2503fe6a. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: remove multiwrite capabilityPierre Ossman2008-07-151-28/+19
| | | | | | | | | | Relax requirements on host controllers and only require that they do not report a transfer count than is larger than the actual one (i.e. a lower value is okay). This is how many other parts of the kernel behaves so upper layers should already be prepared to handle that scenario. This gives us a performance boost on MMC cards. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc_test: cleanupPierre Ossman2008-07-151-190/+364
| | | | | | | Clean up and reorganise the mmc_test driver so that it (hopefully) is easier to extend with more complex tests. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc_block: wait for card even on failuresPierre Ossman2008-07-151-4/+9
| | | | | | | | Many failures are non-permanent, but the card might need some time to finish what it is doing before becoming responsive again. Make sure we wait for it to finish programming before dealing with the error. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc_test: only bind to supported cardsPierre Ossman2008-07-151-1/+4
| | | | | | | We can only perform the tests on MMC and SD cards, so avoid binding to any other type. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc_test: add test case controlPierre Ossman2008-07-151-2/+8
| | | | | | | Add the ability to run just a single test case by writing the test case number into the sysfs "test" file. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: Fix crash in mmc_block on 64-bitBen Collins2008-06-051-1/+1
| | | | | | | | | | Fairly simple. "dev_use" was being allocated as a zero length array because of bad math on 64-bit systems, causing a crash in find_first_zero_bit(). One-liner follows: Signed-off-by: Ben Collins <ben.collins@canonical.com> Acked-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* mmc: mmc host test driverPierre Ossman2008-05-143-0/+905
| | | | | | | A dummy driver that performs a series of requests that are often mis- handled by host drivers. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* blk_end_request: changing mmc (take 4)Kiyoshi Ueda2008-01-282-21/+7
| | | | | | | | | | This patch converts mmc to use blk_end_request interfaces. Related 'uptodate' arguments are converted to 'error'. Cc: Pierre Ossman <drzeus-mmc@drzeus.cx> Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com> Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* sdio_uart: fix sign of paramter status in sdio_uart_receive_chars()Andre Haupt2007-11-291-1/+1
| | | | | | | | | This also fixes a sparse warning about different signedness. Only compile tested, because i do not have the hardware. Signed-off-by: Andre Haupt <andre@bitwigglers.org> Acked-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: Add missing sg_init_table() callHaavard Skinnemoen2007-11-271-1/+2
| | | | | | | | | mmc_init_queue only initializes the scatterlists with sg_init_table() when using a bounce buffer. This leads to a BUG() when CONFIG_DEBUG_SG is set. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* mmc: Avoid re-using minor numbers before the original device is closed.David Woodhouse2007-11-211-8/+6
| | | | | | | | | Move the code which marks the minor number as free to mmc_blk_put() so that it happens on the final close() (or removal), instead of doing it at removal even when the device is still logically open. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc_block: check card state after writePierre Ossman2007-11-211-1/+7
| | | | | | | Some cards have been reported to signal that they're ready prematurely. Checking both the busy bit and card state solves the issue. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: Fix sg helper copy-and-paste errorRoland Dreier2007-11-081-1/+1
| | | | | | | | | | | | | | | Commit 45711f1a ("[SG] Update drivers to use sg helpers") had the following bogus change in drivers/mmc/card/queue.c: > - src_buf = page_address(src->page) + src->offset; > + src_buf = sg_virt(dst); (Notice that "src" is converted to "dst"). Turn this "dst" back into the intended "src". Signed-off-by: Roland Dreier <roland@digitalvampire.org> Tested-by: Romano Giannetti <romano.giannetti@gmail.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* [SG] Update drivers to use sg helpersJens Axboe2007-10-221-7/+8
| | | | Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* mmc: need to zero sglist on initJens Axboe2007-10-161-3/+3
| | | | | | | | Otherwise we could have junk in the sg fields, fooling the sg chaining into thinking ->page is valid. Acked-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* MMC/SD card driver learns SPIDavid Brownell2007-09-231-8/+15
| | | | | | | | | | | | | Teaching the MMC/SD block card driver about SPI. - Provide the SPI response type flags with each request issued. - Understand that multiblock SPI writes don't use STOP_TRANSMISSION. - Correct check for APP_CMD failure. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: fix recursion issues between sdio-uart driver and tty layerNicolas Pitre2007-09-231-2/+19
| | | | | | | | | | | | | | | | | | | In a few places, sdio_uart_irq() is called directly instead of waiting for the actual interrupt to be raised and the SDIO IRQ thread scheduled in order to reduce latency. However, some interaction with the tty core may end up calling us back (serial echo, flow control, etc.) creating two issues: - the host lock gets claimed twice from the same thread causing a deadlock; - the same direct calls to sdio_uart_irq() may be performed causing unexpected reentrancy into the IRQ handler. This patch handles both of those issues. Signed-off-by: Nicolas Pitre <npitre@mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: add default c_ispeed/c_ospeed values to sdio_uart driverNicolas Pitre2007-09-231-0/+2
| | | | | | | | | Note that the default baudrate is 4800 instead of 9600 as a convenience because that's what GPS devices want which is still the main use for this driver. Signed-off-by: Nicolas Pitre <npitre@mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: add /proc interface to sdio_uart driverNicolas Pitre2007-09-231-0/+62
| | | | | | | This mimics what the serial_core does. Useful for diagnostics. Signed-off-by: Nicolas Pitre <npitre@mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: UART/GPS driverNicolas Pitre2007-09-233-0/+1086
| | | | | | | | This currently only accepts the GPS class since that's all I have for testing. Tested with a Matsushita GPS and gpsd version 2.34. Signed-off-by: Nicolas Pitre <npitre@mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: remove confusing flagPierre Ossman2007-09-231-1/+0
| | | | | | | | The MMC_DATA_MULTI flag never had a proper definition of what it means, so remove it and let the drivers check the block count in the request. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: mmc_set_data_timeout() parameter write is redundantPierre Ossman2007-09-231-2/+2
| | | | | | | | The write parameter in mmc_set_data_timeout() is redundant as the data structure contains information about the direction of the transfer. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: remove custom error codesPierre Ossman2007-09-231-2/+2
| | | | | | | Convert the MMC layer to use standard error codes and not its own, incompatible values. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: reorganize bounce buffer initPierre Ossman2007-08-091-7/+7
| | | | | | | Reorganize the code that initializes mmc_block's bounce buffer in order to avoid warnings when MMC_BLOCK_BOUNCE isn't used. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* Merge branch 'for-linus' of ↵Linus Torvalds2007-07-261-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: drivers/mmc/core/: make 3 functions static mmc: add missing printk levels mmc: remove redundant debug information from sdhci and wbsd mmc: proper debugging output in core mmc: be more verbose about card insertions/removal mmc: Don't hold lock when releasing an added card mmc: add a might_sleep() to mmc_claim_host() mmc: update kerneldoc mmc: update header file paths sdhci: add support to ENE-CB714 mmc: check error bits before command completion
| * mmc: update header file pathsPierre Ossman2007-07-261-1/+1
| | | | | | | | | | | | | | Make sure all headers in the files reflect their true position in the tree. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
OpenPOWER on IntegriCloud