Subject: newbie ata drivers
To: None <netbsd-help@netbsd.org>
From: Ferry Sutanto <fsutanto@yahoo.com>
List: netbsd-help
Date: 09/07/2001 15:32:56
Hi,

I apologize if this is not the right medium for my
question, but I see Manuel Bouyer name on NetBSD
sources for ata stuff, so I want to give it a shot :)

I have a code which write the whole sector 1 with
0xbeef and it works.

unsigned short buf[256];
write1(s, COMMAND, C_WRITE);
for (i = 0; i < sizeof buf / sizeof *buf; i++)
    write2(s, DATA, 0xbeef);


The problem is that when I try to write the whole
sector with unsigned char buf[512] which contains
different value like: 11223344 ...., it doesn't work.
When i read the sector, the whole sector contains the
value of the last one being written.

If anybody can shed some light, it will be great.

Thanks!

Ferry

__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com