[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MN2PR04MB6991F51F6DDCA28FC23D02FEFCB80@MN2PR04MB6991.namprd04.prod.outlook.com>
Date: Wed, 4 Sep 2019 14:11:58 +0000
From: Avri Altman <Avri.Altman@....com>
To: Chaotian Jing <chaotian.jing@...iatek.com>,
Ulf Hansson <ulf.hansson@...aro.org>
CC: Matthias Brugger <matthias.bgg@...il.com>,
Jens Axboe <axboe@...nel.dk>, Hannes Reinecke <hare@...e.de>,
YueHaibing <yuehaibing@...wei.com>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Ming Lei <ming.lei@...hat.com>, Chris Boot <bootc@...tc.net>,
Zachary Hays <zhays@...mark.com>,
"linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-mediatek@...ts.infradead.org"
<linux-mediatek@...ts.infradead.org>,
"srv_heupstream@...iatek.com" <srv_heupstream@...iatek.com>
Subject: RE: [PATCH 2/2] mmc: block: add CMD13 polling for ioctl() cmd with
R1B response
> static int __mmc_blk_ioctl_cmd(struct mmc_card *card, struct
> mmc_blk_data *md,
> struct mmc_blk_ioc_data *idata)
> {
> @@ -623,6 +675,9 @@ static int __mmc_blk_ioctl_cmd(struct mmc_card
> *card, struct mmc_blk_data *md,
> __func__, status, err);
> }
>
> + if (!err && (cmd.flags & MMC_RSP_R1B))
> + err = card_busy_detect(card, MMC_BLK_TIMEOUT_MS, NULL);
> +
> return err;
> }
You have both the R1B flag check, and status poll (for rpmb) few line above.
Maybe you could re-use it.
It will both simplify this patch, and save the tad optimization of your first patch.
Thanks,
Avri
Powered by blists - more mailing lists