https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3fb5ca3beee8a0310c4cc…
commit 3fb5ca3beee8a0310c4cc70fb9448206de29fe9c
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Tue Jun 25 09:05:43 2019 +0200
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Tue Jun 25 09:26:09 2019 +0200
[UNIATA] Update to version 0.47a. CORE-15930
---
drivers/storage/ide/uniata/atacmd_map.h | 2 +-
drivers/storage/ide/uniata/bsmaster.h | 1 +
drivers/storage/ide/uniata/id_ata.cpp | 2 +-
drivers/storage/ide/uniata/id_sata.cpp | 12 ++++++------
drivers/storage/ide/uniata/id_sata.h | 2 +-
drivers/storage/ide/uniata/todo.txt | 2 +-
drivers/storage/ide/uniata/uniata_ver.h | 10 +++++-----
7 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/drivers/storage/ide/uniata/atacmd_map.h
b/drivers/storage/ide/uniata/atacmd_map.h
index 2b62e372589..d2adb7eece4 100644
--- a/drivers/storage/ide/uniata/atacmd_map.h
+++ b/drivers/storage/ide/uniata/atacmd_map.h
@@ -1,5 +1,5 @@
-// Build Version 0.46e8
+// Build Version 0.47a
UCHAR const AtaCommands48[256] = {
diff --git a/drivers/storage/ide/uniata/bsmaster.h
b/drivers/storage/ide/uniata/bsmaster.h
index ac055b3be28..ed42cc7ba97 100644
--- a/drivers/storage/ide/uniata/bsmaster.h
+++ b/drivers/storage/ide/uniata/bsmaster.h
@@ -709,6 +709,7 @@ typedef struct _IDE_AHCI_PORT_REGISTERS {
#define ATA_AHCI_P_CMD_HPCP 0x00040000
#define ATA_AHCI_P_CMD_ISP 0x00080000
#define ATA_AHCI_P_CMD_CPD 0x00100000
+#define ATA_AHCI_P_CMD_ESP 0x00200000
#define ATA_AHCI_P_CMD_ATAPI 0x01000000
#define ATA_AHCI_P_CMD_DLAE 0x02000000
#define ATA_AHCI_P_CMD_ALPE 0x04000000
diff --git a/drivers/storage/ide/uniata/id_ata.cpp
b/drivers/storage/ide/uniata/id_ata.cpp
index 4c8e15944e4..0a0c586a7ce 100644
--- a/drivers/storage/ide/uniata/id_ata.cpp
+++ b/drivers/storage/ide/uniata/id_ata.cpp
@@ -11281,7 +11281,7 @@ AtapiRegCheckDevValue(
val = AtapiRegCheckDevLunValue(
HwDeviceExtension, namex, chan, dev, Name, val);
}
- if(!(HwFlags & (UNIATA_AHCI | UNIATA_AHCI))) {
+ if(!(HwFlags & (UNIATA_SATA | UNIATA_AHCI))) {
swprintf(namev, L"\\PATA");
swprintf(namex, L"Parameters%s", namev);
val = AtapiRegCheckDevLunValue(
diff --git a/drivers/storage/ide/uniata/id_sata.cpp
b/drivers/storage/ide/uniata/id_sata.cpp
index 32c4c9008d5..2c67131983c 100644
--- a/drivers/storage/ide/uniata/id_sata.cpp
+++ b/drivers/storage/ide/uniata/id_sata.cpp
@@ -1077,7 +1077,7 @@ UniataAhciDetect(
v_Mj = ((version >> 20) & 0xf0) + ((version >> 16) & 0x0f);
v_Mn = ((version >> 4) & 0xf0) + (version & 0x0f);
- KdPrint2((PRINT_PREFIX " AHCI version %#x.%02x controller with %d ports (mask
%#x) detected\n",
+ KdPrint2((PRINT_PREFIX " AHCI version %x.%02x controller with %d ports (mask
%#x) detected\n",
v_Mj, v_Mn,
NumberChannels, PI));
KdPrint((" AHCI SATA Gen %d\n", (((CAP & AHCI_CAP_ISS_MASK) >>
20)) ));
@@ -2237,22 +2237,22 @@ UniataAhciBeginTransaction(
if(CMD0 != CMD) {
KdPrint2((" send CMD %#x, entries %#x\n", CMD,
AHCI_CL->prd_length));
UniataAhciWriteChannelPort4(chan, IDX_AHCI_P_CMD, CMD);
- UniataAhciReadChannelPort4(chan, IDX_AHCI_P_CMD); /* flush */
+ CMD0 = UniataAhciReadChannelPort4(chan, IDX_AHCI_P_CMD); /* flush */
}
/* issue command to controller */
- //UniataAhciWriteChannelPort4(chan, IDX_AHCI_P_ACT, 0x01 << tag);
+ //UniataAhciWriteChannelPort4(chan, IDX_AHCI_P_ACT, 0x01 << tag); // Used for
NCQ
KdPrint2((" Set CI\n"));
UniataAhciWriteChannelPort4(chan, IDX_AHCI_P_CI, 0x01 << tag);
chan->AhciPrevCI |= 0x01 << tag;
- CMD0 = CMD;
+ //CMD0 = CMD;
CMD |= ATA_AHCI_P_CMD_ST |
((chan->ChannelCtrlFlags & CTRFLAGS_AHCI_PM) ? ATA_AHCI_P_CMD_PMA : 0);
if(CMD != CMD0) {
- KdPrint2((" Send CMD START\n"));
+ KdPrint2((" Send CMD START (%#x != %#x)\n", CMD, CMD0));
UniataAhciWriteChannelPort4(chan, IDX_AHCI_P_CMD, CMD);
- UniataAhciReadChannelPort4(chan, IDX_AHCI_P_CMD); /* flush */
+ CMD0 = UniataAhciReadChannelPort4(chan, IDX_AHCI_P_CMD); /* flush */
} else {
KdPrint2((" No CMD START, already active\n"));
}
diff --git a/drivers/storage/ide/uniata/id_sata.h b/drivers/storage/ide/uniata/id_sata.h
index 692d6bdf6a4..4e742197f89 100644
--- a/drivers/storage/ide/uniata/id_sata.h
+++ b/drivers/storage/ide/uniata/id_sata.h
@@ -292,7 +292,7 @@ UniataAhciReadChannelPort4(
IN ULONG io_port_ndx
)
{
- ULONG v = AtapiReadPortEx4(NULL, (ULONGIO_PTR)&((chan)->BaseIoAHCI_Port),
io_port_ndx);
+ volatile ULONG v = AtapiReadPortEx4(NULL,
(ULONGIO_PTR)&((chan)->BaseIoAHCI_Port), io_port_ndx);
KdPrint3((PRINT_PREFIX "ReadChannelPort4 ch%d[%x] = %x\n",
chan->lChannel, io_port_ndx, v));
return v;
} // end UniataAhciReadChannelPort4()
diff --git a/drivers/storage/ide/uniata/todo.txt b/drivers/storage/ide/uniata/todo.txt
index ad16c0fc1e5..677b348d438 100644
--- a/drivers/storage/ide/uniata/todo.txt
+++ b/drivers/storage/ide/uniata/todo.txt
@@ -254,4 +254,4 @@
158.implement .INF generator
159.fix bug with invalid INF section under XP+ (43e2)
160.add INF handler for SCSI\NET\VEN_UNIATA&PROD_MANAGEMENT_PORT
-161.
+161.
\ No newline at end of file
diff --git a/drivers/storage/ide/uniata/uniata_ver.h
b/drivers/storage/ide/uniata/uniata_ver.h
index 28a985f1e4b..2ff884e01af 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 "47"
-#define UNIATA_VER_DOT 0.47.0.0
+#define UNIATA_VER_STR "47a"
+#define UNIATA_VER_DOT 0.47.1.0
#define UNIATA_VER_MJ 0
#define UNIATA_VER_MN 47
-#define UNIATA_VER_SUB_MJ 0
+#define UNIATA_VER_SUB_MJ 1
#define UNIATA_VER_SUB_MN 0
-#define UNIATA_VER_DOT_COMMA 0,47,0,0
-#define UNIATA_VER_DOT_STR "0.47.0.0"
+#define UNIATA_VER_DOT_COMMA 0,47,1,0
+#define UNIATA_VER_DOT_STR "0.47.1.0"
#define UNIATA_VER_YEAR 2019
#define UNIATA_VER_YEAR_STR "2019"