From: Pavel Hrdina <phrdina@redhat.com>
To: Pavel Hrdina <phrdina@redhat.com>
Cc: kwolf@redhat.com, mtosatti@redhat.com, qemu-devel@nongnu.org,
armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2] fdc: fix media change detection for windows
Date: Tue, 05 Jun 2012 17:50:32 +0200 [thread overview]
Message-ID: <4FCE2AC8.9080306@redhat.com> (raw)
In-Reply-To: <095b1f20091f8cf18565a3700372fa65736f0d0a.1338911144.git.phrdina@redhat.com>
Sorry, I forget the qtest. I'll create it and send it again.
Pavel
On 06/05/2012 05:46 PM, Pavel Hrdina wrote:
> The Windows uses 'READ' command at the start of an instalation
> without checking the 'dir' register. We have to abort the transfer
> with an abnormal termination if there is no media in the drive.
>
> We have to also check the 'media_change' bit in the 'fd_seek'. This
> internal seek clears the 'media_change' bit, too, if there is
> a media inserted.
>
> Signed-off-by: Pavel Hrdina<phrdina@redhat.com>
> ---
> hw/fdc.c | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/hw/fdc.c b/hw/fdc.c
> index 30d34e3..2d6dd30 100644
> --- a/hw/fdc.c
> +++ b/hw/fdc.c
> @@ -127,8 +127,13 @@ static int fd_seek(FDrive *drv, uint8_t head, uint8_t track, uint8_t sect,
> uint32_t sector;
> int ret;
>
> + if (drv->bs != NULL&& bdrv_is_inserted(drv->bs)) {
> + drv->media_changed = 0;
> + }
> +
> if (track> drv->max_track ||
> - (head != 0&& (drv->flags& FDISK_DBL_SIDES) == 0)) {
> + (head != 0&& (drv->flags& FDISK_DBL_SIDES) == 0) ||
> + drv->media_changed) {
> FLOPPY_DPRINTF("try to read %d %02x %02x (max=%d %d %02x %02x)\n",
> head, track, sect, 1,
> (drv->flags& FDISK_DBL_SIDES) == 0 ? 0 : 1,
next prev parent reply other threads:[~2012-06-05 15:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-05 15:46 [Qemu-devel] [PATCH v2] fdc: fix media change detection for windows Pavel Hrdina
2012-06-05 15:50 ` Pavel Hrdina [this message]
2012-06-05 15:56 ` Kevin Wolf
2012-06-05 16:34 ` Pavel Hrdina
2012-06-06 10:35 ` Kevin Wolf
2012-06-06 13:43 ` Pavel Hrdina
2012-06-06 13:58 ` Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FCE2AC8.9080306@redhat.com \
--to=phrdina@redhat.com \
--cc=armbru@redhat.com \
--cc=kwolf@redhat.com \
--cc=mtosatti@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).