[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] net: tulip: Set PCI revision to match dec21143
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH] net: tulip: Set PCI revision to match dec21143 |
Date: |
Mon, 8 Jun 2020 00:17:11 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
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);
>