<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/mmc/core/block.c, branch linux-6.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-08-23T15:32:54Z</updated>
<entry>
<title>mmc: block: Fix in_flight[issue_type] value error</title>
<updated>2023-08-23T15:32:54Z</updated>
<author>
<name>Yibin Ding</name>
</author>
<published>2023-08-02T02:30:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=43a181a53c1af4d573765e7652d3b8cc907d64ba'/>
<id>urn:sha1:43a181a53c1af4d573765e7652d3b8cc907d64ba</id>
<content type='text'>
commit 4b430d4ac99750ee2ae2f893f1055c7af1ec3dc5 upstream.

For a completed request, after the mmc_blk_mq_complete_rq(mq, req)
function is executed, the bitmap_tags corresponding to the
request will be cleared, that is, the request will be regarded as
idle. If the request is acquired by a different type of process at
this time, the issue_type of the request may change. It further
caused the value of mq-&gt;in_flight[issue_type] to be abnormal,
and a large number of requests could not be sent.

p1:					      p2:
mmc_blk_mq_complete_rq
  blk_mq_free_request
					      blk_mq_get_request
					        blk_mq_rq_ctx_init
mmc_blk_mq_dec_in_flight
  mmc_issue_type(mq, req)

This strategy can ensure the consistency of issue_type
before and after executing mmc_blk_mq_complete_rq.

Fixes: 81196976ed94 ("mmc: block: Add blk-mq support")
Cc: stable@vger.kernel.org
Signed-off-by: Yibin Ding &lt;yibin.ding@unisoc.com&gt;
Acked-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Link: https://lore.kernel.org/r/20230802023023.1318134-1-yunlong.xing@unisoc.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mmc: block: ioctl: do write error check for spi</title>
<updated>2023-07-19T14:36:22Z</updated>
<author>
<name>Christian Loehle</name>
</author>
<published>2023-05-25T09:56:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3b25cadc7975db3e10c20d4905634e75d25476fd'/>
<id>urn:sha1:3b25cadc7975db3e10c20d4905634e75d25476fd</id>
<content type='text'>
commit 568898cbc8b570311b3b94a3202b8233f4168144 upstream.

SPI doesn't have the usual PROG path we can check for error bits
after moving back to TRAN. Instead it holds the line LOW until
completion. We can then check if the card shows any errors or
is in IDLE state, indicating the line is no longer LOW because
the card was reset.

Signed-off-by: Christian Loehle &lt;cloehle@hyperstone.com&gt;
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/55920f880c9742f486f64aa44e25508e@hyperstone.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mmc: block: ensure error propagation for non-blk</title>
<updated>2023-05-09T09:16:15Z</updated>
<author>
<name>Christian Loehle</name>
</author>
<published>2023-04-26T16:59:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=003fb0a51162d940f25fc35e70b0996a12c9e08a'/>
<id>urn:sha1:003fb0a51162d940f25fc35e70b0996a12c9e08a</id>
<content type='text'>
Requests to the mmc layer usually come through a block device IO.
The exceptions are the ioctl interface, RPMB chardev ioctl
and debugfs, which issue their own blk_mq requests through
blk_execute_rq and do not query the BLK_STS error but the
mmcblk-internal drv_op_result. This patch ensures that drv_op_result
defaults to an error and has to be overwritten by the operation
to be considered successful.

The behavior leads to a bug where the request never propagates
the error, e.g. by directly erroring out at mmc_blk_mq_issue_rq if
mmc_blk_part_switch fails. The ioctl caller of the rpmb chardev then
can never see an error (BLK_STS_IOERR, but drv_op_result is unchanged)
and thus may assume that their call executed successfully when it did not.

While always checking the blk_execute_rq return value would be
advised, let's eliminate the error by always setting
drv_op_result as -EIO to be overwritten on success (or other error)

Fixes: 614f0388f580 ("mmc: block: move single ioctl() commands to block requests")
Signed-off-by: Christian Loehle &lt;cloehle@hyperstone.com&gt;
Acked-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/59c17ada35664b818b7bd83752119b2d@hyperstone.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: core: Remove unused macro mmc_req_rel_wr</title>
<updated>2023-04-17T07:47:25Z</updated>
<author>
<name>Bean Huo</name>
</author>
<published>2023-04-03T22:17:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f695c5f952f28bf4ba74a7862ae20bae27568770'/>
<id>urn:sha1:f695c5f952f28bf4ba74a7862ae20bae27568770</id>
<content type='text'>
There is no user for macro mmc_req_rel_wr, so delete it.

Signed-off-by: Bean Huo &lt;beanhuo@micron.com&gt;
Link: https://lore.kernel.org/r/20230403221754.16168-1-beanhuo@iokpp.de
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: core: Align to common busy polling behaviour for mmc ioctls</title>
<updated>2023-02-15T12:24:03Z</updated>
<author>
<name>Ulf Hansson</name>
</author>
<published>2023-02-13T13:37:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=51f5b3056790bc0518e49587996f1e6f3058cca9'/>
<id>urn:sha1:51f5b3056790bc0518e49587996f1e6f3058cca9</id>
<content type='text'>
Let's align to the common busy polling behaviour for mmc ioctls, by
updating the below two corresponding parts, that comes into play when using
an R1B response for a command.

*) A command with an R1B response should be prepared by calling
mmc_prepare_busy_cmd(), which make us respects the host's busy timeout
constraints.
**) When an R1B response is being used and the host also supports HW busy
detection, we should skip to poll for busy completion.

Suggested-by: Christian Loehle &lt;cloehle@hyperstone.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Reviewed-by: Christian Loehle &lt;cloehle@hyperstone.com&gt;
Link: https://lore.kernel.org/r/20230213133707.27857-1-ulf.hansson@linaro.org
</content>
</entry>
<entry>
<title>mmc: core: Remove non-data R1B ioctl workaround</title>
<updated>2022-12-07T12:29:13Z</updated>
<author>
<name>Christian Löhle</name>
</author>
<published>2022-11-27T17:46:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e81bdae440fa7cc7dcbfb4f0fcfafb1f4350bc31'/>
<id>urn:sha1:e81bdae440fa7cc7dcbfb4f0fcfafb1f4350bc31</id>
<content type='text'>
The workaround of pretending R1B non-data transfers are data transfers in
order for the busy timeout to be respected by the host controller driver is
removed. It wasn't useful in a long time.

Initially the workaround ensured that R1B commands did not time out by
setting the data timeout to be the command timeout in commit cb87ea28ed9e
("mmc: core: Add mmc CMD+ACMD passthrough ioctl"). This was moved inside an
if-clause with idata-&gt;buf_bytes being set in commit 4d6144de8ba2 ("mmc:
core: check for zero length ioctl data"). Since the workaround is now
inside the idata-&gt;buf_bytes clause and intended to fix R1B non-data
transfers, that do not have buf_bytes set, we can remove the workaround
altogether. This was dead code, since data transfers doesn't use R1B
commands.

Signed-off-by: Christian Loehle &lt;cloehle@hyperstone.com&gt;
Acked-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Link: https://lore.kernel.org/r/57d4aceb25254e448bd3e575bd99b0c2@hyperstone.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: block: Remove error check of hw_reset on reset</title>
<updated>2022-10-17T09:51:33Z</updated>
<author>
<name>Christian Löhle</name>
</author>
<published>2022-10-13T11:16:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=406e14808ee695cbae1eafa5fd3ac563c29470ab'/>
<id>urn:sha1:406e14808ee695cbae1eafa5fd3ac563c29470ab</id>
<content type='text'>
Before switching back to the right partition in mmc_blk_reset there used
to be a check if hw_reset was even supported. This return value
was removed, so there is no reason to check. Furthermore ensure
part_curr is not falsely set to a valid value on reset or
partition switch error.

As part of this change the code paths of mmc_blk_reset calls were checked
to ensure no commands are issued after a failed mmc_blk_reset directly
without going through the block layer.

Fixes: fefdd3c91e0a ("mmc: core: Drop superfluous validations in mmc_hw|sw_reset()")
Cc: stable@vger.kernel.org
Signed-off-by: Christian Loehle &lt;cloehle@hyperstone.com&gt;
Reviewed-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Link: https://lore.kernel.org/r/e91be6199d04414a91e20611c81bfe1d@hyperstone.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: core: Add SD card quirk for broken discard</title>
<updated>2022-10-06T11:31:13Z</updated>
<author>
<name>Avri Altman</name>
</author>
<published>2022-09-28T09:57:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=07d2872bf4c864eb83d034263c155746a2fb7a3b'/>
<id>urn:sha1:07d2872bf4c864eb83d034263c155746a2fb7a3b</id>
<content type='text'>
Some SD-cards from Sandisk that are SDA-6.0 compliant reports they supports
discard, while they actually don't. This might cause mk2fs to fail while
trying to format the card and revert it to a read-only mode.

To fix this problem, let's add a card quirk (MMC_QUIRK_BROKEN_SD_DISCARD)
to indicate that we shall fall-back to use the legacy erase command
instead.

Signed-off-by: Avri Altman &lt;avri.altman@wdc.com&gt;
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20220928095744.16455-1-avri.altman@wdc.com
[Ulf: Updated the commit message]
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'mmc-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc</title>
<updated>2022-08-05T02:41:09Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2022-08-05T02:41:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=328141e51e6fc79d21168bfd4e356dddc2ec7491'/>
<id>urn:sha1:328141e51e6fc79d21168bfd4e356dddc2ec7491</id>
<content type='text'>
Pull MMC updates from Ulf Hansson:
 "MMC core:
   - Add support for the asynchronous SDIO wakeup interrupts
   - Skip redundant evaluation of eMMC HS400 caps when no-MMC-cap
   - Add support to store error stats from host drivers
   - Extend debugfs to show error stats from host drivers
   - Add single I/O read support in the recovery path for 4k sector cards

  MMC host:
   - dw_mmc-exynos: Convert corresponding DT bindings to the dtschema
   - dw_mmc-rockchip: Add support for the Rockchip RV1126 variant
   - mmc_spi: Convert corresponding DT bindings to the dtschema
   - mtk-sd: Extend support for interrupts/pinctrls for SDIO low-power mode
   - mtk-sd: Add support for SDIO wake irqs
   - mtk-sd: Add support for the Mediatek MT8188 variant
   - renesas_sdhi: Drop redundant manual tap correction for newer SoCs
   - renesas_sdhi: Add support for the R-Car S4-8 and generic Gen4 variants
   - sdhci/cqhci: Add support to capture stats from host errors
   - sdhci-brcmstb: Add ability to increase max clock rate for SDIO on 72116b0
   - sdhci-msm: Add support for the MSM8998 and SM8450 variant
   - sdhci-of-at91: Fixup UHS-I mode by rewriting of MC1R
   - sdhci-of-dwcmshc: Add support for the Rockchip rk3588 variant
   - sdhci-of-dwcmshc: Enable reset support for the Rockchip variants
   - sdhci-pci-gli: Improve I/O read/write performance for GL9763E
   - sdhci-s3c: Convert corresponding DT bindings to the dtschema
   - tmio: Avoid glitches when resetting

  MEMSTICK core:
   - A couple of minor fixes and cleanups"

* tag 'mmc-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (61 commits)
  mmc: mediatek: add support for SDIO eint wakup IRQ
  mmc: core: Add support for SDIO wakeup interrupt
  dt-bindings: mmc: mtk-sd: extend interrupts and pinctrls properties
  dt-bindings: mmc: rockchip-dw-mshc: Document Rockchip RV1126
  mmc: renesas_sdhi: newer SoCs don't need manual tap correction
  mmc: cavium-thunderx: Add of_node_put() when breaking out of loop
  mmc: cavium-octeon: Add of_node_put() when breaking out of loop
  mmc: core: quirks: Add of_node_put() when breaking out of loop
  mmc: sdhci-brcmstb: use clk_get_rate(base_clk) in PM resume
  dt-bindings: mmc: sdhci-msm: Document the SM8450 compatible
  mmc: sdhci-msm: drop redundant of_device_id entries
  dt-bindings: mmc: sdhci-msm: add MSM8998
  mmc: block: Add single read for 4k sector cards
  mmc: mxcmmc: Use mmc_card_sdio macro
  mmc: core: Use mmc_card_* macro and add a new for the sd_combo type
  dt-bindings: mmc: sdhci-msm: constrain reg-names per variants
  dt-bindings: mmc: sdhci-msm: fix reg-names entries
  dt-bindings: mmc: Add compatible for MediaTek MT8188
  dt-bindings: mmc: sdhci-msm: document resets
  mmc: sdhci-of-at91: fix set_uhs_signaling rewriting of MC1R
  ...
</content>
</entry>
<entry>
<title>mmc: fix disk/queue leak in case of adding disk failure</title>
<updated>2022-07-18T19:12:11Z</updated>
<author>
<name>Ming Lei</name>
</author>
<published>2022-07-18T16:08:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bf14fad19ffbb3d37a1bb1324f966973e7d4a7b6'/>
<id>urn:sha1:bf14fad19ffbb3d37a1bb1324f966973e7d4a7b6</id>
<content type='text'>
In case of adding disk failure, the disk needs to be released, otherwise
disk/queue is leaked.

Signed-off-by: Ming Lei &lt;ming.lei@redhat.com&gt;
Link: https://lore.kernel.org/r/20220718160851.312972-1-ming.lei@redhat.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
</feed>
