summaryrefslogtreecommitdiff
path: root/target/linux/brcm2708/patches-4.4/0352-mmc-Add-card_quirks-module-parameter-log-quirks.patch
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2016-12-02 11:50:26 +0100
committerÁlvaro Fernández Rojas <noltari@gmail.com>2016-12-04 12:32:04 +0100
commit011f2c26f1b62e309f2eac6a3101bfe0a3c76c7e (patch)
treebe53d4f11f7625508ee3aea9889e854ab5b5f263 /target/linux/brcm2708/patches-4.4/0352-mmc-Add-card_quirks-module-parameter-log-quirks.patch
parent4257f6548b9480cdb436115b63d5c134c5e91303 (diff)
downloadmtk-20170518-011f2c26f1b62e309f2eac6a3101bfe0a3c76c7e.zip
mtk-20170518-011f2c26f1b62e309f2eac6a3101bfe0a3c76c7e.tar.gz
mtk-20170518-011f2c26f1b62e309f2eac6a3101bfe0a3c76c7e.tar.bz2
brcm2708: update linux 4.4 patches to latest version
As usual these patches were extracted and rebased from the raspberry pi repo: https://github.com/raspberrypi/linux/tree/rpi-4.4.y Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/brcm2708/patches-4.4/0352-mmc-Add-card_quirks-module-parameter-log-quirks.patch')
-rw-r--r--target/linux/brcm2708/patches-4.4/0352-mmc-Add-card_quirks-module-parameter-log-quirks.patch76
1 files changed, 0 insertions, 76 deletions
diff --git a/target/linux/brcm2708/patches-4.4/0352-mmc-Add-card_quirks-module-parameter-log-quirks.patch b/target/linux/brcm2708/patches-4.4/0352-mmc-Add-card_quirks-module-parameter-log-quirks.patch
deleted file mode 100644
index 4f0c667..0000000
--- a/target/linux/brcm2708/patches-4.4/0352-mmc-Add-card_quirks-module-parameter-log-quirks.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From 2b859a1735c3113756c172ab8113f3f764c49c38 Mon Sep 17 00:00:00 2001
-From: Phil Elwell <phil@raspberrypi.org>
-Date: Fri, 20 May 2016 10:11:43 +0100
-Subject: [PATCH] mmc: Add card_quirks module parameter, log quirks
-
-Use mmc_block.card_quirks to override the quirks for all SD or MMC
-cards. The value is a bitfield using the bit positions defined in
-include/linux/mmc/card.h. If the module parameter is placed in the
-kernel command line (or bootargs) stored on the card then, assuming the
-device only has one SD card interface, the override effectively becomes
-card-specific.
-
-Signed-off-by: Phil Elwell <phil@raspberrypi.org>
----
- drivers/mmc/card/block.c | 28 +++++++++++++++++++++++++---
- 1 file changed, 25 insertions(+), 3 deletions(-)
-
---- a/drivers/mmc/card/block.c
-+++ b/drivers/mmc/card/block.c
-@@ -137,6 +137,13 @@ enum {
- module_param(perdev_minors, int, 0444);
- MODULE_PARM_DESC(perdev_minors, "Minors numbers to allocate per device");
-
-+/*
-+ * Allow quirks to be overridden for the current card
-+ */
-+static char *card_quirks;
-+module_param(card_quirks, charp, 0644);
-+MODULE_PARM_DESC(card_quirks, "Force the use of the indicated quirks (a bitfield)");
-+
- static inline int mmc_blk_part_switch(struct mmc_card *card,
- struct mmc_blk_data *md);
- static int get_card_status(struct mmc_card *card, u32 *status, int retries);
-@@ -2571,6 +2578,7 @@ static int mmc_blk_probe(struct mmc_card
- {
- struct mmc_blk_data *md, *part_md;
- char cap_str[10];
-+ char quirk_str[24];
-
- /*
- * Check that the card supports the command class(es) we need.
-@@ -2578,7 +2586,16 @@ static int mmc_blk_probe(struct mmc_card
- if (!(card->csd.cmdclass & CCC_BLOCK_READ))
- return -ENODEV;
-
-- mmc_fixup_device(card, blk_fixups);
-+ if (card_quirks) {
-+ unsigned long quirks;
-+ if (kstrtoul(card_quirks, 0, &quirks) == 0)
-+ card->quirks = (unsigned int)quirks;
-+ else
-+ pr_err("mmc_block: Invalid card_quirks parameter '%s'\n",
-+ card_quirks);
-+ }
-+ else
-+ mmc_fixup_device(card, blk_fixups);
-
- md = mmc_blk_alloc(card);
- if (IS_ERR(md))
-@@ -2586,9 +2603,14 @@ static int mmc_blk_probe(struct mmc_card
-
- string_get_size((u64)get_capacity(md->disk), 512, STRING_UNITS_2,
- cap_str, sizeof(cap_str));
-- pr_info("%s: %s %s %s %s\n",
-+ if (card->quirks)
-+ snprintf(quirk_str, sizeof(quirk_str),
-+ " (quirks 0x%08x)", card->quirks);
-+ else
-+ quirk_str[0] = '\0';
-+ pr_info("%s: %s %s %s%s%s\n",
- md->disk->disk_name, mmc_card_id(card), mmc_card_name(card),
-- cap_str, md->read_only ? "(ro)" : "");
-+ cap_str, md->read_only ? " (ro)" : "", quirk_str);
-
- if (mmc_blk_alloc_parts(card, md))
- goto out;