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=-14.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 2D3FDC433E6 for ; Wed, 6 Jan 2021 11:07:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0157323110 for ; Wed, 6 Jan 2021 11:07:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726430AbhAFLHV (ORCPT ); Wed, 6 Jan 2021 06:07:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725828AbhAFLHT (ORCPT ); Wed, 6 Jan 2021 06:07:19 -0500 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 514CAC06134D; Wed, 6 Jan 2021 03:06:39 -0800 (PST) Received: by mail-ej1-x62e.google.com with SMTP id lt17so4535739ejb.3; Wed, 06 Jan 2021 03:06:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=LMhEikvRUZQaIKyyHYQPd9FehVZ9OCrs1+Guuen9CX0=; b=X4hGYmXPkT7Y/gFWjq2R6usf6mtSbqmYvDxFIVpAsyNrdel18QRQ9NKh0HrcZf2JND KO+7W1KfW/rMUox9uRp4D9cNWB3ft0Sv1vCO9rJaAE8BShbC0aqQncL6yqBAAeGV7sOQ ewL4CpLiRVfd6qelJ0pJlakxNKDC9hSHPvabsHiTeVk3Un7PkdoAqYa3IcPeMHceYJkJ dExoZRtYYyYisFh/1CQTxNUcDVa12tvTPjmRm5pSr3GVzwbMMyntvxAdDLcWKfFsP3nf A7y4eBftUUsxTmgrfKopE8TiCZ0/hEvQOkBu230ZSKKmVUrRglEniQDXLE82Qlu2VEcu +N1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=LMhEikvRUZQaIKyyHYQPd9FehVZ9OCrs1+Guuen9CX0=; b=OMayDP+FFJQ7giIdv/VJtWiOD1K1dN5YTetovhZ+zyD50jZz4v+9FvGhiXU0wrH8W1 rWfGYSYW0g4TemlV5RRwfXUV2nDjd8jeFVOQus5QV+OhtgQ5ci/G2j8jJqKranpm1/+j v382ww3u6tTX4JPpE9zpPh60TxEm/+MlUhjvdcoBPYRLJAFoR7O2HoRXas4P0ZeHf82d HYnAYRXAurN9E7A8wq0ZmtfhsvorlXFa/jZUNMsC3CbglkpK9Ja3nmGPUGQA5SPnTa8n envTzrTANACmFslQRqpnMB7ePvSnmn3G9RDCNuXFtS/nm2o5uBaJAtCUQKzaH91Ahuio 5UBw== X-Gm-Message-State: AOAM530tUjjpIal5+05ibGjPW4G93QeBxOv2JN5BPOuvsww7U7arEGoq 1QFbk7lqwEHnUbALN5tTIGdyGRlnyxg= X-Google-Smtp-Source: ABdhPJxWTZ5/H6x9x1nURlGcN1s3NA5QJ6dGN5bNgAW7aPmczyiNhSd4mzPg43C0epaDGwiI2Xj2vA== X-Received: by 2002:a17:906:cd06:: with SMTP id oz6mr2526596ejb.25.1609931197807; Wed, 06 Jan 2021 03:06:37 -0800 (PST) Received: from ?IPv6:2003:ea:8f06:5500:e1db:b990:7e09:f1cf? (p200300ea8f065500e1dbb9907e09f1cf.dip0.t-ipconnect.de. [2003:ea:8f06:5500:e1db:b990:7e09:f1cf]) by smtp.googlemail.com with ESMTPSA id m7sm1090983ejr.119.2021.01.06.03.06.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 Jan 2021 03:06:37 -0800 (PST) Subject: [PATCH v2 3/3] r8169: simplify broken parity handling now that PCI core takes care From: Heiner Kallweit To: Bjorn Helgaas , Russell King - ARM Linux , Realtek linux nic maintainers , David Miller , Jakub Kicinski Cc: "linux-pci@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "netdev@vger.kernel.org" References: Message-ID: Date: Wed, 6 Jan 2021 12:06:29 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Meanwhile the PCI core disables parity checking for a device that has broken_parity_status set. Therefore we don't need the quirk any longer to disable parity checking on the first parity error interrupt. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c index c9abc7ccb..024042f37 100644 --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c @@ -4329,20 +4329,6 @@ static void rtl8169_pcierr_interrupt(struct net_device *dev) if (net_ratelimit()) netdev_err(dev, "PCI error (cmd = 0x%04x, status_errs = 0x%04x)\n", pci_cmd, pci_status_errs); - /* - * The recovery sequence below admits a very elaborated explanation: - * - it seems to work; - * - I did not see what else could be done; - * - it makes iop3xx happy. - * - * Feel free to adjust to your needs. - */ - if (pdev->broken_parity_status) - pci_cmd &= ~PCI_COMMAND_PARITY; - else - pci_cmd |= PCI_COMMAND_SERR | PCI_COMMAND_PARITY; - - pci_write_config_word(pdev, PCI_COMMAND, pci_cmd); rtl_schedule_task(tp, RTL_FLAG_TASK_RESET_PENDING); } -- 2.30.0 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=-12.2 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,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 238FBC433E0 for ; Wed, 6 Jan 2021 11:08:42 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C5F8422C9F for ; Wed, 6 Jan 2021 11:08:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C5F8422C9F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:References: To:From:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=vzFlu1Ma/TwxDOzRz3wszeotE2k79RdqfEc3dpWUDsA=; b=F4C7JfrcfVXZQhY151w9Ao2TD H+Lh6XU0l1QzLQMT/TYpZuJ3fwPMhPkaKIRkRH3UnXbaUnwdRliTCRVQQzBt9uDH08CzHoFz5Si+W mWTrnHIJfC+deZ8MPu9bK5K9ynx245nSJUzmR/z+RbNHNT/rurM6VwcxRz0LsW/o1sky2UsGeFPhj 5UBTbObP1aaO2Rmp9D+46quirUopD+eskFWZ6M2ujLDQ4Yy3Cy6MIztXWdUr0glGhtUqFuCMxGAZQ WdzJ7pAru7+amLKbOZRgy3MwYI69n7vk84JeC9LBCnrBhXXxC80BWXvYd/zuAZ2BZ5taDyLY4zDTA FO28GNEwA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kx6eI-0007kD-K4; Wed, 06 Jan 2021 11:06:42 +0000 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kx6eF-0007j1-0N for linux-arm-kernel@lists.infradead.org; Wed, 06 Jan 2021 11:06:39 +0000 Received: by mail-ej1-x636.google.com with SMTP id ga15so4516941ejb.4 for ; Wed, 06 Jan 2021 03:06:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=LMhEikvRUZQaIKyyHYQPd9FehVZ9OCrs1+Guuen9CX0=; b=X4hGYmXPkT7Y/gFWjq2R6usf6mtSbqmYvDxFIVpAsyNrdel18QRQ9NKh0HrcZf2JND KO+7W1KfW/rMUox9uRp4D9cNWB3ft0Sv1vCO9rJaAE8BShbC0aqQncL6yqBAAeGV7sOQ ewL4CpLiRVfd6qelJ0pJlakxNKDC9hSHPvabsHiTeVk3Un7PkdoAqYa3IcPeMHceYJkJ dExoZRtYYyYisFh/1CQTxNUcDVa12tvTPjmRm5pSr3GVzwbMMyntvxAdDLcWKfFsP3nf A7y4eBftUUsxTmgrfKopE8TiCZ0/hEvQOkBu230ZSKKmVUrRglEniQDXLE82Qlu2VEcu +N1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=LMhEikvRUZQaIKyyHYQPd9FehVZ9OCrs1+Guuen9CX0=; b=Pe49dQNCRn5lzd6WzPYKh+dB3hMqI4bpuCXTmYOQews132Fi6tY1CUlJ0ZfH0gMyGZ jhct6HI0Q7auRqHXuocsGHAKgZgn0v2wzwH/lexelEpTWIlBssHVTZbE68mXPWfUNqMX kqTVYvcDCRrZmv+QLj3UKZtEvAYm/iQX+C0dkpgs+LJxqI4YvjSy4L3IKBHDRkIdEVhP uyZjAfFR9eT6FVGdADvAa6lndznYwtqg1vnGhPc3bTKkdc5B0PmB8lbeUH4JRlh5K2ds HEPXz4ARdGCa1aUMGd7lPXYUcz8aQPIJifoVIF2ZrGpY1P3wykZIgIHgAQLmy/w74bEX c98A== X-Gm-Message-State: AOAM530szaG3ZRAzUkJv6q3K8pR/fxYHxae6g0EjamVSR+C04/d4IVzo +7KpcBgpUPiB5/WA8vdGttw= X-Google-Smtp-Source: ABdhPJxWTZ5/H6x9x1nURlGcN1s3NA5QJ6dGN5bNgAW7aPmczyiNhSd4mzPg43C0epaDGwiI2Xj2vA== X-Received: by 2002:a17:906:cd06:: with SMTP id oz6mr2526596ejb.25.1609931197807; Wed, 06 Jan 2021 03:06:37 -0800 (PST) Received: from ?IPv6:2003:ea:8f06:5500:e1db:b990:7e09:f1cf? (p200300ea8f065500e1dbb9907e09f1cf.dip0.t-ipconnect.de. [2003:ea:8f06:5500:e1db:b990:7e09:f1cf]) by smtp.googlemail.com with ESMTPSA id m7sm1090983ejr.119.2021.01.06.03.06.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 Jan 2021 03:06:37 -0800 (PST) Subject: [PATCH v2 3/3] r8169: simplify broken parity handling now that PCI core takes care From: Heiner Kallweit To: Bjorn Helgaas , Russell King - ARM Linux , Realtek linux nic maintainers , David Miller , Jakub Kicinski References: Message-ID: Date: Wed, 6 Jan 2021 12:06:29 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210106_060639_117667_0D851056 X-CRM114-Status: GOOD ( 15.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "linux-pci@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "netdev@vger.kernel.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Meanwhile the PCI core disables parity checking for a device that has broken_parity_status set. Therefore we don't need the quirk any longer to disable parity checking on the first parity error interrupt. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c index c9abc7ccb..024042f37 100644 --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c @@ -4329,20 +4329,6 @@ static void rtl8169_pcierr_interrupt(struct net_device *dev) if (net_ratelimit()) netdev_err(dev, "PCI error (cmd = 0x%04x, status_errs = 0x%04x)\n", pci_cmd, pci_status_errs); - /* - * The recovery sequence below admits a very elaborated explanation: - * - it seems to work; - * - I did not see what else could be done; - * - it makes iop3xx happy. - * - * Feel free to adjust to your needs. - */ - if (pdev->broken_parity_status) - pci_cmd &= ~PCI_COMMAND_PARITY; - else - pci_cmd |= PCI_COMMAND_SERR | PCI_COMMAND_PARITY; - - pci_write_config_word(pdev, PCI_COMMAND, pci_cmd); rtl_schedule_task(tp, RTL_FLAG_TASK_RESET_PENDING); } -- 2.30.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel