* mtd_info->write
@ 2001-06-06 9:12 Abraham vd Merwe
0 siblings, 0 replies; 13+ messages in thread
From: Abraham vd Merwe @ 2001-06-06 9:12 UTC (permalink / raw)
To: MTD for Linux
[-- Attachment #1: Type: text/plain, Size: 726 bytes --]
Hi!
Can you safely assume in the MTD write function that the blocks on which the
data is have been erased or do you actually have to do some error checking
and return with -EINVAL if you discover that it's not been erased?
--
Regards
Abraham
Just because he's dead is no reason to lay off work.
__________________________________________________________
Abraham vd Merwe - 2d3D, Inc.
Device Driver Development, Outsourcing, Embedded Systems
Cell: +27 82 565 4451 Snailmail:
Tel: +27 21 761 7549 Block C, Antree Park
Fax: +27 21 761 7648 Doncaster Road
Email: abraham@2d3d.co.za Kenilworth, 7700
Http: http://www.2d3d.com South Africa
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: mtd_info->write
@ 2001-06-06 13:25 Frederic Giasson
2001-06-06 13:35 ` mtd_info->write Abraham vd Merwe
0 siblings, 1 reply; 13+ messages in thread
From: Frederic Giasson @ 2001-06-06 13:25 UTC (permalink / raw)
To: 'Abraham vd Merwe'; +Cc: MTD for Linux
I am almost sure that you have to validate the erase state of the sector you
want to write to. For example, I use cfi_amdstd_write function, and
absolutely no validation is made in that fonction for this.
Frederic Giasson
-----Original Message-----
From: Abraham vd Merwe [mailto:abraham@2d3d.co.za]
Sent: Wednesday, June 06, 2001 9:28 AM
To: Frederic Giasson
Cc: MTD for Linux
Subject: Re: mtd_info->write
Hi Frederic!
> If the data is all ones ("1"), it has been erased. If not, it has not.
Yes, I know, but I want to know whether I have to check if that's the case
or not.
> Can you safely assume in the MTD write function that the blocks on which
the
> data is have been erased or do you actually have to do some error checking
> and return with -EINVAL if you discover that it's not been erased?
--
Regards
Abraham
It is your concern when your neighbor's wall is on fire.
-- Quintus Horatius Flaccus (Horace)
__________________________________________________________
Abraham vd Merwe - 2d3D, Inc.
Device Driver Development, Outsourcing, Embedded Systems
Cell: +27 82 565 4451 Snailmail:
Tel: +27 21 761 7549 Block C, Antree Park
Fax: +27 21 761 7648 Doncaster Road
Email: abraham@2d3d.co.za Kenilworth, 7700
Http: http://www.2d3d.com South Africa
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: mtd_info->write
[not found] <F1BED55F35F4D3118C0F00E0295CFF4D995488@mail.mediatrix.com>
@ 2001-06-06 13:28 ` Abraham vd Merwe
2001-06-06 13:35 ` mtd_info->write David Woodhouse
2001-06-06 17:50 ` mtd_info->write Nicolas Pitre
0 siblings, 2 replies; 13+ messages in thread
From: Abraham vd Merwe @ 2001-06-06 13:28 UTC (permalink / raw)
To: Frederic Giasson; +Cc: MTD for Linux
[-- Attachment #1: Type: text/plain, Size: 950 bytes --]
Hi Frederic!
> If the data is all ones ("1"), it has been erased. If not, it has not.
Yes, I know, but I want to know whether I have to check if that's the case
or not.
> Can you safely assume in the MTD write function that the blocks on which the
> data is have been erased or do you actually have to do some error checking
> and return with -EINVAL if you discover that it's not been erased?
--
Regards
Abraham
It is your concern when your neighbor's wall is on fire.
-- Quintus Horatius Flaccus (Horace)
__________________________________________________________
Abraham vd Merwe - 2d3D, Inc.
Device Driver Development, Outsourcing, Embedded Systems
Cell: +27 82 565 4451 Snailmail:
Tel: +27 21 761 7549 Block C, Antree Park
Fax: +27 21 761 7648 Doncaster Road
Email: abraham@2d3d.co.za Kenilworth, 7700
Http: http://www.2d3d.com South Africa
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: mtd_info->write
@ 2001-06-06 13:32 Frederic Giasson
0 siblings, 0 replies; 13+ messages in thread
From: Frederic Giasson @ 2001-06-06 13:32 UTC (permalink / raw)
To: 'Abraham vd Merwe'; +Cc: MTD for Linux
In my opinion, the low level driver does not have to handle validation, it
just have to provide an interface to primitive function. The high level
module ( the user interface part of the driver ) has to do the job. I think
that's the way of MTD people too.
Frederic Giasson
-----Original Message-----
From: Abraham vd Merwe [mailto:abraham@2d3d.co.za]
Sent: Wednesday, June 06, 2001 9:35 AM
To: Frederic Giasson
Cc: MTD for Linux
Subject: Re: mtd_info->write
Hi Frederic!
> I am almost sure that you have to validate the erase state of the sector
you
> want to write to. For example, I use cfi_amdstd_write function, and
> absolutely no validation is made in that fonction for this.
You mean the user process/module has to, not the chip driver? I'm writing a
chip driver and I want to know whether the chip driver is responsible for
the checking.
I noticed the other chip drivers (like you say here) doesn't so I'm assuming
I don't have to but I just want to make sure.
> > If the data is all ones ("1"), it has been erased. If not, it has not.
>
> Yes, I know, but I want to know whether I have to check if that's the case
> or not.
>
> > Can you safely assume in the MTD write function that the blocks on which
> the
> > data is have been erased or do you actually have to do some error
checking
> > and return with -EINVAL if you discover that it's not been erased?
--
Regards
Abraham
Chemistry professors never die, they just fail to react.
__________________________________________________________
Abraham vd Merwe - 2d3D, Inc.
Device Driver Development, Outsourcing, Embedded Systems
Cell: +27 82 565 4451 Snailmail:
Tel: +27 21 761 7549 Block C, Antree Park
Fax: +27 21 761 7648 Doncaster Road
Email: abraham@2d3d.co.za Kenilworth, 7700
Http: http://www.2d3d.com South Africa
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: mtd_info->write
@ 2001-06-06 13:34 Frederic Giasson
2001-06-06 13:41 ` mtd_info->write David Woodhouse
0 siblings, 1 reply; 13+ messages in thread
From: Frederic Giasson @ 2001-06-06 13:34 UTC (permalink / raw)
To: 'David Woodhouse', Abraham vd Merwe; +Cc: MTD for Linux
That's right, but a read back validation has to show the error.
Frédéric Giasson
-----Original Message-----
From: David Woodhouse [mailto:dwmw2@infradead.org]
Sent: Wednesday, June 06, 2001 9:36 AM
To: Abraham vd Merwe
Cc: Frederic Giasson; MTD for Linux
Subject: Re: mtd_info->write
abraham@2d3d.co.za said:
> > If the data is all ones ("1"), it has been erased. If not, it has
> > not.
> Yes, I know, but I want to know whether I have to check if that's the
> case or not.
The chip driver is not required to check that the data are all ones. You
are permitted to write to the same location of a chip repeatedly. If you
write a 1 where previously there was a zero, obviously the result will be a
zero. But that is not an error.
--
dwmw2
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: mtd_info->write
2001-06-06 13:25 mtd_info->write Frederic Giasson
@ 2001-06-06 13:35 ` Abraham vd Merwe
0 siblings, 0 replies; 13+ messages in thread
From: Abraham vd Merwe @ 2001-06-06 13:35 UTC (permalink / raw)
To: Frederic Giasson; +Cc: MTD for Linux
[-- Attachment #1: Type: text/plain, Size: 1442 bytes --]
Hi Frederic!
> I am almost sure that you have to validate the erase state of the sector you
> want to write to. For example, I use cfi_amdstd_write function, and
> absolutely no validation is made in that fonction for this.
You mean the user process/module has to, not the chip driver? I'm writing a
chip driver and I want to know whether the chip driver is responsible for
the checking.
I noticed the other chip drivers (like you say here) doesn't so I'm assuming
I don't have to but I just want to make sure.
> > If the data is all ones ("1"), it has been erased. If not, it has not.
>
> Yes, I know, but I want to know whether I have to check if that's the case
> or not.
>
> > Can you safely assume in the MTD write function that the blocks on which
> the
> > data is have been erased or do you actually have to do some error checking
> > and return with -EINVAL if you discover that it's not been erased?
--
Regards
Abraham
Chemistry professors never die, they just fail to react.
__________________________________________________________
Abraham vd Merwe - 2d3D, Inc.
Device Driver Development, Outsourcing, Embedded Systems
Cell: +27 82 565 4451 Snailmail:
Tel: +27 21 761 7549 Block C, Antree Park
Fax: +27 21 761 7648 Doncaster Road
Email: abraham@2d3d.co.za Kenilworth, 7700
Http: http://www.2d3d.com South Africa
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: mtd_info->write
2001-06-06 13:28 ` mtd_info->write Abraham vd Merwe
@ 2001-06-06 13:35 ` David Woodhouse
2001-06-06 17:50 ` mtd_info->write Nicolas Pitre
1 sibling, 0 replies; 13+ messages in thread
From: David Woodhouse @ 2001-06-06 13:35 UTC (permalink / raw)
To: Abraham vd Merwe; +Cc: Frederic Giasson, MTD for Linux
abraham@2d3d.co.za said:
> > If the data is all ones ("1"), it has been erased. If not, it has
> > not.
> Yes, I know, but I want to know whether I have to check if that's the
> case or not.
The chip driver is not required to check that the data are all ones. You
are permitted to write to the same location of a chip repeatedly. If you
write a 1 where previously there was a zero, obviously the result will be a
zero. But that is not an error.
--
dwmw2
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: mtd_info->write
@ 2001-06-06 13:38 Frederic Giasson
2001-06-06 13:44 ` mtd_info->write David Woodhouse
0 siblings, 1 reply; 13+ messages in thread
From: Frederic Giasson @ 2001-06-06 13:38 UTC (permalink / raw)
To: 'David Woodhouse'; +Cc: Abraham vd Merwe, MTD for Linux
There is validation, in do_write_oneword ( cfi_cmdset_0002.c ), there is
pooling to see if data has changed.
Frédéric Giasson
-----Original Message-----
From: David Woodhouse [mailto:dwmw2@infradead.org]
Sent: Wednesday, June 06, 2001 9:41 AM
To: Frederic Giasson
Cc: Abraham vd Merwe; MTD for Linux
Subject: Re: mtd_info->write
fgiasson@mediatrix.com said:
> That's right, but a read back validation has to show the error.
There is no such read back validation in any of the MTD code, is there?
If you write to a region which already contains data, then read back and
compare with the data you wrote, you're likely to see differences.
Film at 11. :)
--
dwmw2
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: mtd_info->write
2001-06-06 13:34 mtd_info->write Frederic Giasson
@ 2001-06-06 13:41 ` David Woodhouse
2001-06-06 13:42 ` mtd_info->write kira brown
0 siblings, 1 reply; 13+ messages in thread
From: David Woodhouse @ 2001-06-06 13:41 UTC (permalink / raw)
To: Frederic Giasson; +Cc: Abraham vd Merwe, MTD for Linux
fgiasson@mediatrix.com said:
> That's right, but a read back validation has to show the error.
There is no such read back validation in any of the MTD code, is there?
If you write to a region which already contains data, then read back and
compare with the data you wrote, you're likely to see differences.
Film at 11. :)
--
dwmw2
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: mtd_info->write
2001-06-06 13:41 ` mtd_info->write David Woodhouse
@ 2001-06-06 13:42 ` kira brown
2001-06-06 13:49 ` mtd_info->write David Woodhouse
0 siblings, 1 reply; 13+ messages in thread
From: kira brown @ 2001-06-06 13:42 UTC (permalink / raw)
To: David Woodhouse; +Cc: Frederic Giasson, Abraham vd Merwe, MTD for Linux
On Wed, 6 Jun 2001, David Woodhouse wrote:
> If you write to a region which already contains data, then read back and
> compare with the data you wrote, you're likely to see differences.
And if you don't see differences, then what's the problem?
kira.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: mtd_info->write
2001-06-06 13:38 mtd_info->write Frederic Giasson
@ 2001-06-06 13:44 ` David Woodhouse
0 siblings, 0 replies; 13+ messages in thread
From: David Woodhouse @ 2001-06-06 13:44 UTC (permalink / raw)
To: Frederic Giasson; +Cc: Abraham vd Merwe, MTD for Linux
fgiasson@mediatrix.com said:
> There is validation, in do_write_oneword ( cfi_cmdset_0002.c ), there
> is pooling to see if data has changed.
Then it's probably b0rken. It should do the appropriate mask before
comparing.
--
dwmw2
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: mtd_info->write
2001-06-06 13:42 ` mtd_info->write kira brown
@ 2001-06-06 13:49 ` David Woodhouse
0 siblings, 0 replies; 13+ messages in thread
From: David Woodhouse @ 2001-06-06 13:49 UTC (permalink / raw)
To: kira brown; +Cc: Frederic Giasson, Abraham vd Merwe, MTD for Linux
kira@linuxgrrls.org said:
> > If you write to a region which already contains data, then read back
> > and compare with the data you wrote, you're likely to see differences.
> And if you don't see differences, then what's the problem?
There is no problem. Either way. I may want to write
~JFFS2_NODETYPE_ACCURATE to a word on the flash chip. I don't care about
any bits apart from the _one_ bit I asked it to zero.
--
dwmw2
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: mtd_info->write
2001-06-06 13:28 ` mtd_info->write Abraham vd Merwe
2001-06-06 13:35 ` mtd_info->write David Woodhouse
@ 2001-06-06 17:50 ` Nicolas Pitre
1 sibling, 0 replies; 13+ messages in thread
From: Nicolas Pitre @ 2001-06-06 17:50 UTC (permalink / raw)
To: Abraham vd Merwe; +Cc: Frederic Giasson, MTD for Linux
On Wed, 6 Jun 2001, Abraham vd Merwe wrote:
> Hi Frederic!
>
> > If the data is all ones ("1"), it has been erased. If not, it has not.
>
> Yes, I know, but I want to know whether I have to check if that's the case
> or not.
The chip should return an error code if it couldn't erase it correctly.
When it returns "done" then you just have to trust it, or signal the error
condition appropriately.
Nicolas
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2001-06-06 17:47 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-06-06 13:38 mtd_info->write Frederic Giasson
2001-06-06 13:44 ` mtd_info->write David Woodhouse
-- strict thread matches above, loose matches on Subject: below --
2001-06-06 13:34 mtd_info->write Frederic Giasson
2001-06-06 13:41 ` mtd_info->write David Woodhouse
2001-06-06 13:42 ` mtd_info->write kira brown
2001-06-06 13:49 ` mtd_info->write David Woodhouse
2001-06-06 13:32 mtd_info->write Frederic Giasson
[not found] <F1BED55F35F4D3118C0F00E0295CFF4D995488@mail.mediatrix.com>
2001-06-06 13:28 ` mtd_info->write Abraham vd Merwe
2001-06-06 13:35 ` mtd_info->write David Woodhouse
2001-06-06 17:50 ` mtd_info->write Nicolas Pitre
2001-06-06 13:25 mtd_info->write Frederic Giasson
2001-06-06 13:35 ` mtd_info->write Abraham vd Merwe
2001-06-06 9:12 mtd_info->write Abraham vd Merwe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox