linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* can't write
@ 2003-05-29  3:19 Trevor Woerner
       [not found] ` <20030529100632.A22378@forte.austin.ibm.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Trevor Woerner @ 2003-05-29  3:19 UTC (permalink / raw)
  To: linuxppc-dev


Now that I can get to the point where I can configure and mount my
compact flash card I find yet another interesting twist... I can't
write to the device.

If I mount it read-only everything is fine. I can read the device, do a
directory listing, copy thing from it, execute binaries, open files...
all that nice stuff. But the instant I try to write, things go up in
smoke.

I wrote my own test modules to try to isolate this issue so I can study
it more. My module gives the same results the kernel gets: no matter
what is written to the device (ATA command 0x30), the entire sector
always ends up being entirely filled with zeros.

Whether I write "0xbeef" 256 times or copy one sector (say sector 0) to
some other place. When I read the newly written sector back, all it
contains are zeros.

Anyone seen something like this before?

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: can't write
       [not found] ` <20030529100632.A22378@forte.austin.ibm.com>
@ 2003-05-30 11:09   ` Trevor Woerner
  0 siblings, 0 replies; 2+ messages in thread
From: Trevor Woerner @ 2003-05-30 11:09 UTC (permalink / raw)
  To: linas; +Cc: linuxppc-dev


On May 29, 2003 11:06 am, you wrote:
> On Wed, May 28, 2003 at 11:19:27PM -0400, Trevor Woerner wrote:
> > contains are zeros.
>
> presumably, you tried two different cards & controllers, to rule out
> a hardware failure?

Thanks for your help and suggestions!

I discovered the problem with writing yesterday, a byte-swapping issue
was causing the LBA address to be inserted into the registers
incorrectly. So it was writing, just not to the sector Linux was
calculating. I'm handling registers 6 and 7 as special cases so the ATA
command was always correct, but not the LBA address!

As you suggested, a hardware issue was at the heart of the "lost
interrupt" problem I was getting. A CF card manufactured by Canon
worked perfectly with no interrupt problem, SanDisk CF cards (as well
as Kingston) don't appear to generate interrupts between the transfer
of each sector in a multi-sector read or write. I think there's a
setting (ATA command) I can look into, and I think there's something in
the 'ide_drive_t' structure to play with (two members starting with
"mult_"). I could also modify the code to create N single sector
read/writes from single read/writes of N sectors.

So everything appears to be working fine, thanks for everyone's help!!

	Trevor

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-05-30 11:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-29  3:19 can't write Trevor Woerner
     [not found] ` <20030529100632.A22378@forte.austin.ibm.com>
2003-05-30 11:09   ` Trevor Woerner

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).