Author: zguo
Date: Mon Oct 27 17:10:31 2014
New Revision: 65046
URL:
http://svn.reactos.org/svn/reactos?rev=65046&view=rev
Log:
[UNIATA]
Update version of UNIATA to 45b1 for 0.3.17.
Modified:
branches/0.3.17/reactos/ (props changed)
branches/0.3.17/reactos/drivers/storage/ide/uniata/id_ata.cpp
branches/0.3.17/reactos/drivers/storage/ide/uniata/id_dma.cpp
branches/0.3.17/reactos/drivers/storage/ide/uniata/id_sata.cpp
branches/0.3.17/reactos/drivers/storage/ide/uniata/uniata_ver.h
Propchange: branches/0.3.17/reactos/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Oct 27 17:10:31 2014
@@ -18,4 +18,4 @@
/branches/usb-bringup:51335,51337,51341-51343,51348,51350,51353,51355,51365-51369,51372,51384-54388,54396-54398,54736-54737,54752-54754,54756-54760,54762,54764-54765,54767-54768,54772,54774-54777,54781,54787,54790-54792,54797-54798,54806,54808,54834-54838,54843,54850,54852,54856,54858-54859
/branches/usb-bringup-trunk:55019-55543,55548-55554,55556-55567
/branches/wlan-bringup:54809-54998
-/trunk/reactos:64752-64754,64765,64769,64771,64776,64793,64800,64825,64829,64832-64833,64859,64908-64909
+/trunk/reactos:64752-64754,64765,64769,64771,64776,64793,64800,64825,64829,64832-64833,64855-64856,64859,64908-64909
Modified: branches/0.3.17/reactos/drivers/storage/ide/uniata/id_ata.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/0.3.17/reactos/drivers/storage/…
==============================================================================
--- branches/0.3.17/reactos/drivers/storage/ide/uniata/id_ata.cpp [iso-8859-1] (original)
+++ branches/0.3.17/reactos/drivers/storage/ide/uniata/id_ata.cpp [iso-8859-1] Mon Oct 27
17:10:31 2014
@@ -1692,7 +1692,7 @@
deviceExtension->FullIdentifyData.NVCache_Version
));
- KdPrint2((PRINT_PREFIX "R-rate %#x\n",
+ KdPrint2((PRINT_PREFIX "R-rate %d\n",
deviceExtension->FullIdentifyData.NominalMediaRotationRate
));
@@ -5071,9 +5071,9 @@
if(AtaReq->retry < MAX_RETRIES) {
//fallback_pio:
if(!(deviceExtension->HwFlags & UNIATA_AHCI)) {
- AtaReq->Flags &= ~REQ_FLAG_DMA_OPERATION;
+ //AtaReq->Flags &= ~REQ_FLAG_DMA_OPERATION;
+ // Downrate will happen in AtapiDmaReinit(), try UDMA-2 for
HDD only
AtaReq->Flags |= REQ_FLAG_FORCE_DOWNRATE;
-// LunExt->DeviceFlags |= DFLAGS_FORCE_DOWNRATE;
}
AtaReq->ReqState = REQ_STATE_QUEUED;
goto reenqueue_req;
@@ -5093,6 +5093,7 @@
((error >> 4) == SCSI_SENSE_HARDWARE_ERROR)) {
if(AtaReq->retry < MAX_RETRIES) {
//fallback_pio:
+ // Downrate will happen in AtapiDmaReinit(), use PIO immediately for
ATAPI
AtaReq->Flags &= ~REQ_FLAG_DMA_OPERATION;
AtaReq->Flags |= REQ_FLAG_FORCE_DOWNRATE;
// LunExt->DeviceFlags |= DFLAGS_FORCE_DOWNRATE;
@@ -5449,6 +5450,7 @@
chan->ChannelCtrlFlags &= ~CTRFLAGS_DMA_OPERATION;
goto CompleteRequest;
}
+continue_read_drq:
// Ensure that this is a read command.
if (srb->SrbFlags & SRB_FLAGS_DATA_IN) {
@@ -5489,7 +5491,6 @@
}
}
}
-
} else {
KdPrint2((PRINT_PREFIX
"IdeIntr: Read %#x Dwords\n", wordCount/2));
@@ -5580,6 +5581,12 @@
status = SRB_STATUS_SUCCESS;
goto CompleteRequest;
+ }
+ } else {
+ if(!atapiDev && !DataOverrun && (srb->SrbFlags &
SRB_FLAGS_DATA_IN) &&
+ (statusByte == (IDE_STATUS_IDLE | IDE_STATUS_DRQ))) {
+ KdPrint2((PRINT_PREFIX " HDD read data ready \n"));
+ goto continue_read_drq;
}
}
}
@@ -6689,6 +6696,7 @@
// Adjust buffer address and words left count.
AtaReq->WordsLeft -= wordCount;
AtaReq->DataBuffer += wordCount;
+ AtaReq->WordsTransfered += wordCount;
// Wait for interrupt.
return SRB_STATUS_PENDING;
Modified: branches/0.3.17/reactos/drivers/storage/ide/uniata/id_dma.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/0.3.17/reactos/drivers/storage/…
==============================================================================
--- branches/0.3.17/reactos/drivers/storage/ide/uniata/id_dma.cpp [iso-8859-1] (original)
+++ branches/0.3.17/reactos/drivers/storage/ide/uniata/id_dma.cpp [iso-8859-1] Mon Oct 27
17:10:31 2014
@@ -587,10 +587,8 @@
case ATA_PROMISE_ID:
if(ChipType == PRNEW) {
ULONG Channel = deviceExtension->Channel + lChannel;
+
if(chan->ChannelCtrlFlags & CTRFLAGS_LBA48) {
- AtapiWritePortEx1(chan,
(ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0),0x11,
- AtapiReadPortEx1(chan,
(ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0),0x11) |
- (Channel ? 0x08 : 0x02));
AtapiWritePortEx4(chan,
(ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0),(Channel ? 0x24 : 0x20),
((Srb->SrbFlags & SRB_FLAGS_DATA_IN) ? 0x05000000 :
0x06000000) | (Srb->DataTransferLength >> 1)
);
@@ -659,10 +657,12 @@
case ATA_PROMISE_ID:
if(ChipType == PRNEW) {
ULONG Channel = deviceExtension->Channel + lChannel;
+/*
+ AtapiWritePortEx1(chan,
(ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0),0x11,
+ AtapiReadPortEx1(chan,
(ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0),0x11) &
+ ~(Channel ? 0x08 : 0x02));
+*/
if(chan->ChannelCtrlFlags & CTRFLAGS_LBA48) {
- AtapiWritePortEx1(chan,
(ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0),0x11,
- AtapiReadPortEx1(chan,
(ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0),0x11) &
- ~(Channel ? 0x08 : 0x02));
AtapiWritePortEx4(chan,
(ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0),(Channel ? 0x24 : 0x20),
0
);
@@ -1555,10 +1555,13 @@
return;
break; }
- case ATA_PROMISE_ID:
+ case ATA_PROMISE_ID: {
/***********/
/* Promise */
/***********/
+
+ UCHAR sel66 = Channel ? 0x08: 0x02;
+
if(ChipType < PRTX) {
if (isAtapi) {
udmamode =
@@ -1566,12 +1569,29 @@
}
}
for(i=udmamode; i>=0; i--) {
+
+ if(ChipType == PRNEW) {
+ if(i>2) {
+ AtapiWritePortEx1(chan,
(ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0),0x11,
+ AtapiReadPortEx1(chan,
(ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0),0x11) |
+ sel66);
+ } else {
+ AtapiWritePortEx1(chan,
(ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0),0x11,
+ AtapiReadPortEx1(chan,
(ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0),0x11) &
+ ~sel66);
+ }
+ }
+
if(AtaSetTransferMode(deviceExtension, DeviceNumber, lChannel, LunExt,
ATA_UDMA0 + i)) {
promise_timing(deviceExtension, dev, (UCHAR)(ATA_UDMA + i)); //
???
return;
}
}
-
+ if(ChipType == PRNEW) {
+ AtapiWritePortEx1(chan,
(ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0),0x11,
+ AtapiReadPortEx1(chan,
(ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0),0x11) &
+ ~sel66);
+ }
for(i=wdmamode; i>=0; i--) {
if(AtaSetTransferMode(deviceExtension, DeviceNumber, lChannel, LunExt,
ATA_WDMA0 + i)) {
promise_timing(deviceExtension, dev, (UCHAR)(ATA_WDMA0+i));
@@ -1587,7 +1607,7 @@
AtaSetTransferMode(deviceExtension, DeviceNumber, lChannel, LunExt, ATA_PIO0 +
apiomode);
promise_timing(deviceExtension, dev, ATA_PIO0 + apiomode);
return;
- break;
+ break; }
case ATA_ATI_ID:
KdPrint2((PRINT_PREFIX "ATI\n"));
Modified: branches/0.3.17/reactos/drivers/storage/ide/uniata/id_sata.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/0.3.17/reactos/drivers/storage/…
==============================================================================
--- branches/0.3.17/reactos/drivers/storage/ide/uniata/id_sata.cpp [iso-8859-1]
(original)
+++ branches/0.3.17/reactos/drivers/storage/ide/uniata/id_sata.cpp [iso-8859-1] Mon Oct 27
17:10:31 2014
@@ -968,6 +968,12 @@
KdPrint2((PRINT_PREFIX "\n"));
/* get the number of HW channels */
+
+ /* CAP.NOP sometimes indicate the index of the last enabled
+ * port, at other times, that of the last possible port, so
+ * determining the maximum port number requires looking at
+ * both CAP.NOP and PI.
+ */
PI = UniataAhciReadHostPort4(deviceExtension, IDX_AHCI_PI);
deviceExtension->AHCI_PI = PI;
KdPrint2((PRINT_PREFIX " AHCI PI %#x\n", PI));
Modified: branches/0.3.17/reactos/drivers/storage/ide/uniata/uniata_ver.h
URL:
http://svn.reactos.org/svn/reactos/branches/0.3.17/reactos/drivers/storage/…
==============================================================================
--- branches/0.3.17/reactos/drivers/storage/ide/uniata/uniata_ver.h [iso-8859-1]
(original)
+++ branches/0.3.17/reactos/drivers/storage/ide/uniata/uniata_ver.h [iso-8859-1] Mon Oct
27 17:10:31 2014
@@ -1,10 +1,10 @@
-#define UNIATA_VER_STR "45a8"
-#define UNIATA_VER_DOT 0.45.1.8
+#define UNIATA_VER_STR "45b1"
+#define UNIATA_VER_DOT 0.45.2.1
#define UNIATA_VER_MJ 0
#define UNIATA_VER_MN 45
-#define UNIATA_VER_SUB_MJ 1
-#define UNIATA_VER_SUB_MN 8
-#define UNIATA_VER_DOT_COMMA 0,45,1,8
-#define UNIATA_VER_DOT_STR "0.45.1.8"
+#define UNIATA_VER_SUB_MJ 2
+#define UNIATA_VER_SUB_MN 1
+#define UNIATA_VER_DOT_COMMA 0,45,2,1
+#define UNIATA_VER_DOT_STR "0.45.2.1"
#define UNIATA_VER_YEAR 2014
#define UNIATA_VER_YEAR_STR "2014"