From owner-freebsd-net@freebsd.org Wed Nov 11 16:31:42 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 C93EDA2C278 for ; Wed, 11 Nov 2015 16:31:42 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-ig0-x22a.google.com (mail-ig0-x22a.google.com [IPv6:2607:f8b0:4001:c05::22a]) (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 92091110E; Wed, 11 Nov 2015 16:31:42 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: by igbxm8 with SMTP id xm8so24417120igb.1; Wed, 11 Nov 2015 08:31:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=9oxTzz8NvEyEdnrOxnReaOxgKlhw5LdPAOFFU1/pHtE=; b=sNcpVtWJS3K0H+9U2SekSW5ugYCjLcCZkRSZ1C0bjEuZmHnv3Djg7pHRwzXZwQCaY8 BY2aMLTOY1zcVNorbVLJGi09MhcrqwiTMcXJAy7JGMPeqhhd5DjoHGXysF+meEF2mKzI SDFDZSRFNPxwe6zicG5ctqlMnKk5KkUZdxItrGKazjOCQ2yP9UPaePSXb5yaSlP/O/dh 0LCoIxO7+eA8nSozBJgOs+kQYrA7I5UlzFp/aWSh+d8MM0zygUSa4HZ+6a+Nlg0WPKpz aVclCzcYLIEubC2h6/sEyEYky4VxhJHwbqWkhXvO+7BMZOBs23FNIiuBVG+geypNSXlp w5Dg== MIME-Version: 1.0 X-Received: by 10.50.103.99 with SMTP id fv3mr33224579igb.69.1447259501987; Wed, 11 Nov 2015 08:31:41 -0800 (PST) Received: by 10.107.170.102 with HTTP; Wed, 11 Nov 2015 08:31:41 -0800 (PST) In-Reply-To: <56436A5F.4020102@multiplay.co.uk> References: <564357E0.1050002@freebsd.org> <56436A5F.4020102@multiplay.co.uk> Date: Wed, 11 Nov 2015 11:31:41 -0500 Message-ID: Subject: Re: Intel XL710 broken link down detection? From: Ryan Stone To: Steven Hartland Cc: "freebsd-net@freebsd.org" , Jack F Vogel Content-Type: text/plain; charset=UTF-8 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: Wed, 11 Nov 2015 16:31:43 -0000 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