Author: apriyadarshi
Date: Tue Jul 26 15:38:14 2016
New Revision: 72005
URL:
http://svn.reactos.org/svn/reactos?rev=72005&view=rev
Log:
Fixed write crashes, write support working. Tested on win2k3 sp2 vmware sata
Modified:
branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.c
Modified: branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.c
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2016/AHCI/drivers/storage/…
==============================================================================
--- branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.c [iso-8859-1] (original)
+++ branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.c [iso-8859-1] Tue Jul 26
15:38:14 2016
@@ -1800,7 +1800,6 @@
{
SrbExtension->Flags |= ATA_FLAGS_DATA_OUT;
SrbExtension->CommandReg = IDE_COMMAND_WRITE_DMA;
- //NT_ASSERT(FALSE);
}
SrbExtension->FeaturesLow = 0;
@@ -1813,7 +1812,15 @@
if (PortExtension->DeviceParams.Lba48BitMode)
{
SrbExtension->Flags |= ATA_FLAGS_48BIT_COMMAND;
- SrbExtension->CommandReg = IDE_COMMAND_READ_DMA_EXT;
+
+ if (IsReading)
+ {
+ SrbExtension->CommandReg = IDE_COMMAND_READ_DMA_EXT;
+ }
+ else
+ {
+ SrbExtension->CommandReg = IDE_COMMAND_WRITE_DMA_EXT;
+ }
SrbExtension->LBA3 = (StartOffset >> 24) & 0xFF;
SrbExtension->LBA4 = (StartOffset >> 32) & 0xFF;