[OT] Getting error when using FSCTL_FILE_LEVEL_TRIM

Thanks, Mark.

So, which driver is responsible for passing the trim command all the
way down to the disk?

Also, when BIOS has native ACHI and IDE modes for SATA, is the former
better for the “trim” things to work?
Or, if nothing in Win7 is aware of “trim”, is some driver needed from
the SSD vendor? I have not seen anything of this sort for my SSD.

Regards,
– pa

On 14-May-2012 22:15, Mark Roddy wrote:

It is in Win7. I have no idea about win8. Neither scsiport nor
storport know/knew what to do with it.

Mark Roddy

On Mon, May 14, 2012 at 3:06 PM, Pavel A wrote:
>> Apologize for jumping in.
>>
>> Is an ACHI driver really needed in order to pass the trim command?
>> The MSDN link does not say this.
>>
>> Thanks,
>> – pa
>>
>>
>> On 14-May-2012 21:49, Mark Roddy wrote:
>>>
>>>
>>> http://msdn.microsoft.com/en-us/library/windows/desktop/hh447306(v=vs.85).aspx
>>>
>>> Gives the user mode access using DeviceIoControl. However, as has been
>>> explained to the OP over on the windows forum, this command will only
>>> work on disks that support it (SSD) using port drivers that know what
>>> to do with it (AHCI).
>>>
>>>
>>> Mark Roddy

Pavel A wrote:

So, which driver is responsible for passing the trim command all the
way down to the disk?

This is not a disk command, this is a file system command. Isn’t it?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

On 17-May-2012 19:44, Tim Roberts wrote:

Pavel A wrote:
> So, which driver is responsible for passing the trim command all the
> way down to the disk?

This is not a disk command, this is a file system command. Isn’t it?

Yep. It is. It has to be translated to something understandable by the SSD.
Is this translation affected by how the disk controller presents itself
the the OS: IDE or AHCI? Will SSD degrade quickly under WinXP (it does
not send “trims”)?

Thanks,
– pa

The AHCI driver is responsible to it.
And if you want your os support NCQ or trim command, you need to change the sata mode to ahci on BIOS.
BTW,windows supported trim command since win7.–referenced on wiki

wrote in message news:xxxxx@ntdev…
> The AHCI driver is responsible to it.
> And if you want your os support NCQ or trim command, you need to change
> the sata mode to ahci on BIOS.
> BTW,windows supported trim command since win7.–referenced on wiki

Thank you! Will then reinstall my Win8 in AHCI mode
(hoped that it would automagicaly pick up the boot volume after the
mode change… alas, it fails exactly like its predecessors).

– pa

> Thank you! Will then reinstall my Win8 in AHCI mode

Also install Intel Matrix driver for this, since MS’s AHCI driver is buggy and has the same bug for years since Vista gold with no one to fix it.

It has a race in register access, which causes the whole controller to hang and be recovered from it only by timeout of something like 30 seconds.

Also, the MS’s KB is aware about this bug, but suggests no new driver binary to be downloaded! the morons which created the article want you to email them with a moronic question about “why do you need this fix?”, and these emails are never responded to.

It’s amazing that the well-known bug persists for years without being fixed.

So, without vendor’s (like Intel’s) driver, Windows does not support AHCI.

There were times when IAA (predecessor of Intel Matrix) was buggy and caused crashes in PnP paths, but, for now, I’m using it for ~2 years on several machines and have no problems.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

Thank you Maxim too. This time it is an AMD machine, so will search there.
Let’s not offend the fine support folks… it probably was just a case of
“preliminary outsourcing” both in MS and Intel :frowning:
– pa

“Maxim S. Shatskih” wrote in message
news:xxxxx@ntdev…
>> Thank you! Will then reinstall my Win8 in AHCI mode
>
> Also install Intel Matrix driver for this, since MS’s AHCI driver is buggy
> and has the same bug for years since Vista gold with no one to fix it.
>
> It has a race in register access, which causes the whole controller to
> hang and be recovered from it only by timeout of something like 30
> seconds.
>
> Also, the MS’s KB is aware about this bug, but suggests no new driver
> binary to be downloaded! the morons which created the article want you to
> email them with a moronic question about “why do you need this fix?”, and
> these emails are never responded to.
>
> It’s amazing that the well-known bug persists for years without being
> fixed.
>
> So, without vendor’s (like Intel’s) driver, Windows does not support AHCI.
>
> There were times when IAA (predecessor of Intel Matrix) was buggy and
> caused crashes in PnP paths, but, for now, I’m using it for ~2 years on
> several machines and have no problems.
>
> –
> Maxim S. Shatskih
> Windows DDK MVP
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>

> “preliminary outsourcing” both in MS and Intel :frowning:

msahci.sys is not Intel’s and is provided in WDK samples.

Some people do fix this bug in msahci from source and then install their own binary, bypassing the cert checks by SetupDi via ImagePath registry.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com