diff mbox

[4/6] mmc: add FFU support to card/block.c

Message ID 1460586824-40688-5-git-send-email-gwendal@chromium.org (mailing list archive)
State New, archived
Headers show

Commit Message

Gwendal Grignou April 13, 2016, 10:33 p.m. UTC
From: Grant Grundler <grundler@google.com>

Add special case in MMC_IOC_CMD to process FFU command from mmc tool.
A FFU command is similar to a multi command, but it also require loading
firmware and maybe reset the device.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
---
 drivers/mmc/card/block.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

kernel test robot April 13, 2016, 11:10 p.m. UTC | #1
Hi Grant,

[auto build test ERROR on ulf.hansson-mmc/next]
[also build test ERROR on v4.6-rc3 next-20160413]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url:    https://github.com/0day-ci/linux/commits/Gwendal-Grignou/mmc-core-in-_init-exclude-FW-revision-from-CID-check/20160414-063724
base:   https://git.linaro.org/people/ulf.hansson/mmc next
config: mips-allmodconfig (attached as .config)
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=mips 

Note: the linux-review/Gwendal-Grignou/mmc-core-in-_init-exclude-FW-revision-from-CID-check/20160414-063724 HEAD c63a91da8ccbd4ebab35d726695bd479c4c4129d builds fine.
      It only hurts bisectibility.

All errors (new ones prefixed by >>):

   drivers/mmc/card/block.c: In function 'mmc_blk_ioctl_cmd':
>> drivers/mmc/card/block.c:616:30: error: passing argument 2 of 'mmc_ffu_invoke' from incompatible pointer type [-Werror=incompatible-pointer-types]
      err = mmc_ffu_invoke(card, (struct mmc_ffu_args *)idata->buf);
                                 ^
   In file included from drivers/mmc/card/block.c:46:0:
   include/linux/mmc/ffu.h:36:5: note: expected 'const char *' but argument is of type 'struct mmc_ffu_args *'
    int mmc_ffu_invoke(struct mmc_card *card, const char *name);
        ^
   cc1: some warnings being treated as errors

vim +/mmc_ffu_invoke +616 drivers/mmc/card/block.c

   610		if (IS_ERR(card)) {
   611			err = PTR_ERR(card);
   612			goto cmd_done;
   613		}
   614	
   615		if (idata->ic.opcode == MMC_FFU_INVOKE_OP) {
 > 616			err = mmc_ffu_invoke(card, (struct mmc_ffu_args *)idata->buf);
   617			goto cmd_done;
   618		}
   619	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
diff mbox

Patch

diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index c543dd9..dd266c0 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -610,6 +610,11 @@  static int mmc_blk_ioctl_cmd(struct block_device *bdev,
 		goto cmd_done;
 	}
 
+	if (idata->ic.opcode == MMC_FFU_INVOKE_OP) {
+		err = mmc_ffu_invoke(card, (struct mmc_ffu_args *)idata->buf);
+		goto cmd_done;
+	}
+
 	mmc_get_card(card);
 
 	ioc_err = __mmc_blk_ioctl_cmd(card, md, idata);