WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] ioemu: Add SEEK_STAT in all non-error cas

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] ioemu: Add SEEK_STAT in all non-error cases except sleep request,
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 27 Aug 2008 11:24:02 -0700
Delivery-date: Wed, 27 Aug 2008 11:25:18 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1219845443 -3600
# Node ID 03bdbb7e7add2885ab1ec20e0b1eb0817d8dee64
# Parent  dade7f0bdc8d6b36b1914598d83c616ee5ce97cb
ioemu: Add SEEK_STAT in all non-error cases except sleep request,
since our seek times are virtually 0.  Although this flag is
deprecated by newer ATA standards, Linux at least checks it for CD
drives, and would timeout in some cases if we do not set it.

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
---
 tools/ioemu/hw/ide.c |   28 ++++++++++++++--------------
 1 files changed, 14 insertions(+), 14 deletions(-)

diff -r dade7f0bdc8d -r 03bdbb7e7add tools/ioemu/hw/ide.c
--- a/tools/ioemu/hw/ide.c      Wed Aug 27 14:53:39 2008 +0100
+++ b/tools/ioemu/hw/ide.c      Wed Aug 27 14:57:23 2008 +0100
@@ -1108,14 +1108,14 @@ static void ide_flush_cb(void *opaque, i
        return;
     }
     else
-        s->status = READY_STAT;
+        s->status = READY_STAT | SEEK_STAT;
     ide_set_irq(s);
 }
 
 static void ide_atapi_cmd_ok(IDEState *s)
 {
     s->error = 0;
-    s->status = READY_STAT;
+    s->status = READY_STAT | SEEK_STAT;
     s->nsector = (s->nsector & ~7) | ATAPI_INT_REASON_IO | ATAPI_INT_REASON_CD;
     ide_set_irq(s);
 }
@@ -1229,7 +1229,7 @@ static void ide_atapi_cmd_reply_end(IDES
     if (s->packet_transfer_size <= 0) {
         /* end of transfer */
         ide_transfer_stop(s);
-        s->status = READY_STAT;
+        s->status = READY_STAT | SEEK_STAT;
         s->nsector = (s->nsector & ~7) | ATAPI_INT_REASON_IO | 
ATAPI_INT_REASON_CD;
         ide_set_irq(s);
 #ifdef DEBUG_IDE_ATAPI
@@ -1307,10 +1307,10 @@ static void ide_atapi_cmd_reply(IDEState
     s->io_buffer_index = 0;
 
     if (s->atapi_dma) {
-       s->status = READY_STAT | DRQ_STAT;
+       s->status = READY_STAT | SEEK_STAT | DRQ_STAT;
        ide_dma_start(s, ide_atapi_cmd_read_dma_cb);
     } else {
-       s->status = READY_STAT;
+       s->status = READY_STAT | SEEK_STAT;
        ide_atapi_cmd_reply_end(s);
     }
 }
@@ -1325,7 +1325,7 @@ static void ide_atapi_cmd_read_pio(IDESt
     s->io_buffer_index = sector_size;
     s->cd_sector_size = sector_size;
 
-    s->status = READY_STAT;
+    s->status = READY_STAT | SEEK_STAT;
     ide_atapi_cmd_reply_end(s);
 }
 
@@ -1368,7 +1368,7 @@ static void ide_atapi_cmd_read_dma_cb(vo
     }
 
     if (s->packet_transfer_size <= 0) {
-        s->status = READY_STAT;
+        s->status = READY_STAT | SEEK_STAT;
         s->nsector = (s->nsector & ~7) | ATAPI_INT_REASON_IO | 
ATAPI_INT_REASON_CD;
         ide_set_irq(s);
     eot:
@@ -1418,7 +1418,7 @@ static void ide_atapi_cmd_read_dma(IDESt
     s->cd_sector_size = sector_size;
 
     /* XXX: check if BUSY_STAT should be set */
-    s->status = READY_STAT | DRQ_STAT | BUSY_STAT;
+    s->status = READY_STAT | SEEK_STAT | DRQ_STAT | BUSY_STAT;
     ide_dma_start(s, ide_atapi_cmd_read_dma_cb);
 }
 
@@ -1886,7 +1886,7 @@ static void ide_ioport_write(void *opaqu
                 ide_abort_command(s);
             } else {
                 s->mult_sectors = s->nsector;
-                s->status = READY_STAT;
+                s->status = READY_STAT | SEEK_STAT;
             }
             ide_set_irq(s);
             break;
@@ -1896,7 +1896,7 @@ static void ide_ioport_write(void *opaqu
         case WIN_VERIFY_ONCE:
             /* do sector number check ? */
            ide_cmd_lba48_transform(s, lba48);
-            s->status = READY_STAT;
+            s->status = READY_STAT | SEEK_STAT;
             ide_set_irq(s);
             break;
        case WIN_READ_EXT:
@@ -1965,12 +1965,12 @@ static void ide_ioport_write(void *opaqu
         case WIN_READ_NATIVE_MAX:
            ide_cmd_lba48_transform(s, lba48);
             ide_set_sector(s, s->nb_sectors - 1);
-            s->status = READY_STAT;
+            s->status = READY_STAT | SEEK_STAT;
             ide_set_irq(s);
             break;
         case WIN_CHECKPOWERMODE1:
             s->nsector = 0xff; /* device active or idle */
-            s->status = READY_STAT;
+            s->status = READY_STAT | SEEK_STAT;
             ide_set_irq(s);
             break;
         case WIN_SETFEATURES:
@@ -2070,7 +2070,7 @@ static void ide_ioport_write(void *opaqu
             /* overlapping commands not supported */
             if (s->feature & 0x02)
                 goto abort_cmd;
-            s->status = READY_STAT;
+            s->status = READY_STAT | SEEK_STAT;
             s->atapi_dma = s->feature & 1;
             s->nsector = 1;
             ide_transfer_start(s, s->io_buffer, ATAPI_PACKET_SIZE, 
@@ -2289,7 +2289,7 @@ static void ide_reset(IDEState *s)
     s->mult_sectors = MAX_MULT_SECTORS;
     s->cur_drive = s;
     s->select = 0xa0;
-    s->status = READY_STAT;
+    s->status = READY_STAT | SEEK_STAT;
     ide_set_signature(s);
     /* init the transfer handler so that 0xffff is returned on data
        accesses */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] ioemu: Add SEEK_STAT in all non-error cases except sleep request,, Xen patchbot-unstable <=