Hi there,

I did successfully pass several ATA commands to HDD which include IDENTIFY
DEVICE, SEEK all the SMART commands. I can read one sector with READ SECTORS
command successfully, but I would get error if I read more than one sector.
Also all the write commands fail.

Now my question is is this the limitation posed by windows atapi driver? Or
there is something wrong on my code?

Second question, if I have to write my own driver that allows me to pass all
the ATA commands to HDD, can I just write a miniport driver? What would be a
good starting point?(What I am trying to achive here is to write a ATA/SATA
testing application. I really would like to avoid writing my driver if
possible.)

Thanks much in advance for any advice you can give!

Re: Do I hit the limit of ATA_PASS_THROUGH and need to write my driver by Gary

Gary
Sat Mar 19 15:29:27 CST 2005

Are you using SP1 or SP2?

--
The personal opinion of
Gary G. Little

"MH-2004" <MH2004@discussions.microsoft.com> wrote in message
news:3D6BF621-E15B-4F00-BB20-8EB6EF4B9403@microsoft.com...
> Hi there,
>
> I did successfully pass several ATA commands to HDD which include IDENTIFY
> DEVICE, SEEK all the SMART commands. I can read one sector with READ
> SECTORS
> command successfully, but I would get error if I read more than one
> sector.
> Also all the write commands fail.
>
> Now my question is is this the limitation posed by windows atapi driver?
> Or
> there is something wrong on my code?
>
> Second question, if I have to write my own driver that allows me to pass
> all
> the ATA commands to HDD, can I just write a miniport driver? What would be
> a
> good starting point?(What I am trying to achive here is to write a
> ATA/SATA
> testing application. I really would like to avoid writing my driver if
> possible.)
>
> Thanks much in advance for any advice you can give!



Re: Do I hit the limit of ATA_PASS_THROUGH and need to write my dr by MH2004

MH2004
Sun Mar 20 03:21:02 CST 2005


Sorry for the infomation I missed in earlier writing, I am running under
WinXP SP2.


"Gary G. Little" wrote:

> Are you using SP1 or SP2?
>
> --
> The personal opinion of
> Gary G. Little
>
> "MH-2004" <MH2004@discussions.microsoft.com> wrote in message
> news:3D6BF621-E15B-4F00-BB20-8EB6EF4B9403@microsoft.com...
> > Hi there,
> >
> > I did successfully pass several ATA commands to HDD which include IDENTIFY
> > DEVICE, SEEK all the SMART commands. I can read one sector with READ
> > SECTORS
> > command successfully, but I would get error if I read more than one
> > sector.
> > Also all the write commands fail.
> >
> > Now my question is is this the limitation posed by windows atapi driver?
> > Or
> > there is something wrong on my code?
> >
> > Second question, if I have to write my own driver that allows me to pass
> > all
> > the ATA commands to HDD, can I just write a miniport driver? What would be
> > a
> > good starting point?(What I am trying to achive here is to write a
> > ATA/SATA
> > testing application. I really would like to avoid writing my driver if
> > possible.)
> >
> > Thanks much in advance for any advice you can give!
>
>
>

Re: Do I hit the limit of ATA_PASS_THROUGH and need to write my driver by Phil

Phil
Wed Apr 06 00:43:22 CDT 2005

"MH-2004" <MH2004@discussions.microsoft.com> wrote in message
news:3D6BF621-E15B-4F00-BB20-8EB6EF4B9403@microsoft.com...
> Hi there,
>
> I did successfully pass several ATA commands to HDD which include IDENTIFY
> DEVICE, SEEK all the SMART commands. I can read one sector with READ
SECTORS
> command successfully, but I would get error if I read more than one
sector.
> Also all the write commands fail.

If you are using Windows XP SP2, you should be able to do one block
transfers in either direction. Only READ / WRITE MULTIPLE (EXT) work
correctly for transfers of more than one block.

>
> Now my question is is this the limitation posed by windows atapi driver?
Or
> there is something wrong on my code?

It's a limitation of the ATAPI driver. Please call Microsoft PSS and beg
them to fix it.

> Second question, if I have to write my own driver that allows me to pass
all
> the ATA commands to HDD, can I just write a miniport driver? What would be
a
> good starting point?(What I am trying to achive here is to write a
ATA/SATA
> testing application. I really would like to avoid writing my driver if
> possible.)

You are going to have to write your own driver, of some form or other. What
kind of driver you write depends on what functionality you want to have. If
you want to have a fully functional Windows storage stack, with some extra
hooks for testing thrown in, you will probably be able to do almost
everything you want to do with a SCSI miniport with some testing IOCTLs.

If you don't need it to actually be a storage device, it's a lot simpler to
write your own port driver that doesn't expose a disk interface to the OS,
then you only have to implement the testing functionality you need.

Phil
--
Philip D. Barila Windows DDK MVP
Seagate Technology, LLC
(720) 684-1842
As if I need to say it: Not speaking for Seagate.
E-mail address is pointed at a domain squatter. Use reply-to instead.



Re: Do I hit the limit of ATA_PASS_THROUGH and need to write my dr by MH2004

MH2004
Wed Apr 06 19:09:02 CDT 2005

to Thanks a lot Phil. Based what you said, looks like I just need write a
port driver and provide a set of IOCTLs so that I can access all the task
file registers and transfer data between my application and the ATA/SATA
device. I will try READ/WRITE Multiple as well.


"Phil Barila" wrote:

> "MH-2004" <MH2004@discussions.microsoft.com> wrote in message
> news:3D6BF621-E15B-4F00-BB20-8EB6EF4B9403@microsoft.com...
> > Hi there,
> >
> > I did successfully pass several ATA commands to HDD which include IDENTIFY
> > DEVICE, SEEK all the SMART commands. I can read one sector with READ
> SECTORS
> > command successfully, but I would get error if I read more than one
> sector.
> > Also all the write commands fail.
>
> If you are using Windows XP SP2, you should be able to do one block
> transfers in either direction. Only READ / WRITE MULTIPLE (EXT) work
> correctly for transfers of more than one block.
>
> >
> > Now my question is is this the limitation posed by windows atapi driver?
> Or
> > there is something wrong on my code?
>
> It's a limitation of the ATAPI driver. Please call Microsoft PSS and beg
> them to fix it.
>
> > Second question, if I have to write my own driver that allows me to pass
> all
> > the ATA commands to HDD, can I just write a miniport driver? What would be
> a
> > good starting point?(What I am trying to achive here is to write a
> ATA/SATA
> > testing application. I really would like to avoid writing my driver if
> > possible.)
>
> You are going to have to write your own driver, of some form or other. What
> kind of driver you write depends on what functionality you want to have. If
> you want to have a fully functional Windows storage stack, with some extra
> hooks for testing thrown in, you will probably be able to do almost
> everything you want to do with a SCSI miniport with some testing IOCTLs.
>
> If you don't need it to actually be a storage device, it's a lot simpler to
> write your own port driver that doesn't expose a disk interface to the OS,
> then you only have to implement the testing functionality you need.
>
> Phil
> --
> Philip D. Barila Windows DDK MVP
> Seagate Technology, LLC
> (720) 684-1842
> As if I need to say it: Not speaking for Seagate.
> E-mail address is pointed at a domain squatter. Use reply-to instead.
>
>
>