* inappropriate ioctl when attaching
@ 2011-05-11 16:17 David Wagner
2011-05-12 7:03 ` Ricard Wanderlof
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: David Wagner @ 2011-05-11 16:17 UTC (permalink / raw)
To: linux-mtd
Hi,
I put a ubi image on a sheevaplug but got those errors:
uncorrectable error :
UBI error: ubi_io_read: error -74 (ECC error) while reading 512 bytes
from PEB 39:512, read 512 bytes
So I tried to use ubiformat and ubiattach but after a successful
ubiformat, I got the following error:
# ubiattach -p /dev/mtd2
ubiattach: error!: cannot attach "/dev/mtd2"
error 25 (Inappropriate ioctl for device)
I've never seen this and google doesn't help much. I could flash a jffs2
image w/o problem.
Does anybody have a pointer != NULL ?
Cheers,
David.
--
David Wagner, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: inappropriate ioctl when attaching
2011-05-11 16:17 inappropriate ioctl when attaching David Wagner
@ 2011-05-12 7:03 ` Ricard Wanderlof
2011-05-12 7:25 ` David Wagner
2011-05-12 9:27 ` Artem Bityutskiy
2011-05-12 11:57 ` Artem Bityutskiy
2 siblings, 1 reply; 6+ messages in thread
From: Ricard Wanderlof @ 2011-05-12 7:03 UTC (permalink / raw)
To: David Wagner; +Cc: linux-mtd@lists.infradead.org
On Wed, 11 May 2011, David Wagner wrote:
> Hi,
>
> I put a ubi image on a sheevaplug but got those errors:
> uncorrectable error :
> UBI error: ubi_io_read: error -74 (ECC error) while reading 512 bytes
> from PEB 39:512, read 512 bytes
>
> So I tried to use ubiformat and ubiattach but after a successful
> ubiformat, I got the following error:
>
> # ubiattach -p /dev/mtd2
> ubiattach: error!: cannot attach "/dev/mtd2"
> error 25 (Inappropriate ioctl for device)
>
> I've never seen this and google doesn't help much. I could flash a jffs2
> image w/o problem.
What happens if you do ubiattach -m 2 instead, i.e. specifying the mtd
number rather than the complete device path?
/Ricard
--
Ricard Wolf Wanderlöf ricardw(at)axis.com
Axis Communications AB, Lund, Sweden www.axis.com
Phone +46 46 272 2016 Fax +46 46 13 61 30
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: inappropriate ioctl when attaching
2011-05-12 7:03 ` Ricard Wanderlof
@ 2011-05-12 7:25 ` David Wagner
0 siblings, 0 replies; 6+ messages in thread
From: David Wagner @ 2011-05-12 7:25 UTC (permalink / raw)
To: Ricard Wanderlof; +Cc: linux-mtd@lists.infradead.org
On 05/12/2011 09:03 AM, Ricard Wanderlof wrote:
>
> On Wed, 11 May 2011, David Wagner wrote:
>> # ubiattach -p /dev/mtd2
>> ubiattach: error!: cannot attach "/dev/mtd2"
>> error 25 (Inappropriate ioctl for device)
>>
> What happens if you do ubiattach -m 2 instead, i.e. specifying the mtd
> number rather than the complete device path?
I also tried
ubiattach /dev/ubi_ctrl -m 2
but it didn't change anything
David.
--
David Wagner, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: inappropriate ioctl when attaching
2011-05-11 16:17 inappropriate ioctl when attaching David Wagner
2011-05-12 7:03 ` Ricard Wanderlof
@ 2011-05-12 9:27 ` Artem Bityutskiy
2011-05-12 9:31 ` Artem Bityutskiy
2011-05-12 11:57 ` Artem Bityutskiy
2 siblings, 1 reply; 6+ messages in thread
From: Artem Bityutskiy @ 2011-05-12 9:27 UTC (permalink / raw)
To: David Wagner; +Cc: linux-mtd
On Wed, 2011-05-11 at 18:17 +0200, David Wagner wrote:
> # ubiattach -p /dev/mtd2
> ubiattach: error!: cannot attach "/dev/mtd2"
> error 25 (Inappropriate ioctl for device)
>
> I've never seen this and google doesn't help much. I could flash a jffs2
> image w/o problem.
>
> Does anybody have a pointer != NULL ?
This probably means you are using too kernel where UBI does not support
this ioctl. Dynamic attach / detach were not part of the initial UBI
which want into the kernel, AFAIR.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: inappropriate ioctl when attaching
2011-05-12 9:27 ` Artem Bityutskiy
@ 2011-05-12 9:31 ` Artem Bityutskiy
0 siblings, 0 replies; 6+ messages in thread
From: Artem Bityutskiy @ 2011-05-12 9:31 UTC (permalink / raw)
To: David Wagner; +Cc: linux-mtd
On Thu, 2011-05-12 at 12:27 +0300, Artem Bityutskiy wrote:
> This probably means you are using too kernel where UBI does not support
Sorry, s/too kernel/too old kernel/
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: inappropriate ioctl when attaching
2011-05-11 16:17 inappropriate ioctl when attaching David Wagner
2011-05-12 7:03 ` Ricard Wanderlof
2011-05-12 9:27 ` Artem Bityutskiy
@ 2011-05-12 11:57 ` Artem Bityutskiy
2 siblings, 0 replies; 6+ messages in thread
From: Artem Bityutskiy @ 2011-05-12 11:57 UTC (permalink / raw)
To: David Wagner; +Cc: linux-mtd
On Wed, 2011-05-11 at 18:17 +0200, David Wagner wrote:
> Hi,
>
> I put a ubi image on a sheevaplug but got those errors:
> uncorrectable error :
> UBI error: ubi_io_read: error -74 (ECC error) while reading 512 bytes
> from PEB 39:512, read 512 bytes
Please, run mtd tests on your device and validate your flash first:
http://www.linux-mtd.infradead.org/doc/general.html#L_mtd_tests
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-05-12 12:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-11 16:17 inappropriate ioctl when attaching David Wagner
2011-05-12 7:03 ` Ricard Wanderlof
2011-05-12 7:25 ` David Wagner
2011-05-12 9:27 ` Artem Bityutskiy
2011-05-12 9:31 ` Artem Bityutskiy
2011-05-12 11:57 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).