https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a76fdbd8cb5ea6a28b1e1…
commit a76fdbd8cb5ea6a28b1e18213544988d767887e2
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Mon Dec 25 14:17:53 2017 +0100
[UNIATA] Update to v0.46e5. CORE-14117
---
drivers/storage/ide/uniata/bm_devs.h | 2 +-
drivers/storage/ide/uniata/bm_devs_decl.h | 1 +
drivers/storage/ide/uniata/id_ata.cpp | 9 +++++----
drivers/storage/ide/uniata/id_dma.cpp | 4 ++++
drivers/storage/ide/uniata/uniata_ver.h | 10 +++++-----
5 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/drivers/storage/ide/uniata/bm_devs.h b/drivers/storage/ide/uniata/bm_devs.h
index ccf471fff7..89da4f1550 100644
--- a/drivers/storage/ide/uniata/bm_devs.h
+++ b/drivers/storage/ide/uniata/bm_devs.h
@@ -288,7 +288,7 @@ BUSMASTER_CONTROLLER_INFORMATION_BASE const BusMasterAdapters[] = {
PCI_DEV_HW_SPEC_BM( 037f, 10de, 0x00, ATA_SA300, "nVidia nForce MCP55
S2",NV4OFF | NVQ | UNIATA_SATA ),
PCI_DEV_HW_SPEC_BM( 03ec, 10de, 0x00, ATA_UDMA6, "nVidia nForce MCP61", 0
),
PCI_DEV_HW_SPEC_BM( 03e7, 10de, 0x00, ATA_SA300, "nVidia nForce MCP61
S1",NV4OFF | NVQ | UNIATA_SATA ),
- PCI_DEV_HW_SPEC_BM( 03f6, 10de, 0x00, ATA_SA300, "nVidia nForce MCP61
S2",NV4OFF | NVQ | UNIATA_SATA ),
+ PCI_DEV_HW_SPEC_BM( 03f6, 10de, 0x00, ATA_SA300, "nVidia nForce MCP61
S2",NVGEN | UNIATA_SATA ),
PCI_DEV_HW_SPEC_BM( 03f7, 10de, 0x00, ATA_SA300, "nVidia nForce MCP61
S3",NV4OFF | NVQ | UNIATA_SATA ),
PCI_DEV_HW_SPEC_BM( 0448, 10de, 0x00, ATA_UDMA6, "nVidia nForce MCP65", 0
),
PCI_DEV_HW_SPEC_BM( 044c, 10de, 0x00, ATA_SA300, "nVidia nForce MCP65 A0",
UNIATA_SATA | UNIATA_AHCI ),
diff --git a/drivers/storage/ide/uniata/bm_devs_decl.h
b/drivers/storage/ide/uniata/bm_devs_decl.h
index 61f8c9598f..16070cd530 100644
--- a/drivers/storage/ide/uniata/bm_devs_decl.h
+++ b/drivers/storage/ide/uniata/bm_devs_decl.h
@@ -696,6 +696,7 @@ typedef struct _BUSMASTER_CONTROLLER_INFORMATION {
#define NV4OFF 0x0100
#define NVQ 0x0200
+#define NVGEN 0x0400
#define VIANEW 5
#define VIA33 4
diff --git a/drivers/storage/ide/uniata/id_ata.cpp
b/drivers/storage/ide/uniata/id_ata.cpp
index f823e4f636..6f0f1da94a 100644
--- a/drivers/storage/ide/uniata/id_ata.cpp
+++ b/drivers/storage/ide/uniata/id_ata.cpp
@@ -4616,7 +4616,7 @@ AtapiCheckInterrupt__(
}
break; }
case ATA_NVIDIA_ID: {
- if(!(ChipFlags & UNIATA_SATA))
+ if(!(ChipFlags & UNIATA_SATA) || (ChipFlags & NVGEN))
break;
KdPrint2((PRINT_PREFIX "NVIDIA\n"));
@@ -7987,6 +7987,7 @@ make_reset:
// must be already selected, experimental for ROS BUG-9119
//AtapiWritePort1(chan, IDX_IO1_o_DriveSelect, IDE_USE_LBA | (DeviceNumber ?
IDE_DRIVE_2 : IDE_DRIVE_1) );
+ AtapiWritePort1(chan, IDX_IO2_o_Control , 0);
AtapiWritePort1(chan, IDX_ATAPI_IO1_o_Feature /*IDX_IO1_o_Feature*/, FeatureReg);
//AtapiWritePort1(chan, IDX_ATAPI_IO1_o_Unused0, 0); // experimental for ROS
BUG-9119
//AtapiWritePort1(chan, IDX_ATAPI_IO1_o_Unused1, 0); // experimental for ROS
BUG-9119
@@ -8712,7 +8713,7 @@ invalid_cdb:
statusByte = WaitOnBaseBusy(chan);
//SelectDrive(chan, DeviceNumber);
- if (cdb->MEDIA_REMOVAL.Prevent != FALSE) {
+ if (cdb->MEDIA_REMOVAL.Prevent == TRUE) {
//AtapiWritePort1(chan, IDX_IO1_o_Command,IDE_COMMAND_DOOR_LOCK);
statusByte = AtaCommand(deviceExtension, DeviceNumber, lChannel,
IDE_COMMAND_DOOR_LOCK, 0, 0, 0, 0, 0, ATA_IMMEDIATE);
} else {
@@ -9002,7 +9003,7 @@ IdeMediaStatus(
chan = &(deviceExtension->chan[lChannel]);
SelectDrive(chan, DeviceNumber);
- if (EnableMSN != FALSE){
+ if (EnableMSN == TRUE){
// If supported enable Media Status Notification support
if ((chan->lun[DeviceNumber]->DeviceFlags & DFLAGS_REMOVABLE_DRIVE)) {
@@ -9028,7 +9029,7 @@ IdeMediaStatus(
}
}
- } else { // end if EnableMSN != FALSE
+ } else { // end if EnableMSN == TRUE
// disable if previously enabled
if ((chan->lun[DeviceNumber]->DeviceFlags &
DFLAGS_MEDIA_STATUS_ENABLED)) {
diff --git a/drivers/storage/ide/uniata/id_dma.cpp
b/drivers/storage/ide/uniata/id_dma.cpp
index d789616ae1..eef324aa7a 100644
--- a/drivers/storage/ide/uniata/id_dma.cpp
+++ b/drivers/storage/ide/uniata/id_dma.cpp
@@ -152,6 +152,10 @@ AtapiDmaAlloc(
if(!deviceExtension->Host64 && (WinVer_Id() > WinVer_NT)) {
KdPrint2((PRINT_PREFIX "AtapiDmaAlloc: allocate tmp buffers below
4Gb\n"));
+ if(chan->DB_PRD) {
+ KdPrint2((PRINT_PREFIX " already initialized %x\n",
chan->DB_PRD));
+ return;
+ }
chan->DB_PRD =
MmAllocateContiguousMemory(sizeof(((PATA_REQ)NULL)->dma_tab), ph4gb);
if(chan->DB_PRD) {
chan->DB_PRD_PhAddr = AtapiVirtToPhysAddr(HwDeviceExtension, NULL,
(PUCHAR)(chan->DB_PRD), &i, &ph_addru);
diff --git a/drivers/storage/ide/uniata/uniata_ver.h
b/drivers/storage/ide/uniata/uniata_ver.h
index 3a00321dfc..2a6ad98c70 100644
--- a/drivers/storage/ide/uniata/uniata_ver.h
+++ b/drivers/storage/ide/uniata/uniata_ver.h
@@ -1,10 +1,10 @@
-#define UNIATA_VER_STR "46e3"
-#define UNIATA_VER_DOT 0.46.5.3
+#define UNIATA_VER_STR "46e5"
+#define UNIATA_VER_DOT 0.46.5.5
#define UNIATA_VER_MJ 0
#define UNIATA_VER_MN 46
#define UNIATA_VER_SUB_MJ 5
-#define UNIATA_VER_SUB_MN 3
-#define UNIATA_VER_DOT_COMMA 0,46,5,3
-#define UNIATA_VER_DOT_STR "0.46.5.3"
+#define UNIATA_VER_SUB_MN 5
+#define UNIATA_VER_DOT_COMMA 0,46,5,5
+#define UNIATA_VER_DOT_STR "0.46.5.5"
#define UNIATA_VER_YEAR 2017
#define UNIATA_VER_YEAR_STR "2017"