- 05 9月, 2012 1 次提交
-
-
由 Ian Chen 提交于
For several MoviNAND eMMC parts, there are known issues with secure erase and secure trim. For these specific MoviNAND devices, we skip these operations. Specifically, there is a bug in the eMMC firmware that causes unrecoverable corruption when the MMC is erased with MMC_CAP_ERASE enabled. References: http://forum.xda-developers.com/showthread.php?t=1644364 https://plus.google.com/111398485184813224730/posts/21pTYfTsCkB#111398485184813224730/posts/21pTYfTsCkBSigned-off-by: NIan Chen <ian.cy.chen@samsung.com> Reviewed-by: NNamjae Jeon <linkinjeon@gmail.com> Acked-by: NJaehoon Chung <jh80.chung@samsung.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Cc: stable <stable@vger.kernel.org> [3.0+] Signed-off-by: NChris Ball <cjb@laptop.org>
-
- 11 7月, 2012 1 次提交
-
-
由 Subhash Jadavani 提交于
For completing any block request, MMC block driver is calling: spin_lock_irq(queue) __blk_end_request() spin_unlock_irq(queue) But if we analyze the sources of latency in kernel using ftrace, __blk_end_request() function at times may take up to 6.5ms with spinlock held and irq disabled. __blk_end_request() calls couple of functions and ftrace output shows that blk_update_bidi_request() function is almost taking 6ms. There are 2 function to end the current request: ___blk_end_request() and blk_end_request(). Both these functions do same thing except that blk_end_request() function doesn't take up the spinlock while calling the blk_update_bidi_request(). This patch replaces all __blk_end_request() calls with blk_end_request() and __blk_end_request_all() calls with blk_end_request_all(). Testing done: 20 process concurrent read/write on sd card and eMMC. Ran this test for almost a day on multicore system and no errors observed. This change is not meant for improving MMC throughput; it's basically about becoming fair to other threads/interrupts in the system. By holding spin lock and interrupts disabled for longer duration, we won't allow other threads/interrupts to run at all. Actually slight performance degradation at file system level can be expected as we are not holding the spin lock during blk_update_bidi_request() which means our mmcqd thread may get preempted for other high priority thread or any interrupt in the system. These are performance numbers (100MB file write) with eMMC running in DDR mode: Without this patch: Name of the Test Value Unit LMDD Read Test 53.79 MBPS LMDD Write Test 18.86 MBPS IOZONE Read Test 51.65 MBPS IOZONE Write Test 24.36 MBPS With this patch: Name of the Test Value Unit LMDD Read Test 52.94 MBPS LMDD Write Test 16.70 MBPS IOZONE Read Test 52.08 MBPS IOZONE Write Test 23.29 MBPS Read numbers are fine. Write numbers are bit down (especially LMDD write), may be because write requests normally have large transfer size and which means there are chances that while mmcq is executing blk_update_bidi_request(), it may get interrupted by interrupts or other high priority thread. Signed-off-by: NSubhash Jadavani <subhashj@codeaurora.org> Reviewed-by: NNamjae Jeon <linkinjeon@gmail.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
- 27 6月, 2012 1 次提交
-
-
由 Subhash Jadavani 提交于
If multi block write operation fails for SD card, during error handling we send the SD_APP_SEND_NUM_WR_BLKS (ACMD22) to know how many blocks were already programmed by card. But mmc_sd_num_wr_blocks() function which sends the ACMD22 calculates the data timeout value from csd.tacc_ns and csd.tacc_clks parameters which will be 0 for block addressed (>2GB cards) SD card. This would result in timeout_ns and timeout_clks being 0 in the mmc_request passed to host driver. This means host controller would program its data timeout timer value with 0 which could result in DATA TIMEOUT errors from controller. To fix this issue, mmc_sd_num_wr_blocks() should instead just call the mmc_set_data_timeout() to calculate the data timeout value. mmc_set_data_timeout() function ensures that non zero timeout value is set even for block addressed SD cards. Signed-off-by: NSubhash Jadavani <subhashj@codeaurora.org> Reviewed-by: NVenkatraman S <svenkatr@ti.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
- 17 5月, 2012 1 次提交
-
-
由 Saugata Das 提交于
This patch adds support for large sector size of 4KB by disabling emulation. This patch passes eMMC DATA_SECTOR_SIZE as the logical block size during mmc_blk_alloc_req. In order to use this patch for 4KB sector size, ensure that USE_NATIVE_SECTOR is enabled, partition table is 4KB sector size aligned and file system block and sector size are 4KB multiples. Signed-off-by: NSaugata Das <saugata.das@linaro.org> Reviewed-by: NSubhash Jadavani <subhashj@codeaurora.org> Reviewed-by: NNamjae Jeon <linkinjeon@gmail.com> Reviewed-by: NSubhash Jadavani <subhashj@codeaurora.org> Signed-off-by: NChris Ball <cjb@laptop.org>
-
- 10 5月, 2012 1 次提交
-
-
由 Philippe De Swert 提交于
After the null check on md the code jumped to cmd_done, which then will dereference md in mmc_blk_put. This patch avoids the possible null pointer dereference in that case. Signed-off-by: NPhilippe De Swert <philippedeswert@gmail.com> Reviewed-by: NNamjae Jeon <linkinjeon@gmail.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
- 21 4月, 2012 2 次提交
-
-
由 Chuanxiao Dong 提交于
MMC bus is using legacy suspend/resume method, which is not compatible if runtime pm callbacks are used. In this scenario, MMC bus suspend/resume callbacks cannot be called when system entering S3. So change to use the new defined dev_pm_ops for system sleeping mode. Tested on AM335x Platform. Solves major issue/crash reported at http://www.mail-archive.com/linux-omap@vger.kernel.org/msg65425.htmlSigned-off-by: NChuanxiao Dong <chuanxiao.dong@intel.com> Tested-by: NHebbar, Gururaja <gururaja.hebbar@ti.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Acked-by: NUlf Hansson <ulf.hansson@stericsson.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Adrian Hunter 提交于
eMMC v4.5 sanitize operation erases all copies of unmapped data. However trim or erase operations must be used first to unmap the required sectors. That was not being done. Fixes apply to linux 3.2 on. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Cc: <stable@vger.kernel.org> Acked-by: NJaehoon Chung <jh80.chung@samsung.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NChris Ball <cjb@laptop.org>
-
- 06 4月, 2012 1 次提交
-
-
由 Ulf Hansson 提交于
According to the specifications for SD and (e)MMC default blocksize (named BLOCKLEN in Spec.) must always be 512 bytes. Since we hardcoded to always use 512 bytes, we do not explicitly have to set it. Future improvements should potentially make it possible to use a greater blocksize than 512 bytes, but until then let's skip this. Signed-off-by: NUlf Hansson <ulf.hansson@stericsson.com> Reviewed-by: NSubhash Jadavani <subhashj@codeauora.org> Signed-off-by: NChris Ball <cjb@laptop.org>
-
- 29 3月, 2012 1 次提交
-
-
由 David Howells 提交于
Remove all #inclusions of asm/system.h preparatory to splitting and killing it. Performed with the following command: perl -p -i -e 's!^#\s*include\s*<asm/system[.]h>.*\n!!' `grep -Irl '^#\s*include\s*<asm/system[.]h>' *` Signed-off-by: NDavid Howells <dhowells@redhat.com>
-
- 26 3月, 2012 1 次提交
-
-
由 Saugata Das 提交于
MMC-4.5 data tag feature will be used to store the file system meta-data in the tagged region of eMMC. This will improve the write and subsequent read transfer time for the meta data. Signed-off-by: NSaugata Das <saugata.das@linaro.org> Tested-by: NVenkatraman S <svenkatr@ti.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
- 21 3月, 2012 1 次提交
-
-
由 Al Viro 提交于
all of those should be umode_t... Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
- 14 2月, 2012 1 次提交
-
-
由 Rabin Vincent 提交于
Signed-off-by: NRabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: NJohan Rudholm <johan.rudholm@stericsson.com> Signed-off-by: NUlf Hansson <ulf.hansson@stericsson.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NNamjae Jeon <linkinjeon@gmail.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
- 12 1月, 2012 4 次提交
-
-
由 Sujit Reddy Thumma 提交于
Kill block requests when the host realizes that the card is removed from the slot and is sure that subsequent requests are bound to fail. Do this silently so that the block layer doesn't output unnecessary error messages. Signed-off-by: NSujit Reddy Thumma <sthumma@codeaurora.org> Acked-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Johan Rudholm 提交于
Enable boot partitions to be read-only locked until next power on via a sysfs entry. There will be one sysfs entry for each boot partition: /sys/block/mmcblkXbootY/ro_lock_until_next_power_on Each boot partition is locked by writing 1 to its file. Signed-off-by: NJohan Rudholm <johan.rudholm@stericsson.com> Signed-off-by: NJohn Beckett <john.beckett@stericsson.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Johan Rudholm 提交于
If the read or write buffer size associated with the command sent through the mmc_blk_ioctl is zero, do not prepare data buffer. This enables a ioctl(2) call to for instance send a MMC_SWITCH to set a byte in the ext_csd. Signed-off-by: NJohan Rudholm <johan.rudholm@stericsson.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Chris Ball 提交于
No functional change; adds macros for card manufacturer IDs. Signed-off-by: NChris Ball <cjb@laptop.org> Cc: Andrei E. Warkentin <andrey.warkentin@gmail.com> Cc: Stefan Nilsson XK <stefan.xk.nilsson@stericsson.com>
-
- 11 12月, 2011 1 次提交
-
-
由 Stefan Nilsson XK 提交于
Adds a quirk that sets the data read timeout to a fixed value instead of relying on the information in the CSD. The timeout value chosen is 300ms since that has proven enough for the problematic cards found, but could be increased if other cards require this. This patch also enables this quirk for certain Micron cards known to have this problem. Signed-off-by: NStefan Nilsson XK <stefan.xk.nilsson@stericsson.com> Signed-off-by: NUlf Hansson <ulf.hansson@stericsson.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Cc: <stable@kernel.org> Signed-off-by: NChris Ball <cjb@laptop.org>
-
- 27 10月, 2011 10 次提交
-
-
由 Paul Walmsley 提交于
Due to hardware bugs, some MMC host controllers don't support multiple-block reads[1]. To resolve, add a new MMC capability flag, MMC_CAP2_NO_MULTI_READ, which can be set by affected host controller drivers. When this capability is set, all reads will be issued one sector at a time. 1. See for example Advisory 2.1.1.128 "MMC: Multiple Block Read Operation Issue" in _OMAP3530/3525/3515/3503 Silicon Errata_ Revision F (October 2010) (SPRZ278F), available from http://focus.ti.com/lit/er/sprz278f/sprz278f.pdfSigned-off-by: NPaul Walmsley <paul@pwsan.com> Cc: Dave Hylands <dhylands@gmail.com> Tested-by: NSteve Sakoman <sakoman@gmail.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Seungwon Jeon 提交于
This patch adds cache feature of eMMC4.5 Spec. If device supports cache capability, host can utilize some specific operations. Signed-off-by: NSeungwon Jeon <tgih.jun@samsung.com> Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Kyungmin Park 提交于
MMC v4.5 supports the DISCARD feature (CMD38). It's different from trim and there's no check bit. Currently it's only supported at v4.5. Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Kyungmin Park 提交于
In the v4.5, there's no secure erase & trim support. Instead it supports the sanitize feature. Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Girish K S 提交于
All the files using printk function for displaying kernel messages in the mmc driver have been replaced with corresponding macro. Signed-off-by: NGirish K S <girish.shivananjappa@linaro.org> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Namjae Jeon 提交于
It allows gerneral purpose partitions in MMC Device. And I try to simply make mmc_blk_alloc_parts using mmc_part structure suggested by Andrei Warkentin. After patching, we see general purpose partitions like this: > cat /proc/partitions 179 0 847872 mmcblk0 179 192 4096 mmcblk0gp3 179 160 4096 mmcblk0gp2 179 128 4096 mmcblk0gp1 179 96 1052672 mmcblk0gp0 179 64 1024 mmcblk0boot1 179 32 1024 mmcblk0boot0 Signed-off-by: NNamjae Jeon <linkinjeon@gmail.com> Acked-by: NAndrei Warkentin <awarkentin@vmware.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Adrian Hunter 提交于
Intel Medfield platform blocks access to eMMC boot partitions which results in switch errors. Since there is no access, mmcboot0/1 devices should not be created. Add a host capability to reflect that. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Adrian Hunter 提交于
In the case of a switch error, do not update partition config as though the switch succeeded, and ensure blk_end_request is called on the failed request. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Acked-by: NAndrei Warkentin <andrey.warkentin@gmail.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Adrian Hunter 提交于
For cards that support hardware reset (just eMMC), try a reset and retry before returning an I/O error. However this is not done for ECC errors and is never done twice for the same operation type (READ, WRITE, DISCARD, SECURE DISCARD) until that type of operation again succeeds. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Venkatraman S 提交于
Fix the sparse warning output "warning: Using plain integer as NULL pointer" Signed-off-by: NVenkatraman S <svenkatr@ti.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
- 23 8月, 2011 1 次提交
-
-
由 Christoph Hellwig 提交于
Add a new REQ_PRIO to let requests preempt others in the cfq I/O schedule, and lave REQ_META purely for marking requests as metadata in blktrace. All existing callers of REQ_META except for XFS are updated to also set REQ_PRIO for now. Signed-off-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NNamhyung Kim <namhyung@gmail.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
- 21 7月, 2011 8 次提交
-
-
由 Jaehoon Chung 提交于
We already check for ongoing async transfers when handling discard requests, but not in mmc_blk_issue_flush(). This patch fixes that omission. Tested with an SDHCI controller and eMMC4.41. Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Acked-by: NPer Forlin <per.forlin@linaro.org> Cc: <stable@kernel.org> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Per Forlin 提交于
Change mmc_blk_issue_rw_rq() to become asynchronous. The execution flow looks like this: * The mmc-queue calls issue_rw_rq(), which sends the request to the host and returns back to the mmc-queue. * The mmc-queue calls issue_rw_rq() again with a new request. * This new request is prepared in issue_rw_rq(), then it waits for the active request to complete before pushing it to the host. * When the mmc-queue is empty it will call issue_rw_rq() with a NULL req to finish off the active request without starting a new request. Signed-off-by: NPer Forlin <per.forlin@linaro.org> Acked-by: NKyungmin Park <kyungmin.park@samsung.com> Acked-by: NArnd Bergmann <arnd@arndb.de> Reviewed-by: NVenkatraman S <svenkatr@ti.com> Tested-by: NSourav Poddar <sourav.poddar@ti.com> Tested-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Per Forlin 提交于
Break out code without functional changes. This simplifies the code and makes way for handling two parallel requests. Signed-off-by: NPer Forlin <per.forlin@linaro.org> Acked-by: NKyungmin Park <kyungmin.park@samsung.com> Acked-by: NArnd Bergmann <arnd@arndb.de> Reviewed-by: NVenkatraman S <svenkatr@ti.com> Tested-by: Sourav Poddar<sourav.poddar@ti.com> Tested-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Per Forlin 提交于
Break out code from mmc_blk_issue_rw_rq to create a block request prepare function. This doesn't change any functionallity. This helps when handling more than one active block request. Signed-off-by: NPer Forlin <per.forlin@linaro.org> Acked-by: NKyungmin Park <kyungmin.park@samsung.com> Acked-by: NArnd Bergmann <arnd@arndb.de> Reviewed-by: NVenkatraman S <svenkatr@ti.com> Tested-by: NSourav Poddar <sourav.poddar@ti.com> Tested-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Per Forlin 提交于
The way the request data is organized in the mmc queue struct, it only allows processing of one request at a time. This patch adds a new struct to hold mmc queue request data such as sg list, request, blk request and bounce buffers, and updates any functions depending on the mmc queue struct. This prepares for using multiple active requests in one mmc queue. Signed-off-by: NPer Forlin <per.forlin@linaro.org> Acked-by: NKyungmin Park <kyungmin.park@samsung.com> Acked-by: NArnd Bergmann <arnd@arndb.de> Reviewed-by: NVenkatraman S <svenkatr@ti.com> Tested-by: NSourav Poddar <sourav.poddar@ti.com> Tested-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Russell King - ARM Linux 提交于
Check the status bits in the r/w command response for any errors. If error bits are set, then we won't have seen any data transferred, so it's pointless doing any further checking. Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Tested-by: NPawel Moll <pawel.moll@arm.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Russell King - ARM Linux 提交于
Command channel errors fall into four classes: 1. The command was issued with the card in the wrong state 2. The command failed to be received by the card correctly 3. The cards response failed to be received by the host (CRC error) 4. The card failed to respond to the card For (1), in theory we should know that the card is in the correct state. However, a failed stop command (or other failure) may result in the card remaining in a data transfer state from the previous command. If we detect this condition, we try to recover by sending a stop command. For the initial commands (set block count and the read/write command) no data will have been transferred. All that we need deal with is retrying at this point. A failed stop command can be remedied as above. If we are unable to recover the card (eg, the card ignores our requests for status, or we don't recognise the error code) then we immediately fail the request. Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Tested-by: NPawel Moll <pawel.moll@arm.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Russell King - ARM Linux 提交于
If the MMC_SEND_STATUS command is not successful, we should not return a zero status word, but instead allow the caller to know positively that an error occurred. Convert the open-coded get_card_status() to use the helper function, and provide definitions for the card state field. Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Tested-by: NPawel Moll <pawel.moll@arm.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
- 26 6月, 2011 2 次提交
-
-
由 Adrian Hunter 提交于
For example, an eMMC with 2 boot partitions will have 3 threads. The names change from: 40 ? 00:00:00 mmcqd/0 41 ? 00:00:00 mmcqd/0 42 ? 00:00:00 mmcqd/0 to: 40 ? 00:00:00 mmcqd/0 41 ? 00:00:00 mmcqd/0boot0 42 ? 00:00:00 mmcqd/0boot1 Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Cc: Andrei Warkentin <andreiw@motorola.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Adrian Hunter 提交于
The MMC block driver and other drivers (e.g. mmc-test) will expect the card to be switched to the User Data Area eMMC partition when they start. Hence the MMC block driver should ensure it is that way when it is removed. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Cc: Andrei Warkentin <andreiw@motorola.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
- 26 5月, 2011 2 次提交
-
-
由 Andrei Warkentin 提交于
SD cards operating at UHS104 or better support SET_BLOCK_COUNT. Signed-off-by: NAndrei Warkentin <andreiw@motorola.com> Reviewed-by: NArindam Nath <arindam.nath@amd.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Andrei Warkentin 提交于
CMD23-prefixed instead of open-ended multiblock transfers have a performance advantage on some MMC cards. Signed-off-by: NAndrei Warkentin <andreiw@motorola.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-