diff options
author | Thomas Huth <thuth@redhat.com> | 2021-02-03 18:18:30 +0100 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2021-02-20 12:36:19 +0100 |
commit | f5d33dd51f02d0e292fd41c628ed0594fcb126ff (patch) | |
tree | c5d8f090a1c52510dafc10d511ecd118d39f9b56 /hw/block | |
parent | 6661d9a58ad7960184f173b4411f888fabecd3bd (diff) | |
download | qemu-f5d33dd51f02d0e292fd41c628ed0594fcb126ff.zip qemu-f5d33dd51f02d0e292fd41c628ed0594fcb126ff.tar.gz qemu-f5d33dd51f02d0e292fd41c628ed0594fcb126ff.tar.bz2 |
hw/block/fdc: Remove the check_media_rate property
This was only required for the pc-1.0 and earlier machine types.
Now that these have been removed, we can also drop the corresponding
code from the FDC device.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Acked-by: John Snow <jsnow@redhat.com>
Message-Id: <20210203171832.483176-3-thuth@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'hw/block')
-rw-r--r-- | hw/block/fdc.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/hw/block/fdc.c b/hw/block/fdc.c index 292ea87..198940e 100644 --- a/hw/block/fdc.c +++ b/hw/block/fdc.c @@ -874,7 +874,6 @@ struct FDCtrl { FloppyDriveType type; } qdev_for_drives[MAX_FD]; int reset_sensei; - uint32_t check_media_rate; FloppyDriveType fallback; /* type=auto failure fallback */ /* Timers state */ uint8_t timer0; @@ -1021,18 +1020,10 @@ static const VMStateDescription vmstate_fdrive_media_changed = { } }; -static bool fdrive_media_rate_needed(void *opaque) -{ - FDrive *drive = opaque; - - return drive->fdctrl->check_media_rate; -} - static const VMStateDescription vmstate_fdrive_media_rate = { .name = "fdrive/media_rate", .version_id = 1, .minimum_version_id = 1, - .needed = fdrive_media_rate_needed, .fields = (VMStateField[]) { VMSTATE_UINT8(media_rate, FDrive), VMSTATE_END_OF_LIST() @@ -1689,8 +1680,7 @@ static void fdctrl_start_transfer(FDCtrl *fdctrl, int direction) /* Check the data rate. If the programmed data rate does not match * the currently inserted medium, the operation has to fail. */ - if (fdctrl->check_media_rate && - (fdctrl->dsr & FD_DSR_DRATEMASK) != cur_drv->media_rate) { + if ((fdctrl->dsr & FD_DSR_DRATEMASK) != cur_drv->media_rate) { FLOPPY_DPRINTF("data rate mismatch (fdc=%d, media=%d)\n", fdctrl->dsr & FD_DSR_DRATEMASK, cur_drv->media_rate); fdctrl_stop_transfer(fdctrl, FD_SR0_ABNTERM, FD_SR1_MA, 0x00); @@ -2489,8 +2479,7 @@ static void fdctrl_result_timer(void *opaque) cur_drv->sect = (cur_drv->sect % cur_drv->last_sect) + 1; } /* READ_ID can't automatically succeed! */ - if (fdctrl->check_media_rate && - (fdctrl->dsr & FD_DSR_DRATEMASK) != cur_drv->media_rate) { + if ((fdctrl->dsr & FD_DSR_DRATEMASK) != cur_drv->media_rate) { FLOPPY_DPRINTF("read id rate mismatch (fdc=%d, media=%d)\n", fdctrl->dsr & FD_DSR_DRATEMASK, cur_drv->media_rate); fdctrl_stop_transfer(fdctrl, FD_SR0_ABNTERM, FD_SR1_MA, 0x00); @@ -2895,8 +2884,6 @@ static Property isa_fdc_properties[] = { DEFINE_PROP_UINT32("dma", FDCtrlISABus, dma, 2), DEFINE_PROP_DRIVE("driveA", FDCtrlISABus, state.qdev_for_drives[0].blk), DEFINE_PROP_DRIVE("driveB", FDCtrlISABus, state.qdev_for_drives[1].blk), - DEFINE_PROP_BIT("check_media_rate", FDCtrlISABus, state.check_media_rate, - 0, true), DEFINE_PROP_SIGNED("fdtypeA", FDCtrlISABus, state.qdev_for_drives[0].type, FLOPPY_DRIVE_TYPE_AUTO, qdev_prop_fdc_drive_type, FloppyDriveType), |