From owner-freebsd-current@freebsd.org Mon Oct 24 05:14:05 2016 Return-Path: Delivered-To: freebsd-current@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 E3B35C1F5FF for ; Mon, 24 Oct 2016 05:14:05 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-pf0-x236.google.com (mail-pf0-x236.google.com [IPv6:2607:f8b0:400e:c00::236]) (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 ADAE1DAF for ; Mon, 24 Oct 2016 05:14:05 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: by mail-pf0-x236.google.com with SMTP id 128so91659275pfz.0 for ; Sun, 23 Oct 2016 22:14:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-disposition:in-reply-to:user-agent; bh=vpA63WCk38xgLNFL7+hsmGBjjHeYsNkGYr35H9iq6uI=; b=jVbykxmEEdtkm+WlPBRWzaN0BGOwrJjM67bfM/calUA1pxhmtGDzg3Dd/Dw6zv3ZEl SHc+1/FbgqUHyvL2LiVUVvrqjCaqbyZzSMbzbBZZMrwl3gnsmP4LJafbFtAoeGjMOWZA Sd3rtsEzpdtwWBJnHeNPZ6hb7geQqXsU/i6wohuYXp4UDdSiT0HrCJhHX1QUf5T5ZMKu hsSDS06wkW1+XgeJx4cROIpfNhItJNfQWGgbxVSFc/ovQ/L5MWpZQmwf/Lu0B2qw8A+j yjh4Nuk7fFOFmxiJYSlHXNlzAxwdYdunEE0xB6LfjK/qv450eQc1kcr6CB3+XxTaZO9i u4tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:to:cc:subject:message-id:reply-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=vpA63WCk38xgLNFL7+hsmGBjjHeYsNkGYr35H9iq6uI=; b=CRByclK0VW+yJgNEVbt5wo/feeWDE8ImJO6adR63ziKZtoq2CIMzl15nK4wuQxp11N fkFcATmNQyVguA0/+XlpEb/xmBLHXmcGo7fQWin/Jo3+wVsDcOT0SqRUNNMdcvKW1Hk0 C17VVDOK0CEsne8y2fTI2YBqxB+o/Lt89AC8RWsTDjkN0JIB7Krlm0oZzFwJwdyTdS9q bYvsXfm0dp2pjGx9WveHhWd+eF0ZOLHxIAsRRGJ4zAEAEPeCZNmket+XNJdDY0MbWqCD StpgDSV2yiA0Ud81OVEfZ6EykjRAe64USDLoeJbMamOPOc4+99ChftkYZh+CTeHZgGtn k+RQ== X-Gm-Message-State: ABUngvdK4fDygjQAleF+Ub0ZhJ7ZiAY1eRg2JThANK91PWFpyMGAVqDlbPr5ai/4hu08gQ== X-Received: by 10.99.163.1 with SMTP id s1mr21041466pge.126.1477286045283; Sun, 23 Oct 2016 22:14:05 -0700 (PDT) Received: from localhost ([106.247.248.2]) by smtp.gmail.com with ESMTPSA id r194sm21248178pfr.94.2016.10.23.22.14.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 23 Oct 2016 22:14:04 -0700 (PDT) From: YongHyeon PYUN X-Google-Original-From: "YongHyeon PYUN" Received: by localhost (sSMTP sendmail emulation); Mon, 24 Oct 2016 14:14:00 +0900 Date: Mon, 24 Oct 2016 14:14:00 +0900 To: "Hartmann, O." Cc: FreeBSD CURRENT Subject: Re: CURRENT: re(4) crashing system Message-ID: <20161024051359.GA1185@michelle.fasterthan.co.kr> Reply-To: pyunyh@gmail.com References: <20161023132538.6bf55fb2@hermann> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161023132538.6bf55fb2@hermann> User-Agent: Mutt/1.4.2.3i X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2016 05:14:06 -0000 On Sun, Oct 23, 2016 at 01:25:38PM +0200, Hartmann, O. wrote: > I tried to report earlier here that CURRENT does have some serious > problems right now and one of those problems seems to be triggered by > the recent re(4) driver. The problem is also present in recen 11-STABLE! > > Below, you'll find pciconf-output reagrding the device on a Lenovo E540 > Laptop I can test on and trigger the problem. > > The phenomenon is that this NIC does not negotiate 1000baseTX, it is > always falling back to 100baseTX although the device claims to be a 1 > GBit capable device. > > When I try to put the device manually into 1000basTX mode via > > ifconfig re0 media 1000baseTX mediaopt full-duplex (with re(4) driver) > > it is possible to crash the system. The system also crashes when > plugging/unplugging the LAN cord - I guess the renegotiation is > triggering this crash immediately. > > I tried with several switches and routers capable of 1 GBit and it > seems to be independent from the network hardware in use. > > I tried to capture a backtrace when the kernel crashes, but I do not > know how to save the the kernel debugger output. Although I configured > according the handbook debugging, there is no coredump at all. > > Advice is appreciated - if anybody is interesetd in solving this. > There were several instability reports on re(4). I vaguely guess it would be related with some missing initializations for certain controllers. Unfortunately, there is no publicly available datasheet for those controllers and it's not likely to get access to it in near future. It seems vendor's FreeBSD driver accesses lots of magic registers as well as loading DSP fixups. I have no idea what it wants to do and re(4) used to heavily rely on power-on default register values. Engineering samples I have do not show instabilities so it wouldn't be easy to identify the issue. Probably the first step to address the issue would be identifying those chips and narrowing down the scope of guessing. Would you show me the dmesg output(re(4) and regphy(4) only)? pciconf(8) output is useless here since RealTek uses the same PCI id for PCIe variants. BTW, I was told that the vendor's FreeBSD driver seems to work fine for normal usage pattern. The vendor's driver triggered an instant panic and lacked H/W offloading features in the past. It might have changed though.