aboutsummaryrefslogtreecommitdiff
path: root/src/hw
diff options
context:
space:
mode:
Diffstat (limited to 'src/hw')
-rw-r--r--src/hw/ahci.c2
-rw-r--r--src/hw/ahci.h2
-rw-r--r--src/hw/ata.c3
-rw-r--r--src/hw/ata.h4
-rw-r--r--src/hw/blockcmd.c3
-rw-r--r--src/hw/esp-scsi.c3
-rw-r--r--src/hw/floppy.c3
-rw-r--r--src/hw/lsi-scsi.c3
-rw-r--r--src/hw/megasas.c3
-rw-r--r--src/hw/ramdisk.c4
-rw-r--r--src/hw/usb-msc.c3
-rw-r--r--src/hw/usb-uas.c3
-rw-r--r--src/hw/virtio-blk.c3
-rw-r--r--src/hw/virtio-scsi.c3
14 files changed, 27 insertions, 15 deletions
diff --git a/src/hw/ahci.c b/src/hw/ahci.c
index 150623f..719d073 100644
--- a/src/hw/ahci.c
+++ b/src/hw/ahci.c
@@ -9,7 +9,6 @@
#include "biosvar.h" // GET_GLOBAL
#include "blockcmd.h" // CDB_CMD_READ_10
#include "boot.h" // add_bcv_hd
-#include "disk.h" // struct drive_s
#include "ioport.h" // inb
#include "malloc.h" // free
#include "output.h" // dprintf
@@ -17,6 +16,7 @@
#include "pci_ids.h" // PCI_CLASS_STORAGE_OTHER
#include "pci_regs.h" // PCI_INTERRUPT_LINE
#include "stacks.h" // yield
+#include "std/disk.h" // DISK_RET_SUCCESS
#include "string.h" // memset
#include "util.h" // timer_calc
diff --git a/src/hw/ahci.h b/src/hw/ahci.h
index c3d2402..c8c755a 100644
--- a/src/hw/ahci.h
+++ b/src/hw/ahci.h
@@ -1,8 +1,8 @@
#ifndef __AHCI_H
#define __AHCI_H
+#include "block.h" // struct drive_s
#include "types.h" // u32
-#include "disk.h" // struct drive_s
struct sata_cmd_fis {
u8 reg;
diff --git a/src/hw/ata.c b/src/hw/ata.c
index 7338ebf..4ea6cd1 100644
--- a/src/hw/ata.c
+++ b/src/hw/ata.c
@@ -7,11 +7,11 @@
#include "ata.h" // ATA_CB_STAT
#include "biosvar.h" // GET_GLOBAL
+#include "block.h" // struct drive_s
#include "blockcmd.h" // CDB_CMD_READ_10
#include "boot.h" // boot_add_hd
#include "byteorder.h" // be16_to_cpu
#include "cmos.h" // inb_cmos
-#include "disk.h" // struct ata_s
#include "ioport.h" // inb
#include "malloc.h" // malloc_fseg
#include "output.h" // dprintf
@@ -20,6 +20,7 @@
#include "pci_regs.h" // PCI_INTERRUPT_LINE
#include "pic.h" // enable_hwirq
#include "stacks.h" // yield
+#include "std/disk.h" // DISK_RET_SUCCESS
#include "string.h" // memset
#include "util.h" // timer_calc
diff --git a/src/hw/ata.h b/src/hw/ata.h
index 1f41233..a9f865e 100644
--- a/src/hw/ata.h
+++ b/src/hw/ata.h
@@ -1,9 +1,9 @@
#ifndef __ATA_H
#define __ATA_H
-#include "types.h" // u8
+#include "block.h" // struct drive_s
#include "config.h" // CONFIG_MAX_ATA_INTERFACES
-#include "disk.h" // struct drive_s
+#include "types.h" // u8
struct ata_channel_s {
u16 iobase1;
diff --git a/src/hw/blockcmd.c b/src/hw/blockcmd.c
index 59f5763..b9e61cd 100644
--- a/src/hw/blockcmd.c
+++ b/src/hw/blockcmd.c
@@ -8,14 +8,15 @@
#include "ahci.h" // atapi_cmd_data
#include "ata.h" // atapi_cmd_data
#include "biosvar.h" // GET_GLOBAL
+#include "block.h" // struct disk_op_s
#include "blockcmd.h" // struct cdb_request_sense
#include "boot.h" // boot_add_hd
#include "byteorder.h" // be32_to_cpu
-#include "disk.h" // struct disk_op_s
#include "esp-scsi.h" // esp_scsi_cmd_data
#include "lsi-scsi.h" // lsi_scsi_cmd_data
#include "megasas.h" // megasas_cmd_data
#include "output.h" // dprintf
+#include "std/disk.h" // DISK_RET_EPARAM
#include "string.h" // memset
#include "usb-msc.h" // usb_cmd_data
#include "usb-uas.h" // usb_cmd_data
diff --git a/src/hw/esp-scsi.c b/src/hw/esp-scsi.c
index 65a67cd..e6533af 100644
--- a/src/hw/esp-scsi.c
+++ b/src/hw/esp-scsi.c
@@ -11,16 +11,17 @@
// This file may be distributed under the terms of the GNU LGPLv3 license.
#include "biosvar.h" // GET_GLOBAL
+#include "block.h" // struct drive_s
#include "blockcmd.h" // scsi_drive_setup
#include "boot.h" // bootprio_find_scsi_device
#include "config.h" // CONFIG_*
-#include "disk.h"
#include "fw/paravirt.h" // runningOnQEMU
#include "malloc.h" // free
#include "output.h" // dprintf
#include "pci.h" // foreachpci
#include "pci_ids.h" // PCI_DEVICE_ID
#include "pci_regs.h" // PCI_VENDOR_ID
+#include "std/disk.h" // DISK_RET_SUCCESS
#include "string.h" // memset
#include "util.h" // usleep
diff --git a/src/hw/floppy.c b/src/hw/floppy.c
index e2db2f8..05c518f 100644
--- a/src/hw/floppy.c
+++ b/src/hw/floppy.c
@@ -6,11 +6,11 @@
// This file may be distributed under the terms of the GNU LGPLv3 license.
#include "biosvar.h" // SET_BDA
+#include "block.h" // struct drive_s
#include "boot.h" // boot_add_floppy
#include "bregs.h" // struct bregs
#include "cmos.h" // inb_cmos
#include "config.h" // CONFIG_FLOPPY
-#include "disk.h" // DISK_RET_SUCCESS
#include "malloc.h" // malloc_fseg
#include "output.h" // dprintf
#include "pci.h" // pci_to_bdf
@@ -18,6 +18,7 @@
#include "pic.h" // pic_eoi1
#include "romfile.h" // romfile_loadint
#include "stacks.h" // yield
+#include "std/disk.h" // DISK_RET_SUCCESS
#include "string.h" // memset
#include "util.h" // timer_calc
diff --git a/src/hw/lsi-scsi.c b/src/hw/lsi-scsi.c
index 87751aa..b7eb1f1 100644
--- a/src/hw/lsi-scsi.c
+++ b/src/hw/lsi-scsi.c
@@ -11,16 +11,17 @@
// This file may be distributed under the terms of the GNU LGPLv3 license.
#include "biosvar.h" // GET_GLOBAL
+#include "block.h" // struct drive_s
#include "blockcmd.h" // scsi_drive_setup
#include "boot.h" // bootprio_find_scsi_device
#include "config.h" // CONFIG_*
-#include "disk.h"
#include "fw/paravirt.h" // runningOnQEMU
#include "malloc.h" // free
#include "output.h" // dprintf
#include "pci.h" // foreachpci
#include "pci_ids.h" // PCI_DEVICE_ID_VIRTIO_BLK
#include "pci_regs.h" // PCI_VENDOR_ID
+#include "std/disk.h" // DISK_RET_SUCCESS
#include "string.h" // memset
#include "util.h" // usleep
diff --git a/src/hw/megasas.c b/src/hw/megasas.c
index 4bba0e1..772fc75 100644
--- a/src/hw/megasas.c
+++ b/src/hw/megasas.c
@@ -11,16 +11,17 @@
// This file may be distributed under the terms of the GNU LGPLv3 license.
#include "biosvar.h" // GET_GLOBAL
+#include "block.h" // struct drive_s
#include "blockcmd.h" // scsi_drive_setup
#include "boot.h" // bootprio_find_scsi_device
#include "config.h" // CONFIG_*
-#include "disk.h"
#include "malloc.h" // free
#include "output.h" // dprintf
#include "pci.h" // foreachpci
#include "pci_ids.h" // PCI_DEVICE_ID_XXX
#include "pci_regs.h" // PCI_VENDOR_ID
#include "stacks.h" // yield
+#include "std/disk.h" // DISK_RET_SUCCESS
#include "string.h" // memset
#include "util.h" // timer_calc
diff --git a/src/hw/ramdisk.c b/src/hw/ramdisk.c
index 2599f9a..f57affd 100644
--- a/src/hw/ramdisk.c
+++ b/src/hw/ramdisk.c
@@ -5,15 +5,17 @@
// This file may be distributed under the terms of the GNU LGPLv3 license.
#include "biosvar.h" // GET_GLOBAL
+#include "block.h" // struct drive_s
#include "boot.h" // boot_add_floppy
#include "bregs.h" // struct bregs
-#include "disk.h" // process_ramdisk_op
#include "malloc.h" // malloc_fseg
#include "memmap.h" // add_e820
#include "output.h" // dprintf
#include "romfile.h" // romfile_findprefix
#include "stacks.h" // call16_int
+#include "std/disk.h" // DISK_RET_SUCCESS
#include "string.h" // memset
+#include "util.h" // process_ramdisk_op
void
ramdisk_setup(void)
diff --git a/src/hw/usb-msc.c b/src/hw/usb-msc.c
index ee1fe20..975ec7a 100644
--- a/src/hw/usb-msc.c
+++ b/src/hw/usb-msc.c
@@ -5,12 +5,13 @@
// This file may be distributed under the terms of the GNU LGPLv3 license.
#include "biosvar.h" // GET_GLOBAL
+#include "block.h" // DTYPE_USB
#include "blockcmd.h" // cdb_read
#include "boot.h" // bootprio_find_usb
#include "config.h" // CONFIG_USB_MSC
-#include "disk.h" // DTYPE_USB
#include "malloc.h" // free
#include "output.h" // dprintf
+#include "std/disk.h" // DISK_RET_SUCCESS
#include "string.h" // memset
#include "usb.h" // struct usb_s
#include "usb-msc.h" // usb_msc_setup
diff --git a/src/hw/usb-uas.c b/src/hw/usb-uas.c
index 6925f33..9f4b558 100644
--- a/src/hw/usb-uas.c
+++ b/src/hw/usb-uas.c
@@ -15,12 +15,13 @@
// This file may be distributed under the terms of the GNU LGPLv3 license.
#include "biosvar.h" // GET_GLOBAL
+#include "block.h" // DTYPE_USB
#include "blockcmd.h" // cdb_read
#include "boot.h" // bootprio_find_usb
#include "config.h" // CONFIG_USB_UAS
-#include "disk.h" // DTYPE_UAS
#include "malloc.h" // free
#include "output.h" // dprintf
+#include "std/disk.h" // DISK_RET_SUCCESS
#include "string.h" // memset
#include "usb.h" // struct usb_s
#include "usb-uas.h" // usb_uas_init
diff --git a/src/hw/virtio-blk.c b/src/hw/virtio-blk.c
index 07f6e57..c48ea45 100644
--- a/src/hw/virtio-blk.c
+++ b/src/hw/virtio-blk.c
@@ -10,12 +10,13 @@
#include "biosvar.h" // GET_GLOBAL
#include "boot.h" // boot_add_hd
#include "config.h" // CONFIG_*
-#include "disk.h"
+#include "block.h" // struct drive_s
#include "malloc.h" // free
#include "output.h" // dprintf
#include "pci.h" // foreachpci
#include "pci_ids.h" // PCI_DEVICE_ID_VIRTIO_BLK
#include "pci_regs.h" // PCI_VENDOR_ID
+#include "std/disk.h" // DISK_RET_SUCCESS
#include "string.h" // memset
#include "util.h" // usleep
#include "virtio-pci.h"
diff --git a/src/hw/virtio-scsi.c b/src/hw/virtio-scsi.c
index 1c3500c..f50e335 100644
--- a/src/hw/virtio-scsi.c
+++ b/src/hw/virtio-scsi.c
@@ -8,15 +8,16 @@
// This file may be distributed under the terms of the GNU LGPLv3 license.
#include "biosvar.h" // GET_GLOBAL
+#include "block.h" // struct drive_s
#include "blockcmd.h" // scsi_drive_setup
#include "boot.h" // bootprio_find_scsi_device
#include "config.h" // CONFIG_*
-#include "disk.h"
#include "malloc.h" // free
#include "output.h" // dprintf
#include "pci.h" // foreachpci
#include "pci_ids.h" // PCI_DEVICE_ID_VIRTIO_BLK
#include "pci_regs.h" // PCI_VENDOR_ID
+#include "std/disk.h" // DISK_RET_SUCCESS
#include "string.h" // memset
#include "util.h" // usleep
#include "virtio-pci.h"