Skip to contentSkip to conversation

Improve ATA IDENTIFY word 64 contents.

PATCH Superseded Jonathan A. Kollasch 2 participants 2 messages Sep 2, 2010 – Sep 3, 2010

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Improve ATA IDENTIFY word 64 contents.

Fill in word 64 of IDENTIFY data to indicate support for PIO modes 3 and 4. This allows NetBSD guests to use UltraDMA modes instead of just PIO mode 0.

---
 hw/ide/core.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
hw/ide/core.c +3 -2
index 3651d2b..2fa26f4 100644
@@ -139,6 +139,7 @@ static void ide_identify(IDEState *s)
     put_le16(p + 61, s->nb_sectors >> 16);
     put_le16(p + 62, 0x07); /* single word dma0-2 supported */
     put_le16(p + 63, 0x07); /* mdma0-2 supported */
+    put_le16(p + 64, 0x03); /* pio3-4 supported */
     put_le16(p + 65, 120);
     put_le16(p + 66, 120);
     put_le16(p + 67, 120);
@@ -199,12 +200,12 @@ static void ide_atapi_identify(IDEState *s)
     put_le16(p + 53, 7); /* words 64-70, 54-58, 88 valid */
     put_le16(p + 62, 7);  /* single word dma0-2 supported */
     put_le16(p + 63, 7);  /* mdma0-2 supported */
-    put_le16(p + 64, 0x3f); /* PIO modes supported */
+    put_le16(p + 64, 3); /* pio3-4 supported */
 #else
     put_le16(p + 49, 1 << 9); /* LBA supported, no DMA */
     put_le16(p + 53, 3); /* words 64-70, 54-58 valid */
     put_le16(p + 63, 0x103); /* DMA modes XXX: may be incorrect */
-    put_le16(p + 64, 1); /* PIO modes */
+    put_le16(p + 64, 3); /* pio3-4 supported */
 #endif
     put_le16(p + 65, 0xb4); /* minimum DMA multiword tx cycle time */
     put_le16(p + 66, 0xb4); /* recommended DMA multiword tx cycle time */
Signature · 1 line
1.6.6.2
#1 lore raw

Am 03.09.2010 01:38, schrieb Jonathan A. Kollasch:

Quoted 2 lines

Fill in word 64 of IDENTIFY data to indicate support for PIO modes 3 and 4. This allows NetBSD guests to use UltraDMA modes instead of just PIO mode 0.

The Signed-off-by line is missing.

Quoted 21 lines
---
 hw/ide/core.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
hw/ide/core.c +1 -1
index 3651d2b..2fa26f4 100644
@@ -139,6 +139,7 @@ static void ide_identify(IDEState *s)
     put_le16(p + 61, s->nb_sectors >> 16);
     put_le16(p + 62, 0x07); /* single word dma0-2 supported */
     put_le16(p + 63, 0x07); /* mdma0-2 supported */
+    put_le16(p + 64, 0x03); /* pio3-4 supported */
     put_le16(p + 65, 120);
     put_le16(p + 66, 120);
     put_le16(p + 67, 120);
@@ -199,12 +200,12 @@ static void ide_atapi_identify(IDEState *s)
     put_le16(p + 53, 7); /* words 64-70, 54-58, 88 valid */
     put_le16(p + 62, 7);  /* single word dma0-2 supported */
     put_le16(p + 63, 7);  /* mdma0-2 supported */
-    put_le16(p + 64, 0x3f); /* PIO modes supported */

hw/ide/core.c static void ide_atapi_identify(IDEState *s) · line 211

Quoted 10 lines
hw/ide/core.c +2 -1
+    put_le16(p + 64, 3); /* pio3-4 supported */
 #else
     put_le16(p + 49, 1 << 9); /* LBA supported, no DMA */
     put_le16(p + 53, 3); /* words 64-70, 54-58 valid */
     put_le16(p + 63, 0x103); /* DMA modes XXX: may be incorrect */
-    put_le16(p + 64, 1); /* PIO modes */
+    put_le16(p + 64, 3); /* pio3-4 supported */
 #endif
     put_le16(p + 65, 0xb4); /* minimum DMA multiword tx cycle time */
     put_le16(p + 66, 0xb4); /* recommended DMA multiword tx cycle time */

The two lines for byte 64 in ide_atapi_identify are now the same, so they could be moved outside the #ifdef.

Kevin