From: Thiemo Seufer <ths@networkno.de>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] Fix Harddisk initialization
Date: Tue, 21 Feb 2006 19:29:28 +0000 [thread overview]
Message-ID: <20060221192928.GD4110@networkno.de> (raw)
Hello All,
this fixes Harddisk initialization (s->nsector is initially 0x100, which
is supposed to get handled as zero).
Thiemo
Index: qemu-work/hw/ide.c
===================================================================
--- qemu-work.orig/hw/ide.c 2006-02-18 22:12:56.000000000 +0000
+++ qemu-work/hw/ide.c 2006-02-19 02:34:13.000000000 +0000
@@ -1550,12 +1550,12 @@
ide_set_irq(s);
break;
case WIN_SETMULT:
- if (s->nsector > MAX_MULT_SECTORS ||
+ if ((s->nsector & 0xFF) > MAX_MULT_SECTORS ||
s->nsector == 0 ||
(s->nsector & (s->nsector - 1)) != 0) {
ide_abort_command(s);
} else {
- s->mult_sectors = s->nsector;
+ s->mult_sectors = s->nsector & 0xFF;
s->status = READY_STAT;
}
ide_set_irq(s);
next reply other threads:[~2006-02-21 19:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-21 19:29 Thiemo Seufer [this message]
2006-02-22 8:49 ` [Qemu-devel] [PATCH] Fix Harddisk initialization Jens Axboe
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=20060221192928.GD4110@networkno.de \
--to=ths@networkno.de \
--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).