From: Sven Schnelle <svens@stackframe.org>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Prasad J Pandit" <pjp@fedoraproject.org>,
qemu-devel@nongnu.org, "Marek Vasut" <marek.vasut@gmail.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Marek Vasut" <marek.vasut+renesas@gmail.com>
Subject: Re: [PATCH] net: tulip: Set PCI revision to match dec21143
Date: Wed, 10 Jun 2020 23:13:10 +0200 [thread overview]
Message-ID: <20200610211310.GA26448@t470p.stackframe.org> (raw)
In-Reply-To: <203b5328-b473-119c-4122-8f775f390ad0@amsat.org>
On Mon, Jun 08, 2020 at 12:17:11AM +0200, Philippe Mathieu-Daudé wrote:
> Hi Sven, could you review thiw one-line patch?
>
> On 4/18/20 2:25 AM, Marek Vasut wrote:
> > The tulip driver claims to emulate dec21143 and it does not emulate dec21142.
> > The dec21142 and dec21143 can be discerned by the PCI revision register,
> > where dec21142 reports value < 0x20 and dec21143 value >= 0x20. E.g. the
> > U-Boot 'tulip' driver also only supports dec21143 and verifies that the
> > PCI revision ID is >= 0x20, otherwise refuses to operate such a card.
> >
> > This patch sets the PCI revision ID to 0x20 to match the dec21143 and
> > thus also permits e.g. U-Boot to work with the tulip emulation.
> >
> > Fixes: 34ea023d4b95 ("net: add tulip (dec21143) driver")
> > Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
> > Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
> > Cc: Paolo Bonzini <pbonzini@redhat.com>
> > Cc: Peter Maydell <peter.maydell@linaro.org>
> > Cc: Prasad J Pandit <pjp@fedoraproject.org>
> > Cc: Sven Schnelle <svens@stackframe.org>
> > ---
> > hw/net/tulip.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/hw/net/tulip.c b/hw/net/tulip.c
> > index 1295f51d07..ffb6c2479a 100644
> > --- a/hw/net/tulip.c
> > +++ b/hw/net/tulip.c
> > @@ -962,6 +962,8 @@ static void pci_tulip_realize(PCIDevice *pci_dev, Error **errp)
> >
> > pci_conf = s->dev.config;
> > pci_conf[PCI_INTERRUPT_PIN] = 1; /* interrupt pin A */
> > + /* Anything with revision < 0x20 is DC21142, anything >= 0x20 is DC21143 */
> > + pci_conf[PCI_REVISION_ID] = 0x20;
> >
> > s->eeprom = eeprom93xx_new(&pci_dev->qdev, 64);
> > tulip_fill_eeprom(s);
> >
>
The intel datasheet for the DEC21143 lists only Rev IDs > 30 for this particular family:
21143-PB,TB,PC,TC - 0x30
21143-PD,TD - x041
but maybe older DEC chips used 0x20 - don't know. The most interesting question is
whether ancient OS' like HP-UX or Windows XP would still work with this patch, but
i don't have test images at hand right now.
Regards
Sven
next prev parent reply other threads:[~2020-06-10 21:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-18 0:25 [PATCH] net: tulip: Set PCI revision to match dec21143 Marek Vasut
2020-06-06 12:02 ` Marek Vasut
2020-06-07 22:17 ` Philippe Mathieu-Daudé
2020-06-10 21:13 ` Sven Schnelle [this message]
2020-06-10 22:27 ` Philippe Mathieu-Daudé
2020-06-10 22:39 ` Marek Vasut
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=20200610211310.GA26448@t470p.stackframe.org \
--to=svens@stackframe.org \
--cc=f4bug@amsat.org \
--cc=marcandre.lureau@redhat.com \
--cc=marek.vasut+renesas@gmail.com \
--cc=marek.vasut@gmail.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=pjp@fedoraproject.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.