From patchwork Thu Dec 18 19:28:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prashant Sreedharan X-Patchwork-Id: 422648 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 2128B140082 for ; Fri, 19 Dec 2014 06:44:23 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751304AbaLRToT (ORCPT ); Thu, 18 Dec 2014 14:44:19 -0500 Received: from mail-gw2-out.broadcom.com ([216.31.210.63]:23443 "EHLO mail-gw2-out.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751087AbaLRToS (ORCPT ); Thu, 18 Dec 2014 14:44:18 -0500 X-IronPort-AV: E=Sophos;i="5.07,602,1413270000"; d="scan'208";a="53413023" Received: from irvexchcas08.broadcom.com (HELO IRVEXCHCAS08.corp.ad.broadcom.com) ([10.9.208.57]) by mail-gw2-out.broadcom.com with ESMTP; 18 Dec 2014 12:15:50 -0800 Received: from IRVEXCHSMTP2.corp.ad.broadcom.com (10.9.207.52) by IRVEXCHCAS08.corp.ad.broadcom.com (10.9.208.57) with Microsoft SMTP Server (TLS) id 14.3.174.1; Thu, 18 Dec 2014 11:44:26 -0800 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP2.corp.ad.broadcom.com (10.9.207.52) with Microsoft SMTP Server id 14.3.174.1; Thu, 18 Dec 2014 11:44:29 -0800 Received: from [10.12.137.52] (dhcp-10-12-137-52.irv.broadcom.com [10.12.137.52]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id 2624840FE5; Thu, 18 Dec 2014 11:43:38 -0800 (PST) Subject: Re: [bisected] tg3 broken in 3.18.0? From: Prashant Sreedharan To: Bjorn Helgaas , Marcelo Ricardo Leitner CC: Michael Chan , Rajat Jain , Nils Holland , David Miller , netdev , "linux-pci@vger.kernel.org" , Rafael Wysocki In-Reply-To: References: <20141213210251.GA12812@teela.fritz.box> <548EF90A.5070607@gmail.com> <1418750141.4248.3.camel@LTIRV-MCHAN1.corp.ad.broadcom.com> <54907300.9050902@gmail.com> <1418759684.4248.12.camel@LTIRV-MCHAN1.corp.ad.broadcom.com> Date: Thu, 18 Dec 2014 11:28:09 -0800 Message-ID: <1418930889.3433.8.camel@prashant> MIME-Version: 1.0 X-Mailer: Evolution 2.32.3 (2.32.3-30.el6) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, 2014-12-18 at 12:15 -0700, Bjorn Helgaas wrote: > On Tue, Dec 16, 2014 at 12:54 PM, Michael Chan wrote: > > On Tue, 2014-12-16 at 15:59 -0200, Marcelo Ricardo Leitner wrote: > >> It's a > >> 02:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5722 > >> Gigabit Ethernet PCI Express > >> over here > >> > >> I put a WARN_ON(1) after those printks, and this is what I got: > >> > >> [ 1.550640] pci 0000:02:00.0: 1st 1 1 > >> [ 1.550643] pci 0000:02:00.0: crs_timeout: 0 > >> [ 1.550645] ------------[ cut here ]------------ > >> [ 1.550651] WARNING: CPU: 6 PID: 364 at drivers/pci/probe.c:1445 pci_bus_read_dev_vendor_id+0x1d4/0x1e0() > >> [ 1.550652] Modules linked in: i915(+) raid0 i2c_algo_bit drm_kms_helper drm e1000e(+) tg3(+) ptp pps_core video > >> [ 1.550660] CPU: 6 PID: 364 Comm: systemd-udevd Not tainted 3.18.0-rc6+ #8 > >> [ 1.550661] Hardware name: Dell Inc. OptiPlex 9010/03K80F, BIOS A15 08/12/2013 > >> [ 1.550662] 0000000000000000 000000004de2d8dc ffff8807eabdf948 ffffffff8173db46 > >> [ 1.550665] 0000000000000000 0000000000000000 ffff8807eabdf988 ffffffff81094d41 > >> [ 1.550667] ffff8807eabdf968 ffff8807f1e27000 0000000000000000 0000000000000000 > >> [ 1.550669] Call Trace: > >> [ 1.550675] [] dump_stack+0x46/0x58 > >> [ 1.550679] [] warn_slowpath_common+0x81/0xa0 > >> [ 1.550681] [] warn_slowpath_null+0x1a/0x20 > >> [ 1.550683] [] pci_bus_read_dev_vendor_id+0x1d4/0x1e0 > >> [ 1.550687] [] pci_device_is_present+0x2e/0x50 > >> [ 1.550693] [] tg3_chip_reset+0x2f/0x940 [tg3] > >> [ 1.550697] [] tg3_halt+0x3f/0x1e0 [tg3] > >> [ 1.550701] [] tg3_init_one+0xb83/0x1a40 [tg3] > > > > So does it work if you use a non-zero crs_timeout? The driver has > > called tg3_halt() which may affect configuration read responses. I need > > to check with the hardware team to see if the 5722 will return CRS in > > this scenario. > > Any updates from the hardware team? > > This is a pretty serious regression, but as far as I can tell, it is > not a PCI bug. The device should respond to a config read of vendor > ID. If the driver does something that make the read return CRS > status, I think the driver is responsible for doing whatever delay or > other fixup is required. > > I'm inclined to reassign this bug to the tg3 driver unless you think > the PCI core is doing something wrong here. > > Bjorn We were not able to reproduce this issue, could you please check what is the value of reg 0x70, before the pci_device_is_present call is made ? if bit 15 is set config access will be retried. --- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c @@ -9025,6 +9025,7 @@ static int tg3_chip_reset(struct tg3 *tp) void (*write_op)(struct tg3 *, u32, u32); int i, err; + printk(KERN_ERR "config state: %x\n", tr32(TG3PCI_PCISTATE)); if (!pci_device_is_present(tp->pdev)) return -ENODEV;