Received: by 10.192.165.148 with SMTP id m20csp4957994imm; Tue, 24 Apr 2018 11:10:39 -0700 (PDT) X-Google-Smtp-Source: AIpwx49hc2lVNLAnK7RtPNH/uriI7KM3V+YFonWMqZP9PaStXng3wCDXbqoAeuSFg0wvaOrk1XXo X-Received: by 2002:a17:902:1347:: with SMTP id r7-v6mr21221474ple.62.1524593439445; Tue, 24 Apr 2018 11:10:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524593439; cv=none; d=google.com; s=arc-20160816; b=iTVWqiGTLNew6QKde8+Fxclv43+NJTe6qolQetUVENqsrNNPJLlYLVGX2uSPUErPmo IN1bDCF3afEGYn0xFHm233HPdYGlntp1rrboHg6ft8f7sALwOc1ZsB3eKrmgGbYYcqaz S8W3Ffryzm4L+mRXJnWTHgvQv2LM1M/hz+EjfcME+sCTqW8UzDOxHzvsGFwtI8DPW+I9 Jq92snl/pdVdjk6pZXRgkzcebfjGmpI+pzvIkegUM8/X5BbZ1qq4xcoi59aMv1/1umqg XLjg2Zuh7hVZTj4WK4erKoL/fkKp0bl9+L6+8DfbNDOgYzfVsAsD3KvoOhmUFAUdnWwk JDWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=vrHhNuYmdxhHRwKvflkU56UBxL52OAFbFG1tRzwMh4M=; b=KDgYij0Oj8wWYwUutoqfyPO8g3DF4cpoCvjOIHBiJGr3P7R3a9DlEdvx0PeQ8ay1fH Le9WjrAct0v2ggJ42sQi5d59a2UXeVXAXQivMjjhFTD1UXGVU2ftRcHWR440OH4zvv/x Y+l5GzFemid73zkRfRcrW+SCvSCAVaeU7t/dAuVUJAC5QPT5wT+Ew9HaJbJgPjx1G7ha v/zkWxTdeLm5ilmze8ekzvYmWl36fUkIhvwO6OXb50zuiUkHoJH3pv7nZhq8FqpOuCPT dYqX0zz5lK7R3tRhQ6Cf0ezCzoF05d99BtN3SWlwSVgHj+kgTno0HRTj8PKNrBb/bHcS cS5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LfSk7gqR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t11si11759247pgv.123.2018.04.24.11.10.24; Tue, 24 Apr 2018 11:10:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LfSk7gqR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751698AbeDXSJF (ORCPT + 99 others); Tue, 24 Apr 2018 14:09:05 -0400 Received: from mail-ot0-f172.google.com ([74.125.82.172]:38337 "EHLO mail-ot0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750842AbeDXSJD (ORCPT ); Tue, 24 Apr 2018 14:09:03 -0400 Received: by mail-ot0-f172.google.com with SMTP id j27-v6so22178036ota.5 for ; Tue, 24 Apr 2018 11:09:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=vrHhNuYmdxhHRwKvflkU56UBxL52OAFbFG1tRzwMh4M=; b=LfSk7gqRyiIAs94gUfUvxQEgdiIJpfsqs2VU1oJvq4hqpamH3CWKFqAarWSeG5NJmu Tji0Cne3s3Y4dNknDod/Hdhe5V05+wzpXmEWdzvQXZnhWErO8Gb6pePgKl6F9n6JofR/ Yulnm6IRidTok3c4HFgVrIkJc/9BsPZ0BdUlLZWYGWIbput3h8liFW2YLKDrbFrZs/8a cRZyVz8tceuqF5fx17ZlVK5tnIEsv1fj2RP++zYahE6wgBPAwi1cCu+dfHaF4F5W8Qe0 1MDVOXHEILCVEtLzVOEX559cFUwZYOjcSgtNw8wzECD0mSVvDwMhymCuPG3h4dXQCNMm pzhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=vrHhNuYmdxhHRwKvflkU56UBxL52OAFbFG1tRzwMh4M=; b=tLOpq0gh5n9gBkurJRXFJkpGYmIt6vEWGD37Sukyj15hRnwRGPDRfD+2VDUBEOZzGf RA4nQ9/7iym52OlICvAMvPa8ssoeGaCAVpo1fiyZg6wjE8jtT3r474yWIBL97KDvYzEh 2QTnq3oN7Yyhvx0OV/xAFf4Cs+gIO3uresQGCSFVFjfGTfu0fwTgo8lRuBNOuF567itA nTyBOuXoxx//l3Th6I6B22qQVQwkEr1m+OTTkqT21W/Pkp0Tn8/Bedn5bRB6Tl1KwRiM 5hr2GEqXfk/xDV9KrOzlW9D8yZ1H2wguOMWSnjmVYde0zxyj0OP7saMHpl9aaLrSHcmA +HRg== X-Gm-Message-State: ALQs6tAMGJULODdnjjllDnLT/lXDLu5IeUutK44sojPNDF6LPgvLSNmx RZLti04Z+2ze/s11IzHXKTry9ZgSQRs8t8SKp1c= X-Received: by 2002:a9d:282b:: with SMTP id m40-v6mr16097516otb.203.1524593342714; Tue, 24 Apr 2018 11:09:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.201.10.209 with HTTP; Tue, 24 Apr 2018 11:09:02 -0700 (PDT) In-Reply-To: <87h8o0ocul.fsf@gmail.com> References: <87h8o0ocul.fsf@gmail.com> From: Alexander Duyck Date: Tue, 24 Apr 2018 11:09:02 -0700 Message-ID: Subject: Re: [BUG] igb: reconnecting of cable not always detected To: Holger Schurig Cc: Jeff Kirsher , intel-wired-lan , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 24, 2018 at 8:14 AM, Holger Schurig wrote: > Hi all, > > I'm on kernel 4.16.4 and have an issue with eth0, driver is igb. When I > remove the ethernet cable, this is always detected: > > [ 2.772360] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.0-k > [ 2.772363] igb: Copyright (c) 2007-2014 Intel Corporation. > [ 3.023707] igb 0000:02:00.0: added PHC on eth0 > [ 3.023710] igb 0000:02:00.0: Intel(R) Gigabit Ethernet Network Connection > [ 3.023713] igb 0000:02:00.0: eth0: (PCIe:2.5Gb/s:Width x1) 00:13:95:1a:54:33 > [ 3.023758] igb 0000:02:00.0: eth0: PBA No: 000300-000 > [ 3.023762] igb 0000:02:00.0: Using MSI-X interrupts. 4 rx queue(s), 4 tx queue(s) > [ 7.984921] igb 0000:02:00.0 eth0: igb: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX > [ 11.184593] igb 0000:02:00.0 eth0: igb: eth0 NIC Link is Down > > Sometimes, plugging the cable back in is detected ... > > [ 43.736922] igb 0000:02:00.0 eth0: igb: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX > > ... but sometimes this is *NOT* detected. I can put the cable in and > even after two minutes nothing has been detected. > > But when I run "rmmod igb" followed by "modpobe igb", the link is > detected again: > > [ 100.528609] igb 0000:02:00.0 eth0: igb: eth0 NIC Link is Down > [ 2336.583244] igb 0000:02:00.0: removed PHC on eth0 > [ 2339.693521] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.0-k > [ 2339.693524] igb: Copyright (c) 2007-2014 Intel Corporation. > [ 2339.990553] pps pps0: new PPS source ptp0 > [ 2339.990561] igb 0000:02:00.0: added PHC on eth0 > [ 2339.990565] igb 0000:02:00.0: Intel(R) Gigabit Ethernet Network Connection > [ 2339.990569] igb 0000:02:00.0: eth0: (PCIe:2.5Gb/s:Width x1) 00:13:95:1a:54:33 > [ 2339.990611] igb 0000:02:00.0: eth0: PBA No: 000300-000 > [ 2339.990615] igb 0000:02:00.0: Using MSI-X interrupts. 4 rx queue(s), 4 tx queue(s) > [ 2343.001114] igb 0000:02:00.0 eth0: igb: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX > > (In above dmesg snippet the ethernet cable was the whole time inserted). > > > Any tips on how I can debug this further? > > PS: I already tried a different switch and also a direct connection from > device-to-device, without a switch. Sounds like the link is failing to re-establish. You might double check a few things. One is to verify if the link partner is recognizing the link as coming up or not. That would help to tell us if this is a problem of the driver detecting the link, or if the link itself is not being re-established. Another thing you could look at doing is running "ethtool -r eth0" after plugging the cable in to see if that re-establishes the link or not. It should be easier anyway than having to unload and reload the driver. If you could also provide an "lspci -vvv" and "ethtool -i" for the device it would help us in the debugging process as it would provide us with information on what NIC it is you are using and what firmware is in use on it. Thanks. - Alex