* Erasing more than one sector at a time?
@ 2000-07-31 18:17 Stephane Laroche
2000-08-01 9:25 ` David Woodhouse
0 siblings, 1 reply; 3+ messages in thread
From: Stephane Laroche @ 2000-07-31 18:17 UTC (permalink / raw)
To: mtd
The erase functions in cfi_cmd_*.c seem to support erasing more than 1
sector per call.
I'm wondering why the parameter validation at the start of those
function specifically prohibits erasing more than one sector. Is this
because the interface is defined this way or is it an oversight?
I'm thinking of removing the validation so my user programs don't have
to loop when erasing more than one sector.
-Stephane
To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Erasing more than one sector at a time?
2000-07-31 18:17 Erasing more than one sector at a time? Stephane Laroche
@ 2000-08-01 9:25 ` David Woodhouse
2000-08-01 16:07 ` Stephane Laroche
0 siblings, 1 reply; 3+ messages in thread
From: David Woodhouse @ 2000-08-01 9:25 UTC (permalink / raw)
To: Stephane Laroche; +Cc: mtd
stephane.laroche@colubris.com said:
> I'm wondering why the parameter validation at the start of those
> function specifically prohibits erasing more than one sector. Is this
> because the interface is defined this way or is it an oversight?
Unless I'm smoking crack, the CFI command set code _does_ support erases
longer than one erase block. The three checks which could cause it to
return EINVAL are:
1. start address must be erase-block-aligned
2. length needs to be a multiple of erase block size.
3. start + length must not exceed the _total_ size of the device.
The DiskOnChip code is different, but that's been/being fixed - depending
on whether the patch has hit the CVS tree yet or not.
--
dwmw2
To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Erasing more than one sector at a time?
2000-08-01 9:25 ` David Woodhouse
@ 2000-08-01 16:07 ` Stephane Laroche
0 siblings, 0 replies; 3+ messages in thread
From: Stephane Laroche @ 2000-08-01 16:07 UTC (permalink / raw)
To: David Woodhouse; +Cc: mtd
Obviously, my mistake. I didn't realize I had to have the erase size be a
multiple of a sector size. Sometimes, I just can't read code properly (an
it wasn't even 3 AM).
Thanks,
-Stephane
David Woodhouse wrote:
> stephane.laroche@colubris.com said:
> > I'm wondering why the parameter validation at the start of those
> > function specifically prohibits erasing more than one sector. Is this
> > because the interface is defined this way or is it an oversight?
>
> Unless I'm smoking crack, the CFI command set code _does_ support erases
> longer than one erase block. The three checks which could cause it to
> return EINVAL are:
> 1. start address must be erase-block-aligned
> 2. length needs to be a multiple of erase block size.
> 3. start + length must not exceed the _total_ size of the device.
>
> The DiskOnChip code is different, but that's been/being fixed - depending
> on whether the patch has hit the CVS tree yet or not.
>
> --
> dwmw2
To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2000-08-01 16:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-07-31 18:17 Erasing more than one sector at a time? Stephane Laroche
2000-08-01 9:25 ` David Woodhouse
2000-08-01 16:07 ` Stephane Laroche
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox