<feed xmlns='http://www.w3.org/2005/Atom'>
<title>talos-obmc-linux/include/linux/mmc/card.h, branch v5.0</title>
<subtitle>Talos™ II Linux sources for OpenBMC</subtitle>
<id>https://git.raptorcs.com/git/talos-obmc-linux/atom?h=v5.0</id>
<link rel='self' href='https://git.raptorcs.com/git/talos-obmc-linux/atom?h=v5.0'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/'/>
<updated>2019-02-08T11:24:17+00:00</updated>
<entry>
<title>mmc: block: handle complete_work on separate workqueue</title>
<updated>2019-02-08T11:24:17+00:00</updated>
<author>
<name>Zachary Hays</name>
<email>zhays@lexmark.com</email>
</author>
<published>2019-02-07T15:03:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=dcf6e2e38a1c7ccbc535de5e1d9b14998847499d'/>
<id>urn:sha1:dcf6e2e38a1c7ccbc535de5e1d9b14998847499d</id>
<content type='text'>
The kblockd workqueue is created with the WQ_MEM_RECLAIM flag set.
This generates a rescuer thread for that queue that will trigger when
the CPU is under heavy load and collect the uncompleted work.

In the case of mmc, this creates the possibility of a deadlock when
there are multiple partitions on the device as other blk-mq work is
also run on the same queue. For example:

- worker 0 claims the mmc host to work on partition 1
- worker 1 attempts to claim the host for partition 2 but has to wait
  for worker 0 to finish
- worker 0 schedules complete_work to release the host
- rescuer thread is triggered after time-out and collects the dangling
  work
- rescuer thread attempts to complete the work in order starting with
  claim host
- the task to release host is now blocked by a task to claim it and
  will never be called

The above results in multiple hung tasks that lead to failures to
mount partitions.

Handling complete_work on a separate workqueue avoids this by keeping
the work completion tasks separate from the other blk-mq work. This
allows the host to be released without getting blocked by other tasks
attempting to claim the host.

Signed-off-by: Zachary Hays &lt;zhays@lexmark.com&gt;
Fixes: 81196976ed94 ("mmc: block: Add blk-mq support")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: sd: Define name for default speed dtr</title>
<updated>2018-05-29T10:24:26+00:00</updated>
<author>
<name>yinbo.zhu</name>
<email>yinbo.zhu@nxp.com</email>
</author>
<published>2018-05-24T03:38:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=a0d476654a2b222567710ab13f3660a39c5641c8'/>
<id>urn:sha1:a0d476654a2b222567710ab13f3660a39c5641c8</id>
<content type='text'>
Add a new define for the sd default speed 25MHz case

Signed-off-by: Yinbo Zhu &lt;yinbo.zhu@nxp.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: core: Add a new quirk for limiting clock rate</title>
<updated>2018-05-02T13:08:39+00:00</updated>
<author>
<name>harish_kandiga@mentor.com</name>
<email>harish_kandiga@mentor.com</email>
</author>
<published>2018-04-10T07:00:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=ebc5a1bf4f2afc2f2b348320dcfb45a8c0ac3de5'/>
<id>urn:sha1:ebc5a1bf4f2afc2f2b348320dcfb45a8c0ac3de5</id>
<content type='text'>
This patch adds a quirk to limit clock rate which
can be used to reduce the SDIO clock rate for some
chips with broken UHS.

Signed-off-by: Harish Jenny K N &lt;harish_kandiga@mentor.com&gt;
Reviewed-by: Shawn Lin &lt;shawn.lin@rock-chips.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: core: correct taac parameter according to the specification</title>
<updated>2017-08-30T12:01:46+00:00</updated>
<author>
<name>Shawn Lin</name>
<email>shawn.lin@rock-chips.com</email>
</author>
<published>2017-08-02T03:12:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=4406ae215b5a1dd59d941c1323b9f40d241357ac'/>
<id>urn:sha1:4406ae215b5a1dd59d941c1323b9f40d241357ac</id>
<content type='text'>
Per the spec of JESD84-B51, section 7.3, replace tacc with taac to
fix the obvious typo.

Signed-off-by: Shawn Lin &lt;shawn.lin@rock-chips.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: core: Allocate per-request data using the block layer core</title>
<updated>2017-06-20T08:30:17+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2017-05-18T09:29:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=304419d8a7e9204c5d19b704467b814df8c8f5b1'/>
<id>urn:sha1:304419d8a7e9204c5d19b704467b814df8c8f5b1</id>
<content type='text'>
The mmc_queue_req is a per-request state container the MMC core uses
to carry bounce buffers, pointers to asynchronous requests and so on.
Currently allocated as a static array of objects, then as a request
comes in, a mmc_queue_req is assigned to it, and used during the
lifetime of the request.

This is backwards compared to how other block layer drivers work:
they usally let the block core provide a per-request struct that get
allocated right beind the struct request, and which can be obtained
using the blk_mq_rq_to_pdu() helper. (The _mq_ infix in this function
name is misleading: it is used by both the old and the MQ block
layer.)

The per-request struct gets allocated to the size stored in the queue
variable .cmd_size initialized using the .init_rq_fn() and
cleaned up using .exit_rq_fn().

The block layer code makes the MMC core rely on this mechanism to
allocate the per-request mmc_queue_req state container.

Doing this make a lot of complicated queue handling go away. We only
need to keep the .qnct that keeps count of how many request are
currently being processed by the MMC layer. The MQ block layer will
replace also this once we transition to it.

Doing this refactoring is necessary to move the ioctl() operations
into custom block layer requests tagged with REQ_OP_DRV_[IN|OUT]
instead of the custom code using the BigMMCHostLock that we have
today: those require that per-request data be obtainable easily from
a request after creating a custom request with e.g.:

struct request *rq = blk_get_request(q, REQ_OP_DRV_IN, __GFP_RECLAIM);
struct mmc_queue_req *mq_rq = req_to_mq_rq(rq);

And this is not possible with the current construction, as the request
is not immediately assigned the per-request state container, but
instead it gets assigned when the request finally enters the MMC
queue, which is way too late for custom requests.

Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
[Ulf: Folded in the fix to drop a call to blk_cleanup_queue()]
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Tested-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
</content>
</entry>
<entry>
<title>mmc: core: Export API to allow hosts to get the card address</title>
<updated>2017-04-24T19:49:15+00:00</updated>
<author>
<name>Ulf Hansson</name>
<email>ulf.hansson@linaro.org</email>
</author>
<published>2017-04-24T18:41:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=33e6d74d65c358270f00d228877178964aab84b3'/>
<id>urn:sha1:33e6d74d65c358270f00d228877178964aab84b3</id>
<content type='text'>
Some hosts controllers, like Cavium, needs to know whether the card
operates in byte- or block-address mode. Therefore export a new API,
mmc_card_is_blockaddr(), which provides this information.

Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Steven J. Hill &lt;Steven.Hill@cavium.com&gt;
Acked-by: David Daney &lt;david.daney@cavium.com&gt;
</content>
</entry>
<entry>
<title>mmc: mmc_test: Disable Command Queue while mmc_test is used</title>
<updated>2017-04-24T19:42:02+00:00</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2017-03-13T12:36:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=9d4579a85c84340044b10ffa6cd576397f59dc93'/>
<id>urn:sha1:9d4579a85c84340044b10ffa6cd576397f59dc93</id>
<content type='text'>
Normal read and write commands may not be used while the command queue is
enabled. Disable the Command Queue when mmc_test is probed and re-enable it
when it is removed.

Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Reviewed-by: Harjani Ritesh &lt;riteshh@codeaurora.org&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: mmc: Add functions to enable / disable the Command Queue</title>
<updated>2017-04-24T19:42:02+00:00</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2017-03-13T12:36:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=b658af718465cd1e8011c8da281befdfc2debefd'/>
<id>urn:sha1:b658af718465cd1e8011c8da281befdfc2debefd</id>
<content type='text'>
Add helper functions to enable or disable the Command Queue.

Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: queue: Share mmc request array between partitions</title>
<updated>2017-04-24T19:42:01+00:00</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2017-03-13T12:36:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=7b410d074b253a44624497a18e73f666a9574f37'/>
<id>urn:sha1:7b410d074b253a44624497a18e73f666a9574f37</id>
<content type='text'>
eMMC can have multiple internal partitions that are represented as separate
disks / queues. However switching between partitions is only done when the
queue is empty. Consequently the array of mmc requests that are queued can
be shared between partitions saving memory.

Keep a pointer to the mmc request queue on the card, and use that instead
of allocating a new one for each partition.

Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: Adding AUTO_BKOPS_EN bit set for Auto BKOPS support</title>
<updated>2017-02-14T08:11:00+00:00</updated>
<author>
<name>Uri Yanai</name>
<email>uri.yanai@sandisk.com</email>
</author>
<published>2017-02-07T16:00:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=efff8e7879b8b7f8a077f495262f0bb9cfaa0b06'/>
<id>urn:sha1:efff8e7879b8b7f8a077f495262f0bb9cfaa0b06</id>
<content type='text'>
Adding dedicated flag for AUTO_BKOPS in card-&gt;ext_csd structure.
Read AUTO_BKOPS bit value from the device EXT_CSD and set to the
card-&gt;ext_csd structure.
In mmc_decode_ext_csd() add a print message in case the AUTO_BKOPS
is enabled

Signed-off-by: Uri Yanai &lt;uri.yanai@sandisk.com&gt;
Signed-off-by: Alex Lemberg &lt;alex.lemberg@sandisk.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
</feed>
