From owner-freebsd-net@freebsd.org Thu Nov 12 09:52:18 2015 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58DE2A2B62D for ; Thu, 12 Nov 2015 09:52:18 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-wm0-x229.google.com (mail-wm0-x229.google.com [IPv6:2a00:1450:400c:c09::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E440A14BC for ; Thu, 12 Nov 2015 09:52:17 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by wmec201 with SMTP id c201so24082224wme.0 for ; Thu, 12 Nov 2015 01:52:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay_co_uk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type; bh=a4hZmFXDjl690zy4OMQmGaM/ed6+F/tN+u0/t65lxqw=; b=LWtYbbXG77UgzqfTXc5awL2q++ODVbiiAzZoYvSVL1soeL8lvanpE3Cy3CBVcALae9 xfgoHcBNGIUToScnQVRSb4KN8PZ1EWWRQBzXPmHLYSQFp818acp0ZxkahAaB9wdCzkwA FMPiMEagfHWvV2z2E56wHu4AtPZck3S3cCInSFwGs/duSgL7TLU5HnSbV/xVz7pUZr85 jFW1LHKW3+5sXKAp5j12bndzA08tUqIyIDn4cftklGZo46OnD7LJUsFtcD37J8cKjE6s x5iERgUzBoOpBqHMGwNY505Yx4gNv27G8kuRZEMtb/uWUVomf7N9AnV+2TX49j0K3at9 QOZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type; bh=a4hZmFXDjl690zy4OMQmGaM/ed6+F/tN+u0/t65lxqw=; b=DefTfrPdMSEpDke9aCOf2Kms+WSuByeXS6qQ2pwNc9AKPeWeUs2QZjr1ai0930nGlI /+v2yU9XJkHZlkomEVA1ho4sguquWcGjw8oH5Sspj4NKH3iyPx6GfzEKZQ9eEALjstRA ZWxv8MFzM8mHlEQtBb2fPGaENzPPnSYo3U70jv8ji0KrqSb4McE3kw7fpU8AyzuiAVbL QrAcjd/8NkVUnV9W7896Zp+VBrwnG7flJh0WY490AoBUQrya2CNZFGe/g2YSGm1ByoM5 CDnoYnak5iV8Sd9X+1iQfPXL3YgBgBUnSgx8DaC19bhhjxT8OeaIahVMDr57wVy777QW Dvwg== X-Gm-Message-State: ALoCoQnksDZzuNSHHsIC6bpHTkP/PdySDIbwledLVXfwjSEc8CUujrKucMvB8GKomJTnfRd4zpSO X-Received: by 10.28.126.215 with SMTP id z206mr23939668wmc.71.1447321935176; Thu, 12 Nov 2015 01:52:15 -0800 (PST) Received: from [10.10.1.58] (liv3d.labs.multiplay.co.uk. [82.69.141.171]) by smtp.gmail.com with ESMTPSA id kd8sm13519808wjc.27.2015.11.12.01.52.13 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 12 Nov 2015 01:52:13 -0800 (PST) Subject: Re: Intel XL710 broken link down detection? To: Ryan Stone References: <564357E0.1050002@freebsd.org> <56436A5F.4020102@multiplay.co.uk> Cc: "freebsd-net@freebsd.org" , Jack F Vogel From: Steven Hartland Message-ID: <56446159.3080405@multiplay.co.uk> Date: Thu, 12 Nov 2015 09:52:25 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Nov 2015 09:52:18 -0000 Yes this works but a better way IMO would be to invert the bits we want: https://people.freebsd.org/~smh/ixl_int_init.patch If there are no objections then I'll commit this later today. Also just fixed the debug sysctls from causing panics when compiled with INVARIANTS see: https://svnweb.freebsd.org/base?view=revision&revision=290708 Regards Steve On 11/11/2015 16:31, Ryan Stone wrote: > On Wed, Nov 11, 2015 at 11:18 AM, Steven Hartland > > wrote: > > Comparing this to the Linux driver which does detect the link down > I've discovered it actually polls the link status by default in > its watchdog. > > Disabling this with "ethtool --set-priv-flags eth1 LinkPolling > off" and the Linux driver also fails to detect link down. > > So this seems like a firmware or even hardware bug where it should > be reporting down events and the Linux driver has been updated to > workaround the problem? > > > No, apparently the Linux devs just didn't read the datasheet closely > enough (and presumably the FreeBSD driver copied the mistake). There > is a mask of interrupt causes that works backwards from how one would > expect; you mask out events that you *don't* want rather than events > that you do want. Both the Linux and FreeBSD drivers pass a mask of > events that they want interrupts for (the only reason why it appears > to work on link up is that the the AN Completed event fires when link > is up, as far as I can tell). Try the following patch: > > https://people.freebsd.org/~rstone/patches/ixl_link_int.diff > >