From: Isaku Yamahata <yamahata@valinux.co.jp>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH] pci: w1cmask[PCI_BRIDGE_CONTROL] initialized incorrectly
Date: Thu, 27 Jan 2011 12:54:03 +0900 [thread overview]
Message-ID: <20110127035403.GD4395@valinux.co.jp> (raw)
In-Reply-To: <20110126135715.GB13219@redhat.com>
On Wed, Jan 26, 2011 at 03:57:15PM +0200, Michael S. Tsirkin wrote:
> On Wed, Jan 26, 2011 at 10:53:42PM +0900, Isaku Yamahata wrote:
> > On Wed, Jan 26, 2011 at 03:46:01PM +0200, Michael S. Tsirkin wrote:
> > > On Wed, Jan 26, 2011 at 10:17:48PM +0900, Isaku Yamahata wrote:
> > > > The bit should be writable, not w1c.
> > > >
> > > > 3.2.5.18 bridge control register
> > > > bit 11 Discard Timer SERR# Enable
> > > >
> > > > When set to 1, this bit enables the bridge to assert SERR# on
> > > > the primary interface when either the Primary Discard Timer or
> > > > Secondary Discard Timer expires and a Delayed Transaction is
> > > > discarded from a queue in the bridge. The default state of this
> > > > bit must be 0 after reset.
> > > > 0 - do not assert SERR# on the primary interface as
> > > > a result of the expiration of either the Primary
> > > > Discard Timer or Secondary Discard Timer
> > > > 1 - assert SERR# on the primary interface if either
> > > > the Primary Discard Timer or Secondary Discard
> > > > Timer expires and a Delayed Transaction
> > >
> > > Yes but
> > > #define PCI_BRIDGE_CTL_DISCARD_STATUS 0x400 /* Discard timer status */
> > >
> > > So this is bit 10?
> >
> > Oh, sorry. So wmask should be chenged.
>
> Yes. does the below work?
Yep. Thank you.
Tested-by: Isaku Yamahata <yamahata@valinux.co.jp>
>
> commit 24ebb78e6ec19b39cd138d493a2859122110f9cb
> Author: Michael S. Tsirkin <mst@redhat.com>
> Date: Wed Jan 26 15:55:07 2011 +0200
>
> pci: bridge control fixup
>
> PCI_BRIDGE_CTL_DISCARD_STATUS (bit 10 in bridge control register)
> is W1C so we should not make it writeable, otherwise the assert(!(wmask
> & w1cmask)) in pci_default_write_config() is hit
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> Reported-by: Isaku Yamahata <yamahata@valinux.co.jp>
>
> diff --git a/hw/pci.c b/hw/pci.c
> index 044c4bd..712280a 100644
> --- a/hw/pci.c
> +++ b/hw/pci.c
> @@ -641,7 +641,6 @@ static void pci_init_wmask_bridge(PCIDevice *d)
> PCI_BRIDGE_CTL_FAST_BACK |
> PCI_BRIDGE_CTL_DISCARD |
> PCI_BRIDGE_CTL_SEC_DISCARD |
> - PCI_BRIDGE_CTL_DISCARD_STATUS |
> PCI_BRIDGE_CTL_DISCARD_SERR);
> /* Below does not do anything as we never set this bit, put here for
> * completeness. */
>
--
yamahata
prev parent reply other threads:[~2011-01-27 3:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-26 9:45 [Qemu-devel] [PATCH] pci: w1cmask[PCI_BRIDGE_CONTROL] initialized incorrectly Isaku Yamahata
2011-01-26 12:09 ` [Qemu-devel] " Michael S. Tsirkin
2011-01-26 13:17 ` Isaku Yamahata
2011-01-26 13:46 ` Michael S. Tsirkin
2011-01-26 13:53 ` Isaku Yamahata
2011-01-26 13:57 ` Michael S. Tsirkin
2011-01-27 3:54 ` Isaku Yamahata [this message]
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=20110127035403.GD4395@valinux.co.jp \
--to=yamahata@valinux.co.jp \
--cc=mst@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).