From nobody Fri May 17 10:44:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1587169608; cv=none; d=zohomail.com; s=zohoarc; b=I54Y+IBuUAfVQrdIy325CaNVs5/VSuq1o42W1jq6vP6D7rqdKciR7+uS6jin93xvYISDEfw/5+wVXO/JK/GFBICO6FdgIfTNtSXGbzFq7mN9WCppRwqn9OHr0hnxG1T0nOMnVpOpc4cWMcuO4DT2+Vloiep9ZIo1lZjInA699V0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587169608; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=+0rfodSuYelFon6nO4YCwpcqpjutW/YJ7CYyGJckGZs=; b=a7Y5KQiJIuLUsABuUY5stVMK2ZcwqQgfOJWvY1x22y43uhGe8uNa8mzRncdnOSlxX0VzCTijTIihEl8PNlP7J4pTi+dsGP0l6PT8IVEXGcTE/+Ut+3X83GHYg7THwoRVwc8RtDxAKurFsRUn2QU3ts7n9db+21vLk6WIBm5gzxw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1587169608649970.1104445349621; Fri, 17 Apr 2020 17:26:48 -0700 (PDT) Received: from localhost ([::1]:53396 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jPbJn-0000tb-0f for importer@patchew.org; Fri, 17 Apr 2020 20:26:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44782) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jPbJ5-0000St-UN for qemu-devel@nongnu.org; Fri, 17 Apr 2020 20:26:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jPbJ4-0002fl-MB for qemu-devel@nongnu.org; Fri, 17 Apr 2020 20:26:03 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:43728) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jPbJ4-0002b2-G6 for qemu-devel@nongnu.org; Fri, 17 Apr 2020 20:26:02 -0400 Received: by mail-wr1-x443.google.com with SMTP id i10so4950521wrv.10 for ; Fri, 17 Apr 2020 17:26:01 -0700 (PDT) Received: from desktop.lan (ip-86-49-35-8.net.upcbroadband.cz. [86.49.35.8]) by smtp.gmail.com with ESMTPSA id r17sm23006957wrn.43.2020.04.17.17.25.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Apr 2020 17:25:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+0rfodSuYelFon6nO4YCwpcqpjutW/YJ7CYyGJckGZs=; b=IGHcIA1XjS3zpeO88Yusx6IDWhMxrtU66N6TuHXWWFflIaj9ZNz9x/ltsHYVyDiSvg Org89V4FEPp6/pNes7MIzjBP+9lgoBeBWXxi3VZN8inmraFVdtf2nLzy3oFs19U62Gh0 fkuR43evLaG5vM0ex9cO9eVa/qVU1pIFXZocSGlYUbB4dZ+UtWYcInKOlNiWinYV6eFt 9QgNvCG17HwVaV4mP7kA6aHbAyWY22crTFP1JpWwtCBiAbPGWnMJYXqJ4Cez5j1oQaW/ adkzc2HtThA4gnt1yqfU00ujcriKt/R6NkSmjs+hLSehqZtjF9TfJSO47viTnDSmxnvy Is2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+0rfodSuYelFon6nO4YCwpcqpjutW/YJ7CYyGJckGZs=; b=EyiFLd3ckJas2pLkmuwsia5pqKUkPvkIz+yMpacRrHW+krD77Co+vYNLHwexiKzTCj hD9A736uV1YOWk2V14CTWDQ2tWj/BXNPdRDQ0UPGJt2c0koS5VpyH00iJ2KoARlDpM6+ 0hmwQOPw/EzQpDhgBwnRg7d14ooLOiB/HCvd/4gIw9Vz05qFhOLZdduny/3YaK2XAqNY Iibdpnhie7YFZY3G2ixMSblCycBLO3iHmLZnI/TfmpQ3OrbPLgwlyjhkbWALiFTA/tme e2cumk6iaZAjoGmRZSxKB9S020Mzihv7PxXLLff4zkN6ZIvInAVPgKjMuxS43e8ADz14 dEMA== X-Gm-Message-State: AGi0PuY5dXSLp3ZALSRHxKDZA5MY4L64lFTpdozKHnuUeYtq0HNQ0f6v LIbIavAFHxAWwZYjRqQpPHvShtW0 X-Google-Smtp-Source: APiQypL19PZG2C+sMfCUMr9qK07SjReX0zc/RXyuwgIDEvRndU4jwYaFKZcRHKgIikazBJUmVDGL/w== X-Received: by 2002:adf:9022:: with SMTP id h31mr6330140wrh.223.1587169560051; Fri, 17 Apr 2020 17:26:00 -0700 (PDT) From: Marek Vasut X-Google-Original-From: Marek Vasut To: qemu-devel@nongnu.org Subject: [PATCH] net: tulip: Set PCI revision to match dec21143 Date: Sat, 18 Apr 2020 02:25:52 +0200 Message-Id: <20200418002552.343480-1-marek.vasut+renesas@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::443 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Prasad J Pandit , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Sven Schnelle , Marek Vasut Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) The tulip driver claims to emulate dec21143 and it does not emulate dec2114= 2. The dec21142 and dec21143 can be discerned by the PCI revision register, where dec21142 reports value < 0x20 and dec21143 value >=3D 0x20. E.g. the U-Boot 'tulip' driver also only supports dec21143 and verifies that the PCI revision ID is >=3D 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 Cc: Marc-Andr=C3=A9 Lureau Cc: Paolo Bonzini Cc: Peter Maydell Cc: Prasad J Pandit Cc: Sven Schnelle --- 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) =20 pci_conf =3D s->dev.config; pci_conf[PCI_INTERRUPT_PIN] =3D 1; /* interrupt pin A */ + /* Anything with revision < 0x20 is DC21142, anything >=3D 0x20 is DC2= 1143 */ + pci_conf[PCI_REVISION_ID] =3D 0x20; =20 s->eeprom =3D eeprom93xx_new(&pci_dev->qdev, 64); tulip_fill_eeprom(s); --=20 2.25.1