Subject: Re: newbie ata drivers
To: Ferry Sutanto <fsutanto@yahoo.com>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: netbsd-help
Date: 09/08/2001 23:04:21
On Fri, Sep 07, 2001 at 03:32:56PM -0700, Ferry Sutanto wrote:
> 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.

I don't really understand what's you're trying to do. Under what OS
are you doing this ?

--
Manuel Bouyer <bouyer@antioche.eu.org>
--