]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mmc: core: Add SD card quirk for broken poweroff notification
authorKeita Aihara <keita.aihara@sony.com>
Fri, 13 Sep 2024 09:44:17 +0000 (18:44 +0900)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 14 Oct 2024 10:29:00 +0000 (12:29 +0200)
commitcd068d51594d9635bf6688fc78717572b78bce6a
tree47290e5f5f02c955007a107e68f72dc95075a16e
parent8e929cb546ee42c9a61d24fae60605e9e3192354
mmc: core: Add SD card quirk for broken poweroff notification

GIGASTONE Gaming Plus microSD cards manufactured on 02/2022 report that
they support poweroff notification and cache, but they are not working
correctly.

Flush Cache bit never gets cleared in sd_flush_cache() and Poweroff
Notification Ready bit also never gets set to 1 within 1 second from the
end of busy of CMD49 in sd_poweroff_notify().

This leads to I/O error and runtime PM error state.

I observed that the same card manufactured on 01/2024 works as expected.

This problem seems similar to the Kingston cards fixed with
commit c467c8f08185 ("mmc: Add MMC_QUIRK_BROKEN_SD_CACHE for Kingston
Canvas Go Plus from 11/2019") and should be handled using quirks.

CID for the problematic card is here.
12345641535443002000000145016200

Manufacturer ID is 0x12 and defined as CID_MANFID_GIGASTONE as of now,
but would like comments on what naming is appropriate because MID list
is not public and not sure it's right.

Signed-off-by: Keita Aihara <keita.aihara@sony.com>
Link: https://lore.kernel.org/r/20240913094417.GA4191647@sony.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/card.h
drivers/mmc/core/quirks.h
drivers/mmc/core/sd.c
include/linux/mmc/card.h