Avoid ambiguity when virtio-scsi will be introduced.
Signed-off-by: Paolo Bonzini pbonzini@redhat.com --- src/Kconfig | 4 ++-- src/block.c | 6 +++--- src/disk.c | 4 ++-- src/disk.h | 18 +++++++++--------- src/virtio-blk.c | 4 ++-- src/virtio-blk.h | 2 +- 6 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/src/Kconfig b/src/Kconfig index 338f51a..f8d245a 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -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" diff --git a/src/block.c b/src/block.c index f7e7851..705c477 100644 --- a/src/block.c +++ b/src/block.c @@ -12,7 +12,7 @@ #include "ata.h" // process_ata_op #include "ahci.h" // process_ahci_op #include "usb-msc.h" // process_usb_op -#include "virtio-blk.h" // process_virtio_op +#include "virtio-blk.h" // process_virtio_blk_op
u8 FloppyCount VAR16VISIBLE; u8 CDCount; @@ -295,8 +295,8 @@ process_op(struct disk_op_s *op) return process_cdemu_op(op); case DTYPE_USB: return process_usb_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); default: diff --git a/src/disk.c b/src/disk.c index 8f7c61f..f2c6621 100644 --- a/src/disk.c +++ b/src/disk.c @@ -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'); diff --git a/src/disk.h b/src/disk.h index ac33518..dd7c46a 100644 --- a/src/disk.h +++ b/src/disk.h @@ -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
diff --git a/src/virtio-blk.c b/src/virtio-blk.c index b1274fc..a81a873 100644 --- a/src/virtio-blk.c +++ b/src/virtio-blk.c @@ -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;
diff --git a/src/virtio-blk.h b/src/virtio-blk.h index 7243704..0825f09 100644 --- a/src/virtio-blk.h +++ b/src/virtio-blk.h @@ -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 */