From: Sascha Hauer <s.hauer@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v2 01/10] fs: give erase() a new erase_type parameter
Date: Thu, 1 Aug 2024 12:51:38 +0200 [thread overview]
Message-ID: <ZqtoulH-pIHmn54m@pengutronix.de> (raw)
In-Reply-To: <20240731080510.364706-2-a.fatoum@pengutronix.de>
On Wed, Jul 31, 2024 at 10:05:01AM +0200, Ahmad Fatoum wrote:
> diff --git a/drivers/usb/gadget/function/dfu.c b/drivers/usb/gadget/function/dfu.c
> index a41ff22dcebc..208e0cd23c29 100644
> --- a/drivers/usb/gadget/function/dfu.c
> +++ b/drivers/usb/gadget/function/dfu.c
> @@ -208,7 +208,7 @@ static void dfu_do_write(struct dfu_work *dw)
>
> if (prog_erase && (dfu_written + wlen) > dfu_erased) {
> size = roundup(wlen, dfu_mtdinfo.erasesize);
> - ret = erase(dfufd, size, dfu_erased);
> + ret = erase(dfufd, size, dfu_erased, ERASE_TO_WRITE);
> dfu_erased += size;
> if (ret && ret != -ENOSYS) {
> perror("erase");
> @@ -333,7 +333,7 @@ static void dfu_do_copy(struct dfu_work *dw)
> return;
> }
>
> - ret = erase(fd, ERASE_SIZE_ALL, 0);
> + ret = erase_flash(fd, ERASE_SIZE_ALL, 0);
Fixed this to:
ret = erase(fd, ERASE_SIZE_ALL, 0, ERASE_TO_WRITE);
Or should it be ERASE_TO_CLEAR instead?
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2024-08-01 10:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-31 8:05 [PATCH v2 00/10] mmc: add SD/eMMC erase support Ahmad Fatoum
2024-07-31 8:05 ` [PATCH v2 01/10] fs: give erase() a new erase_type parameter Ahmad Fatoum
2024-08-01 10:51 ` Sascha Hauer [this message]
2024-08-01 10:54 ` Ahmad Fatoum
2024-07-31 8:05 ` [PATCH v2 02/10] cdev: factor out range identical/overlap check Ahmad Fatoum
2024-07-31 8:05 ` [PATCH v2 03/10] block: factor out chunk_flush helper Ahmad Fatoum
2024-07-31 8:05 ` [PATCH v2 04/10] block: allow block devices to implement the cdev erase operation Ahmad Fatoum
2024-07-31 8:05 ` [PATCH v2 05/10] mci: turn bool members into bitfield in struct mci Ahmad Fatoum
2024-07-31 8:05 ` [PATCH v2 06/10] mci: describe more command structure in mci.h Ahmad Fatoum
2024-07-31 8:05 ` [PATCH v2 07/10] mci: core: use CONFIG_MCI_WRITE, not CONFIG_BLOCK_WRITE Ahmad Fatoum
2024-07-31 8:05 ` [PATCH v2 08/10] mci: add support for discarding write blocks Ahmad Fatoum
2024-08-01 11:27 ` Sascha Hauer
2024-07-31 8:05 ` [PATCH v2 09/10] commands: sync: add new command to flush cached writes Ahmad Fatoum
2024-07-31 8:05 ` [PATCH v2 10/10] commands: blkstats: add command to print block device statistics Ahmad Fatoum
2024-08-01 10:49 ` [PATCH v2 00/10] mmc: add SD/eMMC erase support Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZqtoulH-pIHmn54m@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox