qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: John Snow <jsnow@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Michael Tokarev <mjt@tls.msk.ru>,
	qemu-block@nongnu.org, Max Reitz <mreitz@redhat.com>
Subject: Re: [PATCH] fdc: fix floppy boot for Red Hat Linux 5.2
Date: Fri, 12 Mar 2021 09:01:41 +0100	[thread overview]
Message-ID: <0badfac5-8c0e-600c-949c-61e196e7aa31@redhat.com> (raw)
In-Reply-To: <20210312063259.1721939-1-jsnow@redhat.com>

On 12/03/2021 07.32, John Snow wrote:
> The image size indicates it's an 81 track floppy disk image, which we
> don't have a listing for in the geometry table. When you force the drive
> type to 1.44MB, it guesses the reasonably close 18/80. When the drive
> type is allowed to auto-detect or set to 2.88, it guesses a very
> incorrect geometry.
> 
> auto, 144 and 288 drive types get the right geometry with the new entry
> in the table.
> 
> Reported-by: Michael Tokarev <mjt@tls.msk.ru>
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>   hw/block/fdc.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/hw/block/fdc.c b/hw/block/fdc.c
> index 198940e737..b2f26ba587 100644
> --- a/hw/block/fdc.c
> +++ b/hw/block/fdc.c
> @@ -122,6 +122,7 @@ static const FDFormat fd_formats[] = {
>       /* First entry is default format */
>       /* 1.44 MB 3"1/2 floppy disks */
>       { FLOPPY_DRIVE_TYPE_144, 18, 80, 1, FDRIVE_RATE_500K, }, /* 3.5" 2880 */
> +    { FLOPPY_DRIVE_TYPE_144, 18, 81, 1, FDRIVE_RATE_500K, },
>       { FLOPPY_DRIVE_TYPE_144, 20, 80, 1, FDRIVE_RATE_500K, }, /* 3.5" 3200 */
>       { FLOPPY_DRIVE_TYPE_144, 21, 80, 1, FDRIVE_RATE_500K, },
>       { FLOPPY_DRIVE_TYPE_144, 21, 82, 1, FDRIVE_RATE_500K, },

That whole table-based approach seems quite unreliable to me - I've seen 
floppy disks with 80, 81, 82 or sometimes even 83 tracks in the past, so I 
think we would do better with a more flexible way of guessing ... but for 
the time being, this is certainly a quick and easy fix that also should not 
have any negative impact, thus:

Reviewed-by: Thomas Huth <thuth@redhat.com>



  reply	other threads:[~2021-03-12  8:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-12  6:32 [PATCH] fdc: fix floppy boot for Red Hat Linux 5.2 John Snow
2021-03-12  8:01 ` Thomas Huth [this message]
2021-03-12 16:21   ` John Snow

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=0badfac5-8c0e-600c-949c-61e196e7aa31@redhat.com \
    --to=thuth@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mjt@tls.msk.ru \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --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).