Yocto Project Linux Firmware
  1. Yocto Project Linux Firmware

linux-wandboard

Public

Network

 
AuthorCommitMessageCommit Date
Ulf HanssonUlf Hansson
ef55043fdfammc: core: First step in cleaning up private mmc header files This is the first step in cleaning up the private mmc header files. In this change we makes sure each header file builds standalone, as that helps to resolve dependencies. While changing this, it also seems reasonable to stop including other headers from inside a header itself which it don't depend upon. Additionally, in some cases such dependencies are better resolved by forward declaring the needed struct. Signed-off-by: Ulf H...
Ulf HanssonUlf Hansson
972e551574fmmc: core: First step in cleaning up public mmc header files This is the first step in cleaning up the public mmc header files. In this change we makes sure each header file builds standalone, as that helps to resolve dependencies. While changing this, it also seems reasonable to stop including other headers from inside a header itself which it don't depend upon. Additionally, in some cases such dependencies are better resolved by forward declaring the needed struct. Signed-off-by: Ulf Han...
Ulf HanssonUlf Hansson
e8993440d69mmc: mxcmmc: Include interrupt.h in the platform data header The mxcmmc platform data header depends on interrupt.h. Don't rely on the public mmc header host.h to include it, bud instead make that dependency explicit. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit 8336bf68b57e1e736be8d4ef1f46a789fe7b9bde)
Shawn LinShawn Lin
f7234e24e7ammc: sdio: don't use rocr to check if the card could support UHS mode Per SDIO Simplified Specification V3, section 3.1.2, A host that supports UHS-I sets S18R to 1 in the argument of CMD5 to request a change of the signal voltage to 1.8V. If the card supports UHS-I and the current signal voltage is 3.3V, S18A is set to 1 in the R4 response. If the signal voltage is already 1.8V, the card sets S18A to 0 so that host maintains the current signal voltage. UHS-I is supported in SD mode and S18A...
Shawn LinShawn Lin
5edfe83904ammc: sdio: Factor out retry init card helper function Add new helper function, mmc_sdio_resend_if_cond, to be reused when trying to retry the init sequence. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit 0eb51a58ad823b2081c69ec1cf165833dd11c450)
Markus ElfringMarkus Elfring
a474dfe62d9mmc: core: Use kmalloc_array() in mmc_alloc_sg() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. * Replace the specification of a data structure by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: M...
Markus ElfringMarkus Elfring
3742a2a5c49mmc: mmc_test: Use kcalloc() in mmc_test_alloc_mem() * The script "checkpatch.pl" pointed information out like the following. WARNING: Prefer kcalloc over kzalloc with multiply Thus fix the affected source code place. * Replace the specification of a data structure by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Reviewed-by: Linus Walleij...
Markus ElfringMarkus Elfring
cfe55f3ea60mmc: mmc_test: Improve a size determination in five functions Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gm...
Markus ElfringMarkus Elfring
cc4600541cammc: mmc_test: Combine substrings for 5 messages The script "checkpatch.pl" pointed information out like the following. WARNING: quoted string split across lines Thus fix affected source code places. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked fro...
Markus ElfringMarkus Elfring
cc013e20997mmc: mmc_test: Add some spaces for better code readability Use space characters at some source code places according to the Linux coding style convention. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit fda02ea814f92d11a2400ec583b4d83cbb633ad0)
Markus ElfringMarkus Elfring
60d2fc54440mmc: mmc_test: Use seq_puts() in mtf_testlist_show() The script "checkpatch.pl" pointed information out like the following. WARNING: Prefer seq_puts to seq_printf Thus fix the affected source code place. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked...
Markus ElfringMarkus Elfring
e76410f6a2dmmc: mmc_test: Fix a typo in a comment line Add a missing character in the function description. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit 74536bc0834fbfd5ead74beef20f9ba387df6a5a)
Markus ElfringMarkus Elfring
ef2e0323ad4mmc: mmc_test: Use kmalloc_array() in mmc_test_area_init() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. * Replace the specification of a data structure by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed...
yangbo luyangbo lu
107924335a2mmc: sdhci-esdhc: clean up register definitions The eSDHC register definitions in header file were messy and confusing. This patch is to clean up these definitions. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit a6b448884a5f8eed5fec888f918aef26be338912)
Ulf HanssonUlf Hansson
7a6147a0638mmc: host: Include interrupt.h in mmc host drivers that depends on it An mmc host driver shouldn't rely on interrupt.h being included by another public mmc header. Instead make that dependency explicit by including interrupt.h in those host drivers that depends on it. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> (cherry picked from commit b8789ec482bbbf52f62631e25b6c8648fa834efc) Conflicts: drivers/mmc/host/davinci_mmc.c driver...
Ulf HanssonUlf Hansson
047e3b85ab5mmc: sdhci: Include leds.h Don't rely on host.h to include the leds.h header, but instead include it explicitly because the driver depends on it. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Adrian Hunter <adrian.hunter@intel.com> (cherry picked from commit 210583f47293c3a4a96a7e0d3e10b3210d542656)
Masahiro YamadaMasahiro Yamada
3b3c47183b5mmc: use empty initializer list to zero-clear structures In the MMC subsystem, we see such initializers that only clears the first member explicitly. For example, struct mmc_request mrq = {NULL}; sets the first member (.sbc) to NULL explicitly. However, this is an unstable form because we may insert a non-pointer member at the top of the struct mmc_request in the future. (if we do so, the compiler will spit warnings.) So, using a designated initializer is preferred coding style. The ...
Geert UytterhoevenGeert Uytterhoeven
c829a496b07mmc: block: Replace "goto retry" by a proper do / while loop Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit 164b50b353908c79b551b3658e37f29182e2c0b3)
Geert UytterhoevenGeert Uytterhoeven
5efb5ddb9f2mmc: block: Avoid uninitialized warning in mmc_blk_issue_discard_rq() With gcc-4.1.2: mmc/core/block.c: In function ‘mmc_blk_issue_discard_rq’: mmc/core/block.c:1150: warning: ‘arg’ may be used uninitialized in this function mmc/core/block.c:1150: warning: ‘nr’ may be used uninitialized in this function mmc/core/block.c:1150: warning: ‘from’ may be used uninitialized in this function While this is a false positive, it can be avoided easily by jumping over the checks for "er...
Jungseung LeeJungseung Lee
ba908c28c91mmc: core: Export device lifetime information through sysfs In the eMMC 5.0 version of the spec, several EXT_CSD fields about device lifetime are added. - Two types of estimated indications reflected by averaged wear out of memory - An indication reflected by average reserved blocks Export the information through sysfs. Signed-off-by: Jungseung Lee <js07.lee@samsung.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: ...
Christoph HellwigChristoph Hellwig
85ae70f0137mmc: remove pointless request type check in mmc_prep_request The block layer won't send requests the driver isn't asking for, so remove this check. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com> (cherry picked from commit 261c83c1a9e5b74e41037cc804e8b9ae21623ddd)
Ulf HanssonUlf Hansson
9f8d06f6ee2mmc: core: Restore parts of the polling policy when switch to HS/HS DDR Regressions for not being able to detect an eMMC HS DDR mode card has been reported for the sdhci-esdhc-imx driver, but potentially other sdhci variants may suffer from the similar problem. The commit e173f8911f09 ("mmc: core: Update CMD13 polling policy when switch to HS DDR mode"), is causing the problem. It seems that change moved one step to far, regarding changing the host's timing before polling for a busy card. ...
Adrian HunterAdrian Hunter
fb0c93445a2mmc: core: Further fix thread wake-up Commit e0097cf5f2f1 ("mmc: queue: Fix queue thread wake-up") did not go far enough. mmc_wait_for_data_req_done() still contains some problems and can be further simplified. First it should not touch context_info->is_waiting_last_req because that is a wake-up control used by the owner of the context. Secondly, it should always return when one of its wake-up conditions is met because, again, that is contolled by the owner of the context. While the curren...
Adrian HunterAdrian Hunter
d13fa7ace33mmc: sdhci: Fix to handle MMC_POWER_UNDEFINED Since commit c2c24819b280 ("mmc: core: Don't power off the card when starting the host"), the power state can still be MMC_POWER_UNDEFINED after mmc_start_host() is called. That can trigger a warning in SDHCI during runtime resume as it tries to restore the I/O state. Handle MMC_POWER_UNDEFINED simply by not updating the I/O state in that case. Fixes: c2c24819b280 ("mmc: core: Don't power off the card when starting the host") Signed-off-by: Adri...
Ulf HanssonUlf Hansson
7820d749869mmc: block: Move files to core Once upon a time it made sense to keep the mmc block device driver and its related code, in its own directory called card. Over time, more an more functions/structures have become shared through generic mmc header files, between the core and the card directory. In other words, the relationship between them has become closer. By sharing functions/structures via generic header files, it becomes easy for outside users to abuse them. In a way to avoid that from ha...
Masahiro YamadaMasahiro Yamada
1c6e296d713mmc: sdhci: export sdhci_execute_tuning() Some SDHCI-compat controllers support not only SD, but also eMMC, but they use different commands for tuning: CMD19 for SD, CMD21 for eMMC. Due to the difference of the underlying mechanism, some controllers (at least, the Cadence IP is the case) provide their own registers for the eMMC tuning. This commit will be useful when we want to override .execute_tuning callback (for eMMC HS200 tuning), but still let it fall back to sdhci_execute_tuning() f...
Adrian HunterAdrian Hunter
d980f84a995mmc: sdhci: Tidy tuning loop Tidy the tuning loop by moving it to a separate function and making it a for-loop. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit 6b11e70bb72c5bfbd7d1544518d26d4b1100aae1) Conflicts: drivers/mmc/host/sdhci.c
Adrian HunterAdrian Hunter
b1f7b8cfda5mmc: sdhci: Simplify tuning block size logic There are only 2 possible block sizes, so simplify 2 if-statements into 1. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit 85336109c0b272d8d0b4509872e1247d948ddfa9)
Adrian HunterAdrian Hunter
13592d515d5mmc: sdhci: Factor out tuning helper functions Factor out some functions to tidy up the code in sdhci_execute_tuning. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit da4bc4f2851e3c46076929a8c9a99ee3e076cf1f)
Adrian HunterAdrian Hunter
cf664371fb2mmc: sdhci: Use mmc_abort_tuning() Use mmc_abort_tuning() instead of open-coding the stop command. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit d0c3ab59105dd0192fc9bc3a578584a5b1c01dd0)
Adrian HunterAdrian Hunter
9e6227be61fmmc: mmc: Introduce mmc_abort_tuning() If a tuning command times out, the card could still be processing it, which will cause problems for recovery. The eMMC specification says that CMD12 can be used to stop CMD21, so add a function that does that. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit e711f0309109701cb422aab44ace4ea0dccb89ea)
Adrian HunterAdrian Hunter
89ed5352c4bmmc: sdhci: Always allow tuning to fall back to fixed sampling SDHCI falls back to fixed sampling if there is an error during tuning. However it also reports an error unless there is periodic re-tuning. That is not the best option because: a) there is a reasonable chance that fixed sampling will work, especially at room temperature. b) re-tuning will be done again anyway if there are CRC errors. Change to return no error always when falling back to fixed sampling. Signed-off-by: Adrian Hunt...
Adrian HunterAdrian Hunter
cc7e4746c03mmc: sdhci: Fix tuning reset after exhausting the maximum number of loops If the driver has exhausted the maximum number of tuning loops, then fixed sampling is used. To do that both SDHCI_CTRL_TUNED_CLK and SDHCI_CTRL_EXEC_TUNING must be reset to 0, but only SDHCI_CTRL_TUNED_CLK was being reset. Reset SDHCI_CTRL_EXEC_TUNING to 0 also. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit 5ef5203b95c5090ba40e30e...
Adrian HunterAdrian Hunter
7fa7f71b40ammc: mmc: Relax checking for switch errors after HS200 switch The JEDEC specification indicates CMD13 can be used after a HS200 switch to check for errors. However in practice some boards experience CRC errors in the CMD13 response. Consequently, for HS200, CRC errors are not a reliable way to know the switch failed. If there really is a problem, we would expect tuning will fail and the result ends up the same. So change the error condition to ignore CRC errors in that case. Signed-off-by: ...
Shawn LinShawn Lin
2236635d3ffmmc: mmc_test: remove BUG_ONs and deploy error handling It is unnecessary to panic the kernel when testing mmc. Instead, cast a warning for folkz to debug and return the error code to the caller to indicate the failure of this test should be enough. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit f28ef5617254a946c1a8576dc3f243347b143794)
Shawn LinShawn Lin
ae42285f7bemmc: queue: remove BUG_ON for bounce_sg bounce_sg for mqrq_cur and mqrq_pre are proper allocated when initializing the queue and will not be freed before explicitly cleaning the queue. So from the code itself it should be quite confident to remove this check. If that BUG_ON take effects, it is mostly likely the memory is randomly oopsing. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit 8508cb9868015cad4f10d81...
Shawn LinShawn Lin
9fc19c197e3mmc: sdio_uart: remove meaningless BUG_ON The code seems quite simple to maintain the sdio_uart_table, and the insert/remove port from the table are symmetric. If the BUG_ON occurs, which means serial_core modify the index or mess up the port sequence anyway. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit 8664dccf3adb1ca3bddf5ddd11e44a0c033cad63)
Shawn LinShawn Lin
3001ba30a4dmmc: core: remove BUG_ONs from core.c BUG_ONs doesn't help anything except for stop the system from running. If it occurs, it implies we should deploy proper error handling for that. So this patch is gonna discard these meaningless BUG_ONs and deploy error handling if needed. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit 6ff897ff5c62cd0454af39734408fcec8c4cf3f3)
Shawn LinShawn Lin
008cb1a46a5mmc: core: remove BUG_ONs from sd BUG_ONs doesn't help anything except for stop the system from running. If it occurs, it implies we should deploy proper error handling for that. So this patch is gonna discard these meaningless BUG_ONs and deploy error handling if needed. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit 349583d66620a7d3eda760c82119ab7a8c253272)
Shawn LinShawn Lin
e24ffca2622mmc: core: remove BUG_ONs from mmc BUG_ONs doesn't help anything except for stop the system from running. If it occurs, it implies we should deploy proper error handling for that. So this patch is gonna discard these meaningless BUG_ONs and deploy error handling if needed. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit 8cce3ecc535daf91c6f5c895684195932a949be1)
Shawn LinShawn Lin
7f45876c4dfmmc: debugfs: remove BUG_ON from mmc_ext_csd_open Return error value for file_operations callback instead of triggering BUG_ON which is meaningless. Personally I don't believe n != EXT_CSD_STR_LEN could happen. Anyway, propagate the error to the caller. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit a48ee3e65a9e7395e8bab86728fcdc81c30a89ca)
Shawn LinShawn Lin
8a2548429b3mmc: core: remove BUG_ONs from sdio BUG_ONs doesn't help anything except for stop the system from running. If it occurs, it implies we should deploy proper error handling for that. So this patch is gonna discard these meaningless BUG_ONs and deploy error handling if needed. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit 5df0e8231f9518ee5ca3f58a0777556dd03addd6)
Adrian HunterAdrian Hunter
a3aea4d5f08mmc: mmc: Add Command Queue definitions Add definitions relating to Command Queuing. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit 925ff3a7a334b3fe968ae15f07d22df21addad26)
Adrian HunterAdrian Hunter
4441ce72d93mmc: queue: Introduce queue depth and use it to allocate and free Add a mmc_queue member to record the size of the queue, which currently supports 2 requests on-the-go at a time. Instead of allocating resources for 2 slots in the queue, allow for an arbitrary number. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit c5bda0ca6fab8e040c8ea3c71fdd16deee0f132f)
Adrian HunterAdrian Hunter
759ac3c99d4mmc: queue: Factor out mmc_queue_reqs_free_bufs() In preparation for supporting a queue of requests, factor out mmc_queue_reqs_free_bufs(). Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Harjani Ritesh <riteshh@codeaurora.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit c09949cff5eb408c30f154207ebdc706d94fe1f3)
Adrian HunterAdrian Hunter
db3db5608a0mmc: queue: Factor out mmc_queue_alloc_sgs() In preparation for supporting a queue of requests, factor out mmc_queue_alloc_sgs(). Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Harjani Ritesh <riteshh@codeaurora.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit 64e29e42a61b8b531eb77f363ddb8e507dfd35ed)
Adrian HunterAdrian Hunter
15385211d31mmc: queue: Factor out mmc_queue_alloc_bounce_sgs() In preparation for supporting a queue of requests, factor out mmc_queue_alloc_bounce_sgs(). Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Harjani Ritesh <riteshh@codeaurora.org> [Ulf: Fixed compiler warning] Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit f2b8b522cf643baa367b6834a49ff3e12cfa9136)
Adrian HunterAdrian Hunter
6aa68ea4172mmc: queue: Factor out mmc_queue_alloc_bounce_bufs() In preparation for supporting a queue of requests, factor out mmc_queue_alloc_bounce_bufs(). Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Harjani Ritesh <riteshh@codeaurora.org> [Ulf: Fixed compiler warning] Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit c853982ece93da10e508a5dab621478623deb324)
Adrian HunterAdrian Hunter
7520d39b6bdmmc: queue: Fix queue thread wake-up The only time the driver sleeps expecting to be woken upon the arrival of a new request, is when the dispatch queue is empty. The only time that it is known whether the dispatch queue is empty is after NULL is returned from blk_fetch_request() while under the queue lock. Recognizing those facts, simplify the synchronization between the queue thread and the request function. A couple of flags tell the request function what to do, and the queue lock and ba...
Adrian HunterAdrian Hunter
4727dedf8b7mmc: block: Fix 4K native sector check The 4K native sector check does not allow for the 'do' loop nor the variables used after the 'cmd_abort' label. 'brq' and 'req' get reassigned in the 'do' loop, so the check must not assume what their values are. After the 'cmd_abort' label, 'mq_rq' and 'req' are used, but 'rqc' must be NULL otherwise it can be started again. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Ulf...