always specify virtio-blk rather than virtio
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 16 Nov 2011 12:02:55 +0000 (13:02 +0100)
committerKevin O'Connor <kevin@koconnor.net>
Fri, 18 Nov 2011 02:21:02 +0000 (21:21 -0500)
Avoid ambiguity when virtio-scsi will be introduced.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
src/Kconfig
src/block.c
src/disk.c
src/disk.h
src/virtio-blk.c
src/virtio-blk.h

index 338f51a68f19d353c0d839761d7d1e8731a41616..f8d245a678cb86a917a40908dff898bbce77264f 100644 (file)
@@ -109,10 +109,10 @@ menu "Hardware support"
             Support for AHCI disk code.
     config VIRTIO_BLK
         depends on DRIVES && !COREBOOT
-        bool "VirtIO controllers"
+        bool "virtio-blk controllers"
         default y
         help
-            Support boot from virtio storage.
+            Support boot from virtio-blk storage.
     config FLOPPY
         depends on DRIVES
         bool "Floppy controller"
index ac9eb26e090da82c1c07a0be3fcbb5c624c57fb1..eeebd83b82091881d6ab65d59f90b4f5167c9886 100644 (file)
@@ -11,7 +11,7 @@
 #include "util.h" // dprintf
 #include "ata.h" // process_ata_op
 #include "ahci.h" // process_ahci_op
-#include "virtio-blk.h" // process_virtio_op
+#include "virtio-blk.h" // process_virtio_blk_op
 #include "blockcmd.h" // cdb_*
 
 u8 FloppyCount VAR16VISIBLE;
@@ -315,8 +315,8 @@ process_op(struct disk_op_s *op)
         return process_ramdisk_op(op);
     case DTYPE_CDEMU:
         return process_cdemu_op(op);
-    case DTYPE_VIRTIO:
-       return process_virtio_op(op);
+    case DTYPE_VIRTIO_BLK:
+        return process_virtio_blk_op(op);
     case DTYPE_AHCI:
        return process_ahci_op(op);
     case DTYPE_USB:
index 8f7c61ff0f486b35745953681565883a9d635f1f..f2c662193aa435b2e47c4ecb095cbe436bd4aefd 100644 (file)
@@ -546,7 +546,7 @@ disk_1348(struct bregs *regs, struct drive_s *drive_g)
     SET_INT13DPT(regs, blksize, blksize);
 
     if (size < 30 ||
-        (type != DTYPE_ATA && type != DTYPE_ATAPI && type != DTYPE_VIRTIO)) {
+        (type != DTYPE_ATA && type != DTYPE_ATAPI && type != DTYPE_VIRTIO_BLK)) {
         disk_ret(regs, DISK_RET_SUCCESS);
         return;
     }
@@ -651,7 +651,7 @@ disk_1348(struct bregs *regs, struct drive_s *drive_g)
         SET_INT13DPT(regs, iface_path, iobase1);
     }
 
-    if (type != DTYPE_VIRTIO) {
+    if (type != DTYPE_VIRTIO_BLK) {
         SET_INT13DPT(regs, iface_type[0], 'A');
         SET_INT13DPT(regs, iface_type[1], 'T');
         SET_INT13DPT(regs, iface_type[2], 'A');
index ac3351880ae973aa3e600792126bab3a1de93cba..dd7c46aec3c19913d6cf257d62b5a2f706580cd3 100644 (file)
@@ -198,15 +198,15 @@ struct drive_s {
 #define DISK_SECTOR_SIZE  512
 #define CDROM_SECTOR_SIZE 2048
 
-#define DTYPE_NONE     0x00
-#define DTYPE_FLOPPY   0x01
-#define DTYPE_ATA      0x02
-#define DTYPE_ATAPI    0x03
-#define DTYPE_RAMDISK  0x04
-#define DTYPE_CDEMU    0x05
-#define DTYPE_USB      0x06
-#define DTYPE_VIRTIO   0x07
-#define DTYPE_AHCI     0x08
+#define DTYPE_NONE         0x00
+#define DTYPE_FLOPPY       0x01
+#define DTYPE_ATA          0x02
+#define DTYPE_ATAPI        0x03
+#define DTYPE_RAMDISK      0x04
+#define DTYPE_CDEMU        0x05
+#define DTYPE_USB          0x06
+#define DTYPE_VIRTIO_BLK   0x07
+#define DTYPE_AHCI         0x08
 
 #define MAXDESCSIZE 80
 
index b1274fc62ad36f233a3ee3b0daa51d85f7b8f563..a81a873fc3050488c9ffc9d2c97f5ed46bfc6b66 100644 (file)
@@ -75,7 +75,7 @@ virtio_blk_op(struct disk_op_s *op, int write)
 }
 
 int
-process_virtio_op(struct disk_op_s *op)
+process_virtio_blk_op(struct disk_op_s *op)
 {
     if (! CONFIG_VIRTIO_BLK || CONFIG_COREBOOT)
         return 0;
@@ -110,7 +110,7 @@ init_virtio_blk(struct pci_device *pci)
     }
     memset(vdrive_g, 0, sizeof(*vdrive_g));
     memset(vq, 0, sizeof(*vq));
-    vdrive_g->drive.type = DTYPE_VIRTIO;
+    vdrive_g->drive.type = DTYPE_VIRTIO_BLK;
     vdrive_g->drive.cntl_id = bdf;
     vdrive_g->vq = vq;
 
index 7243704be7953711499864ff9d991e4805584491..0825f0970aef6094d849941673b40327f401dafb 100644 (file)
@@ -37,7 +37,7 @@ struct virtio_blk_outhdr {
 #define VIRTIO_BLK_S_UNSUPP    2
 
 struct disk_op_s;
-int process_virtio_op(struct disk_op_s *op);
+int process_virtio_blk_op(struct disk_op_s *op);
 void virtio_blk_setup(void);
 
 #endif /* _VIRTIO_BLK_H */