From: "Michael S. Tsirkin" <mst@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
Dean Nelson <dnelson@redhat.com>,
qemu-devel@nongnu.org,
Jesse Brandeburg <jesse.brandeburg@intel.com>,
Aurelien Jarno <aurelien@aurel32.net>,
Alex Williamson <alex.williamson@redhat.com>,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
Kevin Wolf <mail@kevin-wolf.de>,
Andy Gospodarek <andy@greyhouse.net>
Subject: Re: [Qemu-devel] [PATCH qemu] e1000: CTRL.RST emulation
Date: Tue, 27 Sep 2011 15:32:53 +0300 [thread overview]
Message-ID: <20110927123252.GA11276@redhat.com> (raw)
In-Reply-To: <CAFEAcA-AJAq_FquJ5mUiHKL0t++YrEhTzD5gazG0V9j-PgO6pA@mail.gmail.com>
On Tue, Sep 27, 2011 at 12:50:21PM +0100, Peter Maydell wrote:
> On 27 September 2011 12:25, Michael S. Tsirkin <mst@redhat.com> wrote:
> > e1000 spec says CTRL.RST write should have the same effect
> > as bus reset, except that is preserves PCI Config.
> > Reset device registers and interrupts.
> >
> > Fix suggested by Andy Gospodarek <andy@greyhouse.net>
>
> Doesn't this have the same effect as this patch:
> http://patchwork.ozlabs.org/patch/108673/
Right except mine clears the interrupts as well.
I missed that patch - what happened to it in the end?
> except that it's harder to read because it's moved a lot
> of code around in the file?
>
> (I think you have an extra qemu_set_irq() call in there,
The device spec says we should reset the interrupts.
So it seems necessary.
> actually. But it was hard to find.
I probably should split the patch out
1. code movement
2. code change
Forward declarations just to work around random
placement of functions in file seem wrong -
why not order the functions sensibly instead?
> Also your code has the
> bug that was in earlier revisions of Anthony's patch where
> after doing the reset you fall through and allow other bits
> in the ctrl register to be set.)
>
> -- PMM
True.
--
MST
next prev parent reply other threads:[~2011-09-27 12:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-27 11:25 [Qemu-devel] [PATCH qemu] e1000: CTRL.RST emulation Michael S. Tsirkin
2011-09-27 11:50 ` Peter Maydell
2011-09-27 12:32 ` Michael S. Tsirkin [this message]
2011-09-27 12:39 ` Peter Maydell
2011-09-27 13:09 ` Michael S. Tsirkin
2011-09-27 14:30 ` Anthony Liguori
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=20110927123252.GA11276@redhat.com \
--to=mst@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=andy@greyhouse.net \
--cc=aurelien@aurel32.net \
--cc=dnelson@redhat.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=jesse.brandeburg@intel.com \
--cc=mail@kevin-wolf.de \
--cc=peter.maydell@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.