diff options
Diffstat (limited to 'src/hw')
-rw-r--r-- | src/hw/ahci.c | 4 | ||||
-rw-r--r-- | src/hw/ata.c | 26 | ||||
-rw-r--r-- | src/hw/blockcmd.c | 8 | ||||
-rw-r--r-- | src/hw/esp-scsi.c | 2 | ||||
-rw-r--r-- | src/hw/floppy.c | 20 | ||||
-rw-r--r-- | src/hw/lsi-scsi.c | 2 | ||||
-rw-r--r-- | src/hw/megasas.c | 2 | ||||
-rw-r--r-- | src/hw/mpt-scsi.c | 2 | ||||
-rw-r--r-- | src/hw/nvme.c | 2 | ||||
-rw-r--r-- | src/hw/pvscsi.c | 2 | ||||
-rw-r--r-- | src/hw/ramdisk.c | 2 | ||||
-rw-r--r-- | src/hw/sdcard.c | 2 | ||||
-rw-r--r-- | src/hw/usb-msc.c | 4 | ||||
-rw-r--r-- | src/hw/usb-uas.c | 2 | ||||
-rw-r--r-- | src/hw/virtio-blk.c | 2 | ||||
-rw-r--r-- | src/hw/virtio-scsi.c | 2 |
16 files changed, 42 insertions, 42 deletions
diff --git a/src/hw/ahci.c b/src/hw/ahci.c index b9043b9f..1746e7a1 100644 --- a/src/hw/ahci.c +++ b/src/hw/ahci.c @@ -217,7 +217,7 @@ int ahci_atapi_process_op(struct disk_op_s *op) return 0; struct ahci_port_s *port_gf = container_of( - op->drive_gf, struct ahci_port_s, drive); + op->drive_fl, struct ahci_port_s, drive); struct ahci_cmd_s *cmd = port_gf->cmd; if (op->command == CMD_WRITE || op->command == CMD_FORMAT) @@ -237,7 +237,7 @@ static int ahci_disk_readwrite_aligned(struct disk_op_s *op, int iswrite) { struct ahci_port_s *port_gf = container_of( - op->drive_gf, struct ahci_port_s, drive); + op->drive_fl, struct ahci_port_s, drive); struct ahci_cmd_s *cmd = port_gf->cmd; int rc; diff --git a/src/hw/ata.c b/src/hw/ata.c index 9a4b4354..b6e073cf 100644 --- a/src/hw/ata.c +++ b/src/hw/ata.c @@ -271,15 +271,15 @@ fail: ****************************************************************/ // Transfer 'op->count' blocks (of 'blocksize' bytes) to/from drive -// 'op->drive_gf'. +// 'op->drive_fl'. static int ata_pio_transfer(struct disk_op_s *op, int iswrite, int blocksize) { dprintf(16, "ata_pio_transfer id=%p write=%d count=%d bs=%d buf=%p\n" - , op->drive_gf, iswrite, op->count, blocksize, op->buf_fl); + , op->drive_fl, iswrite, op->count, blocksize, op->buf_fl); struct atadrive_s *adrive_gf = container_of( - op->drive_gf, struct atadrive_s, drive); + op->drive_fl, struct atadrive_s, drive); struct ata_channel_s *chan_gf = GET_GLOBALFLAT(adrive_gf->chan_gf); u16 iobase1 = GET_GLOBALFLAT(chan_gf->iobase1); u16 iobase2 = GET_GLOBALFLAT(chan_gf->iobase2); @@ -289,14 +289,14 @@ ata_pio_transfer(struct disk_op_s *op, int iswrite, int blocksize) for (;;) { if (iswrite) { // Write data to controller - dprintf(16, "Write sector id=%p dest=%p\n", op->drive_gf, buf_fl); + dprintf(16, "Write sector id=%p dest=%p\n", op->drive_fl, buf_fl); if (CONFIG_ATA_PIO32) outsl_fl(iobase1, buf_fl, blocksize / 4); else outsw_fl(iobase1, buf_fl, blocksize / 2); } else { // Read data from controller - dprintf(16, "Read sector id=%p dest=%p\n", op->drive_gf, buf_fl); + dprintf(16, "Read sector id=%p dest=%p\n", op->drive_fl, buf_fl); if (CONFIG_ATA_PIO32) insl_fl(iobase1, buf_fl, blocksize / 4); else @@ -366,7 +366,7 @@ ata_try_dma(struct disk_op_s *op, int iswrite, int blocksize) // Need minimum alignment of 1. return -1; struct atadrive_s *adrive_gf = container_of( - op->drive_gf, struct atadrive_s, drive); + op->drive_fl, struct atadrive_s, drive); struct ata_channel_s *chan_gf = GET_GLOBALFLAT(adrive_gf->chan_gf); u16 iomaster = GET_GLOBALFLAT(chan_gf->iomaster); if (! iomaster) @@ -413,10 +413,10 @@ ata_dma_transfer(struct disk_op_s *op) { if (! CONFIG_ATA_DMA) return -1; - dprintf(16, "ata_dma_transfer id=%p buf=%p\n", op->drive_gf, op->buf_fl); + dprintf(16, "ata_dma_transfer id=%p buf=%p\n", op->drive_fl, op->buf_fl); struct atadrive_s *adrive_gf = container_of( - op->drive_gf, struct atadrive_s, drive); + op->drive_fl, struct atadrive_s, drive); struct ata_channel_s *chan_gf = GET_GLOBALFLAT(adrive_gf->chan_gf); u16 iomaster = GET_GLOBALFLAT(chan_gf->iomaster); @@ -466,7 +466,7 @@ static int ata_pio_cmd_data(struct disk_op_s *op, int iswrite, struct ata_pio_command *cmd) { struct atadrive_s *adrive_gf = container_of( - op->drive_gf, struct atadrive_s, drive); + op->drive_fl, struct atadrive_s, drive); struct ata_channel_s *chan_gf = GET_GLOBALFLAT(adrive_gf->chan_gf); u16 iobase1 = GET_GLOBALFLAT(chan_gf->iobase1); u16 iobase2 = GET_GLOBALFLAT(chan_gf->iobase2); @@ -495,7 +495,7 @@ ata_dma_cmd_data(struct disk_op_s *op, struct ata_pio_command *cmd) if (! CONFIG_ATA_DMA) return -1; struct atadrive_s *adrive_gf = container_of( - op->drive_gf, struct atadrive_s, drive); + op->drive_fl, struct atadrive_s, drive); int ret = send_cmd(adrive_gf, cmd); if (ret) return ret; @@ -559,7 +559,7 @@ ata_process_op(struct disk_op_s *op) return 0; struct atadrive_s *adrive_gf = container_of( - op->drive_gf, struct atadrive_s, drive); + op->drive_fl, struct atadrive_s, drive); switch (op->command) { case CMD_READ: return ata_readwrite(op, 0); @@ -597,7 +597,7 @@ ata_atapi_process_op(struct disk_op_s *op) return default_process_op(op); struct atadrive_s *adrive_gf = container_of( - op->drive_gf, struct atadrive_s, drive); + op->drive_fl, struct atadrive_s, drive); struct ata_channel_s *chan_gf = GET_GLOBALFLAT(adrive_gf->chan_gf); u16 iobase1 = GET_GLOBALFLAT(chan_gf->iobase1); u16 iobase2 = GET_GLOBALFLAT(chan_gf->iobase2); @@ -667,7 +667,7 @@ send_ata_identity(struct atadrive_s *adrive, u16 *buffer, int command) struct disk_op_s dop; memset(&dop, 0, sizeof(dop)); - dop.drive_gf = &adrive->drive; + dop.drive_fl = &adrive->drive; dop.count = 1; dop.lba = 1; dop.buf_fl = MAKE_FLATPTR(GET_SEG(SS), buffer); diff --git a/src/hw/blockcmd.c b/src/hw/blockcmd.c index f260dd8d..1f15081b 100644 --- a/src/hw/blockcmd.c +++ b/src/hw/blockcmd.c @@ -117,7 +117,7 @@ scsi_fill_cmd(struct disk_op_s *op, void *cdbcmd, int maxcdb) : CDB_CMD_WRITE_10); cmd->lba = cpu_to_be32(op->lba); cmd->count = cpu_to_be16(op->count); - return GET_FLATPTR(op->drive_gf->blksize); + return GET_FLATPTR(op->drive_fl->blksize); case CMD_SCSI: if (MODESEGMENT) return -1; @@ -141,7 +141,7 @@ int scsi_is_ready(struct disk_op_s *op) { ASSERT32FLAT(); - dprintf(6, "scsi_is_ready (drive=%p)\n", op->drive_gf); + dprintf(6, "scsi_is_ready (drive=%p)\n", op->drive_fl); /* Retry TEST UNIT READY for 5 seconds unless MEDIUM NOT PRESENT is * reported by the device. If the device reports "IN PROGRESS", @@ -223,7 +223,7 @@ int scsi_rep_luns_scan(struct drive_s *tmp_drive, scsi_add_lun add_lun) .command = CDB_CMD_REPORT_LUNS, }; struct disk_op_s op = { - .drive_gf = tmp_drive, + .drive_fl = tmp_drive, .command = CMD_SCSI, .count = 1, .cdbcmd = &cdb, @@ -284,7 +284,7 @@ scsi_drive_setup(struct drive_s *drive, const char *s, int prio) ASSERT32FLAT(); struct disk_op_s dop; memset(&dop, 0, sizeof(dop)); - dop.drive_gf = drive; + dop.drive_fl = drive; struct cdbres_inquiry data; int ret = cdb_get_inquiry(&dop, &data); if (ret) diff --git a/src/hw/esp-scsi.c b/src/hw/esp-scsi.c index 57d38325..ffd86d0f 100644 --- a/src/hw/esp-scsi.c +++ b/src/hw/esp-scsi.c @@ -83,7 +83,7 @@ esp_scsi_process_op(struct disk_op_s *op) if (!CONFIG_ESP_SCSI) return DISK_RET_EBADTRACK; struct esp_lun_s *llun_gf = - container_of(op->drive_gf, struct esp_lun_s, drive); + container_of(op->drive_fl, struct esp_lun_s, drive); u16 target = GET_GLOBALFLAT(llun_gf->target); u16 lun = GET_GLOBALFLAT(llun_gf->lun); u8 cdbcmd[16]; diff --git a/src/hw/floppy.c b/src/hw/floppy.c index 98ed9bbf..f2577c51 100644 --- a/src/hw/floppy.c +++ b/src/hw/floppy.c @@ -473,7 +473,7 @@ floppy_dma_cmd(struct disk_op_s *op, int count, int command, u8 *param) return DISK_RET_EBOUNDARY; // Invoke floppy controller - u8 floppyid = GET_GLOBALFLAT(op->drive_gf->cntl_id); + u8 floppyid = GET_GLOBALFLAT(op->drive_fl->cntl_id); ret = floppy_drive_pio(floppyid, command, param); if (ret) return ret; @@ -506,11 +506,11 @@ lba2chs(struct disk_op_s *op) struct chs_s res = { }; u32 tmp = op->lba; - u16 nls = GET_GLOBALFLAT(op->drive_gf->lchs.sector); + u16 nls = GET_GLOBALFLAT(op->drive_fl->lchs.sector); res.sector = (tmp % nls) + 1; tmp /= nls; - u16 nlh = GET_GLOBALFLAT(op->drive_gf->lchs.head); + u16 nlh = GET_GLOBALFLAT(op->drive_fl->lchs.head); res.head = tmp % nlh; tmp /= nlh; @@ -538,12 +538,12 @@ static int floppy_read(struct disk_op_s *op) { struct chs_s chs = lba2chs(op); - int ret = floppy_prep(op->drive_gf, chs.cylinder); + int ret = floppy_prep(op->drive_fl, chs.cylinder); if (ret) return ret; // send read-normal-data command to controller - u8 floppyid = GET_GLOBALFLAT(op->drive_gf->cntl_id); + u8 floppyid = GET_GLOBALFLAT(op->drive_fl->cntl_id); u8 param[8]; param[0] = (chs.head << 2) | floppyid; // HD DR1 DR2 param[1] = chs.cylinder; @@ -561,12 +561,12 @@ static int floppy_write(struct disk_op_s *op) { struct chs_s chs = lba2chs(op); - int ret = floppy_prep(op->drive_gf, chs.cylinder); + int ret = floppy_prep(op->drive_fl, chs.cylinder); if (ret) return ret; // send write-normal-data command to controller - u8 floppyid = GET_GLOBALFLAT(op->drive_gf->cntl_id); + u8 floppyid = GET_GLOBALFLAT(op->drive_fl->cntl_id); u8 param[8]; param[0] = (chs.head << 2) | floppyid; // HD DR1 DR2 param[1] = chs.cylinder; @@ -584,7 +584,7 @@ static int floppy_verify(struct disk_op_s *op) { struct chs_s chs = lba2chs(op); - int ret = floppy_prep(op->drive_gf, chs.cylinder); + int ret = floppy_prep(op->drive_fl, chs.cylinder); if (ret) return ret; @@ -597,12 +597,12 @@ static int floppy_format(struct disk_op_s *op) { struct chs_s chs = lba2chs(op); - int ret = floppy_prep(op->drive_gf, chs.cylinder); + int ret = floppy_prep(op->drive_fl, chs.cylinder); if (ret) return ret; // send format-track command to controller - u8 floppyid = GET_GLOBALFLAT(op->drive_gf->cntl_id); + u8 floppyid = GET_GLOBALFLAT(op->drive_fl->cntl_id); u8 param[7]; param[0] = (chs.head << 2) | floppyid; // HD DR1 DR2 param[1] = FLOPPY_SIZE_CODE; diff --git a/src/hw/lsi-scsi.c b/src/hw/lsi-scsi.c index 52332518..d5fc3e45 100644 --- a/src/hw/lsi-scsi.c +++ b/src/hw/lsi-scsi.c @@ -57,7 +57,7 @@ lsi_scsi_process_op(struct disk_op_s *op) if (!CONFIG_LSI_SCSI) return DISK_RET_EBADTRACK; struct lsi_lun_s *llun_gf = - container_of(op->drive_gf, struct lsi_lun_s, drive); + container_of(op->drive_fl, struct lsi_lun_s, drive); u16 target = GET_GLOBALFLAT(llun_gf->target); u16 lun = GET_GLOBALFLAT(llun_gf->lun); u8 cdbcmd[16]; diff --git a/src/hw/megasas.c b/src/hw/megasas.c index efd0f6ef..d2675804 100644 --- a/src/hw/megasas.c +++ b/src/hw/megasas.c @@ -167,7 +167,7 @@ megasas_process_op(struct disk_op_s *op) if (blocksize < 0) return default_process_op(op); struct megasas_lun_s *mlun_gf = - container_of(op->drive_gf, struct megasas_lun_s, drive); + container_of(op->drive_fl, struct megasas_lun_s, drive); struct megasas_cmd_frame *frame = GET_GLOBALFLAT(mlun_gf->frame); u16 pci_id = GET_GLOBALFLAT(mlun_gf->pci_id); int i; diff --git a/src/hw/mpt-scsi.c b/src/hw/mpt-scsi.c index 80c6d6b7..1faede6a 100644 --- a/src/hw/mpt-scsi.c +++ b/src/hw/mpt-scsi.c @@ -188,7 +188,7 @@ mpt_scsi_process_op(struct disk_op_s *op) return default_process_op(op); struct mpt_lun_s *llun_gf = - container_of(op->drive_gf, struct mpt_lun_s, drive); + container_of(op->drive_fl, struct mpt_lun_s, drive); u16 target = GET_GLOBALFLAT(llun_gf->target); u16 lun = GET_GLOBALFLAT(llun_gf->lun); u32 iobase = GET_GLOBALFLAT(llun_gf->iobase); diff --git a/src/hw/nvme.c b/src/hw/nvme.c index 556a9a42..93c25f52 100644 --- a/src/hw/nvme.c +++ b/src/hw/nvme.c @@ -601,7 +601,7 @@ nvme_process_op(struct disk_op_s *op) if (!CONFIG_NVME) return DISK_RET_SUCCESS; - struct nvme_namespace *ns = container_of(op->drive_gf, struct nvme_namespace, + struct nvme_namespace *ns = container_of(op->drive_fl, struct nvme_namespace, drive); switch (op->command) { diff --git a/src/hw/pvscsi.c b/src/hw/pvscsi.c index 7c850a95..d62d0a09 100644 --- a/src/hw/pvscsi.c +++ b/src/hw/pvscsi.c @@ -213,7 +213,7 @@ pvscsi_process_op(struct disk_op_s *op) if (!CONFIG_PVSCSI) return DISK_RET_EBADTRACK; struct pvscsi_lun_s *plun = - container_of(op->drive_gf, struct pvscsi_lun_s, drive); + container_of(op->drive_fl, struct pvscsi_lun_s, drive); struct pvscsi_ring_dsc_s *ring_dsc = plun->ring_dsc; struct PVSCSIRingsState *s = ring_dsc->ring_state; u32 req_entries = s->reqNumEntriesLog2; diff --git a/src/hw/ramdisk.c b/src/hw/ramdisk.c index adec1d1b..b9e9baab 100644 --- a/src/hw/ramdisk.c +++ b/src/hw/ramdisk.c @@ -62,7 +62,7 @@ ramdisk_setup(void) static int ramdisk_copy(struct disk_op_s *op, int iswrite) { - u32 offset = GET_GLOBALFLAT(op->drive_gf->cntl_id); + u32 offset = GET_GLOBALFLAT(op->drive_fl->cntl_id); offset += (u32)op->lba * DISK_SECTOR_SIZE; u64 opd = GDT_DATA | GDT_LIMIT(0xfffff) | GDT_BASE((u32)op->buf_fl); u64 ramd = GDT_DATA | GDT_LIMIT(0xfffff) | GDT_BASE(offset); diff --git a/src/hw/sdcard.c b/src/hw/sdcard.c index 73fef294..6410340e 100644 --- a/src/hw/sdcard.c +++ b/src/hw/sdcard.c @@ -266,7 +266,7 @@ static int sdcard_readwrite(struct disk_op_s *op, int iswrite) { struct sddrive_s *drive = container_of( - op->drive_gf, struct sddrive_s, drive); + op->drive_fl, struct sddrive_s, drive); int cmd = iswrite ? SC_WRITE_SINGLE : SC_READ_SINGLE; if (op->count > 1) cmd = iswrite ? SC_WRITE_MULTIPLE : SC_READ_MULTIPLE; diff --git a/src/hw/usb-msc.c b/src/hw/usb-msc.c index a234f13b..2b188289 100644 --- a/src/hw/usb-msc.c +++ b/src/hw/usb-msc.c @@ -69,9 +69,9 @@ usb_process_op(struct disk_op_s *op) return 0; dprintf(16, "usb_cmd_data id=%p write=%d count=%d buf=%p\n" - , op->drive_gf, 0, op->count, op->buf_fl); + , op->drive_fl, 0, op->count, op->buf_fl); struct usbdrive_s *udrive_gf = container_of( - op->drive_gf, struct usbdrive_s, drive); + op->drive_fl, struct usbdrive_s, drive); // Setup command block wrapper. struct cbw_s cbw; diff --git a/src/hw/usb-uas.c b/src/hw/usb-uas.c index f00221a1..6a8decc0 100644 --- a/src/hw/usb-uas.c +++ b/src/hw/usb-uas.c @@ -98,7 +98,7 @@ uas_process_op(struct disk_op_s *op) return DISK_RET_EBADTRACK; struct uasdrive_s *drive_gf = container_of( - op->drive_gf, struct uasdrive_s, drive); + op->drive_fl, struct uasdrive_s, drive); uas_ui ui; memset(&ui, 0, sizeof(ui)); diff --git a/src/hw/virtio-blk.c b/src/hw/virtio-blk.c index 901b8f50..ad162007 100644 --- a/src/hw/virtio-blk.c +++ b/src/hw/virtio-blk.c @@ -33,7 +33,7 @@ static int virtio_blk_op(struct disk_op_s *op, int write) { struct virtiodrive_s *vdrive_gf = - container_of(op->drive_gf, struct virtiodrive_s, drive); + container_of(op->drive_fl, struct virtiodrive_s, drive); struct vring_virtqueue *vq = vdrive_gf->vq; struct virtio_blk_outhdr hdr = { .type = write ? VIRTIO_BLK_T_OUT : VIRTIO_BLK_T_IN, diff --git a/src/hw/virtio-scsi.c b/src/hw/virtio-scsi.c index 4eea5c39..466b3058 100644 --- a/src/hw/virtio-scsi.c +++ b/src/hw/virtio-scsi.c @@ -39,7 +39,7 @@ virtio_scsi_process_op(struct disk_op_s *op) if (! CONFIG_VIRTIO_SCSI) return 0; struct virtio_lun_s *vlun = - container_of(op->drive_gf, struct virtio_lun_s, drive); + container_of(op->drive_fl, struct virtio_lun_s, drive); struct vp_device *vp = vlun->vp; struct vring_virtqueue *vq = vlun->vq; struct virtio_scsi_req_cmd req; |