From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E90F8C2B9F4 for ; Tue, 22 Jun 2021 18:31:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C4A3B6128C for ; Tue, 22 Jun 2021 18:31:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232209AbhFVSd7 (ORCPT ); Tue, 22 Jun 2021 14:33:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230146AbhFVSd6 (ORCPT ); Tue, 22 Jun 2021 14:33:58 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDBD2C061574 for ; Tue, 22 Jun 2021 11:31:41 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id j4so132249lfc.8 for ; Tue, 22 Jun 2021 11:31:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-transfer-encoding; bh=oEJ10bPYm2tKsq7koP1acFEWdcXK8lq6pl+D4aLyMEE=; b=e5tbGVtEfDBmUr2oipZN4Sw66WwLSpggn/UUYwhgK/YIMCyT/SfLMd/l+HP4LOg/Bx k436OfSAfFYd90cJ22qZvl3ba5TW0bkQ9/VDJFuYnS+nVl1Vbr5eKimf4Ge5UbJSde6o kNOrdRo6Ts6Y5YkeXMcXNghwRVO1GfY8yXYpXPadRJwmQ2jiGF4m6WZD1CMFdGuGSOnY Kt2/QO0jEVg/eZvB3O+Fdyw4fhkJnh0ydD3ZQaWt+KwnYqsJ72/K+qS9PB9OfgiZ4AYp rVhT51oYq6kPO37QyXmvUFWMZAJDwYjG1lI2hTJpoEr196Bj9grg6Ik41xpXj8m0lrpS LLnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-transfer-encoding; bh=oEJ10bPYm2tKsq7koP1acFEWdcXK8lq6pl+D4aLyMEE=; b=Gvv25YajOoypzB46KO8sE68CoO+a6lePNNX4Mm4p1/MoLzyztXLMbo4h7suhoXbZYw D3B92j0K1CfrFICVzOlQDeIxbq8rh+iJor9CC+UhfvggigCjeAzUcyrWUy2AMBpjoLfo nmeUbw4IClrgJkWBqVWwff5I6fT/4Tpzqi6x0lJUiBRYeg28HPumNt/NF8MlGB3Kn7Bj P9YQ5lHR3VcDJotD6n5Vl78m22epoxDTIEkVuBONBJNQOEINnZNlFwvAU4DLnPEp4QEw hldofeaaLOT2GqEIW/JzAKvxvO5RB7tiepGtkpq6KhFaw5EtxMjRsPUlhcKvNgbzbmR1 q3xA== X-Gm-Message-State: AOAM530gf2MCoYOAfnPlogWQ5UktQMyBZG2LObT17uyOt4eGeAAQwyE1 Uz9QtRlg88kBqR3O39DK8VQ= X-Google-Smtp-Source: ABdhPJz74UX8pw9WxzIJQNIQgwfuxzqqZXgMcUojTGZOt86EXxvTHY1atnxa6EB5mPVawyr0MPtiYg== X-Received: by 2002:ac2:4281:: with SMTP id m1mr3811877lfh.164.1624386700094; Tue, 22 Jun 2021 11:31:40 -0700 (PDT) Received: from [192.168.0.91] ([188.242.181.97]) by smtp.googlemail.com with ESMTPSA id 26sm1884763lfz.136.2021.06.22.11.31.39 (version=TLS1 cipher=ECDHE-ECDSA-AES128-SHA bits=128/128); Tue, 22 Jun 2021 11:31:39 -0700 (PDT) Message-ID: <60D22F1D.1000205@gmail.com> Date: Tue, 22 Jun 2021 21:42:37 +0300 From: Nikolai Zhubr User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.2.4) Gecko/20100608 Thunderbird/3.1 MIME-Version: 1.0 To: Arnd Bergmann CC: "Maciej W. Rozycki" , Thomas Gleixner , Heiner Kallweit , netdev , the arch/x86 maintainers , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" Subject: Re: Realtek 8139 problem on 486. References: <60B24AC2.9050505@gmail.com> <60B36A9A.4010806@gmail.com> <60B3CAF8.90902@gmail.com> <60B41D00.8050801@gmail.com> <60B514A0.1020701@gmail.com> <60B560A8.8000800@gmail.com> <49f40dd8-da68-f579-b359-7a7e229565e1@gmail.com> <60B611C6.2000801@gmail.com> <60B65BBB.2040507@gmail.com> <877dipgyrb.ffs@nanos.tec.linutronix.de> <60D1DAC1.9060200@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 22.06.2021 16:22, Arnd Bergmann: [...] > In this case, the function gives up with the "can't route interrupt\n" > output and does not call elcr_set_level_irq(newirq). Adding the call > to elcr_set_level_irq() in that code path as well probably makes it > set the irq to level mode: > > --- a/arch/x86/pci/irq.c > +++ b/arch/x86/pci/irq.c > @@ -984,6 +984,7 @@ static int pcibios_lookup_irq(struct pci_dev *dev, > int assign) > irq = newirq; > } else { > dev_dbg(&dev->dev, "can't route interrupt\n"); > + elcr_set_level_irq(newirq); > return 0; > } > } Yes, it does indeed: [ 0.765886] 8139too 0000:00:0d.0: can't route interrupt [ 0.765886] PCI: setting IRQ 9 as level-triggered [ 0.781734] 8139too 0000:00:0d.0 eth0: RealTek RTL8139 at 0xc4804000, 00:11:6b:32:85:74, IRQ 9 And also here: # 8259A.pl irq 0: 00, edge irq 1: 00, edge irq 2: 00, edge irq 3: 00, edge irq 4: 00, edge irq 5: 00, edge irq 6: 00, edge irq 7: 00, edge irq 8: 02, edge irq 9: 02, level irq 10: 02, edge irq 11: 02, edge irq 12: 02, edge irq 13: 02, edge irq 14: 02, edge irq 15: 02, edge Now connection also works fine with unmodified 8139too driver. The percentage of low-level errors stays very small: RX packets:13953 errors:1 dropped:2 overruns:1 frame:0 TX packets:37346 errors:0 dropped:0 overruns:13 carrier:0 This fix looks really nice. Maybe it is right thing to do. Thank you, Regards, Nikolai > > No idea if doing this is a good idea though, in particular I have no clue > about whether this is a common scenario or not. > > Arnd >