From: Zhi Hui Li <zhihuili@linux.vnet.ibm.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: zhihuili@cn.ibm.com, "Hervé Poussineau" <hpoussin@reactos.org>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/3 v6] Replace bdrv_* to bdrv_aio_* functions in DMA mode in fdc.c
Date: Wed, 16 May 2012 15:58:56 +0800 [thread overview]
Message-ID: <4FB35E40.8010503@linux.vnet.ibm.com> (raw)
In-Reply-To: <4FB22171.7050104@redhat.com>
On 2012年05月15日 17:27, Paolo Bonzini wrote:
> Il 15/05/2012 11:17, Li Zhi Hui ha scritto:
>> Signed-off-by: Paolo Bonzini<pbonzini@redhat.com>
>> Signed-off-by: Li Zhi Hui<zhihuili@linux.vnet.ibm.com>
>> ---
>> hw/fdc.c | 313 +++++++++++++++++++++++++++++++++++++++++--------------------
>> 1 files changed, 210 insertions(+), 103 deletions(-)
>
> To reviewers, this is obviously missing migration support. :)
>
Yes, you are right.
I am sorry that I am a newer, I don't know more about migration, so I
want to send some simple code first .
> It is also missing a good commit message. It should say that the
> support in the existing code for scan commands has a lot of "weirdness",
> for example:
>
> - if ((ret< 0&& fdctrl->data_dir == FD_DIR_SCANL) ||
> - (ret> 0&& fdctrl->data_dir == FD_DIR_SCANH)) {
> - status2 = 0x00;
> - goto end_transfer;
>
> ...
>
> - end_transfer:
> - len = fdctrl->data_pos - start_pos;
> - FLOPPY_DPRINTF("end transfer %d %d %d\n",
> - fdctrl->data_pos, len, fdctrl->data_len);
> - if (fdctrl->data_dir == FD_DIR_SCANE ||
> - fdctrl->data_dir == FD_DIR_SCANL ||
> - fdctrl->data_dir == FD_DIR_SCANH)
> - status2 = FD_SR2_SEH;
>
> which blindly overwrites status2. Hence the new code was not written
> based on it. However, the new code is untested as far as I know.
>
Ok, I will add the commit message.
>> + if (fdctrl->data_dir == FD_DIR_SCANE ||
>> + fdctrl->data_dir == FD_DIR_SCANL ||
>> + fdctrl->data_dir == FD_DIR_SCANH) {
>> + fdctrl->dma_status2 = FD_SR2_SEH;
>> + }
>
> This should be FD_SR2_SNS (Spec for the FDC is at
> http://www.cepece.info/amstrad/docs/i8272/8272sp.htm: "If the conditions
> for scan are not met between the the starting sector (as specified by R)
> and the last sector on the cylinder (EOT), then the FDC sets the SN
> (Scan Not Satisfied) flag of Status Register 2 to a 1 (high), and
> terminates the Scan Command").
>
ok.
Thank you very much for your feedback. :)
next prev parent reply other threads:[~2012-05-16 7:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-15 9:17 [Qemu-devel] [PATCH 0/3 v6] Replace bdrv_* to bdrv_aio_* functions in DMA mode in fdc.c Li Zhi Hui
2012-05-15 9:17 ` [Qemu-devel] [PATCH 1/3 v6] add function DMA_set_return and DMA_set_channel_async in dma.c Li Zhi Hui
2012-05-15 9:17 ` [Qemu-devel] [PATCH 2/3 v6] Replace bdrv_* to bdrv_aio_* functions in DMA mode in fdc.c Li Zhi Hui
2012-05-15 9:27 ` Paolo Bonzini
2012-05-15 9:33 ` Kevin Wolf
2012-05-15 9:38 ` Paolo Bonzini
2012-05-16 8:23 ` Zhi Hui Li
2012-05-16 9:11 ` Paolo Bonzini
2012-05-16 10:59 ` Kevin Wolf
2012-05-15 20:49 ` Hervé Poussineau
2012-05-16 7:58 ` Zhi Hui Li [this message]
2012-05-15 9:17 ` [Qemu-devel] [PATCH 3/3 v6] fdc.c: add tracing Li Zhi Hui
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=4FB35E40.8010503@linux.vnet.ibm.com \
--to=zhihuili@linux.vnet.ibm.com \
--cc=hpoussin@reactos.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=zhihuili@cn.ibm.com \
/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).