All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Weil <weil@mail.berlios.de>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] pcnet: make subsystem vendor id match hardware
Date: Tue, 16 Mar 2010 22:29:43 +0100	[thread overview]
Message-ID: <4B9FF847.8070502@mail.berlios.de> (raw)
In-Reply-To: <20100315133650.GA31573@redhat.com>

Michael S. Tsirkin schrieb:
> Real pcnet device (AT2450) apparently has subsystem
> device and vendor id set to 0, this is out of spec
> (which requires that vendor id is obtained from PCI SIG)
> but windows xp driver seems to need this in order
> to associate.
>
> qemu sets pci subsystem id to qumranet/qemu
> since d350d97d196a632b6c7493acf07a061017fc6f7d,
> debian does not yet have this patch.
>
> https://bugzilla.redhat.com/show_bug.cgi?id=521247
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Anthony Liguori <aliguori@us.ibm.com>
> ---
>  hw/pcnet.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/hw/pcnet.c b/hw/pcnet.c
> index 44b5b31..12260be 100644
> --- a/hw/pcnet.c
> +++ b/hw/pcnet.c
> @@ -1997,6 +1997,9 @@ static int pci_pcnet_init(PCIDevice *pci_dev)
>      pci_set_long(pci_conf + PCI_BASE_ADDRESS_0 + 4,
>                   PCI_BASE_ADDRESS_SPACE_MEMORY);
>  
> +    pci_set_word(pci_conf + PCI_SUBSYSTEM_VENDOR_ID, 0x0);
> +    pci_set_word(pci_conf + PCI_SUBSYSTEM_ID, 0x0);
> +
>      /* TODO: value must be 0 at RST# */
>      pci_conf[PCI_INTERRUPT_PIN] = 1; // interrupt pin 0
>      pci_conf[PCI_MIN_GNT] = 0x06;
>   

Don't you think that a comment in the code
(with the same explanation which you wrote above)
would be helpful in this special case?

Of course one can always call git blame, but
a comment is easier to read.

Regards
Stefan

  parent reply	other threads:[~2010-03-16 21:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-15 13:36 [Qemu-devel] [PATCH] pcnet: make subsystem vendor id match hardware Michael S. Tsirkin
2010-03-16 17:10 ` [Qemu-devel] " Jan Kiszka
2010-03-16 21:29 ` Stefan Weil [this message]
2010-03-17 12:33   ` [Qemu-devel] " Michael S. Tsirkin

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=4B9FF847.8070502@mail.berlios.de \
    --to=weil@mail.berlios.de \
    --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 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.