From be7a82cd01062611291a8623ad868885c5523e3e Mon Sep 17 00:00:00 2001
From: mstsirkin <mstsirkin@0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652>
Date: Tue, 16 Feb 2016 17:11:14 +0000
Subject: init: sort status bits

Status bit order is inconsistent: they are neither in increasing
order nor in the order they are likely to be used.

The second approach seems more useful since there aren't
that many bits, so the numerical order does not help much.

A typical order of use would be:

ACKNOWLEDGE
DRIVER
then either FAILED or FEATURES_OK
then either FAILED or DRIVER_OK
then DEVICE_NEEDS_RESET (if device detects an error)

Sort the bits accordingly.

Reported-by: Kevin Lo <kevlo@kevlo.org>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>

git-svn-id: https://tools.oasis-open.org/version-control/svn/virtio/branches/v1.0@559 0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652
---
 content.tex | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

(limited to 'content.tex')

diff --git a/content.tex b/content.tex
index 36f2f78..4b45678 100644
--- a/content.tex
+++ b/content.tex
@@ -22,7 +22,8 @@ The \field{device status} field provides a simple low-level
 indication of the completed steps of this sequence.
 It's most useful to imagine it hooked up to traffic
 lights on the console indicating the status of each device.  The
-following bits are defined:
+following bits are defined (listed below in the order in which
+they would be typically set):
 \begin{description}
 \item[ACKNOWLEDGE (1)] Indicates that the guest OS has found the
   device and recognized it as a valid virtio device.
@@ -34,6 +35,11 @@ following bits are defined:
     this bit.  For example, under Linux, drivers can be loadable modules.
   \end{note}
 
+\item[FAILED (128)] Indicates that something went wrong in the guest,
+  and it has given up on the device. This could be an internal
+  error, or the driver didn't like the device for some reason, or
+  even a fatal error during device operation.
+
 \item[FEATURES_OK (8)] Indicates that the driver has acknowledged all the
   features it understands, and feature negotiation is complete.
 
@@ -42,11 +48,6 @@ following bits are defined:
 
 \item[DEVICE_NEEDS_RESET (64)] Indicates that the device has experienced
   an error from which it can't recover.
-
-\item[FAILED (128)] Indicates that something went wrong in the guest,
-  and it has given up on the device. This could be an internal
-  error, or the driver didn't like the device for some reason, or
-  even a fatal error during device operation.
 \end{description}
 
 \drivernormative{\subsection}{Device Status Field}{Basic Facilities of a Virtio Device / Device Status Field}
-- 
cgit v1.2.3

