From owner-svn-src-head@FreeBSD.ORG Mon Aug 24 20:37:15 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF9EC1065695; Mon, 24 Aug 2009 20:37:15 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF2BE8FC1F; Mon, 24 Aug 2009 20:37:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7OKbFpr005734; Mon, 24 Aug 2009 20:37:15 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7OKbFuW005732; Mon, 24 Aug 2009 20:37:15 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200908242037.n7OKbFuW005732@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 24 Aug 2009 20:37:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196517 - head/sys/dev/alc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Aug 2009 20:37:16 -0000 Author: yongari Date: Mon Aug 24 20:37:15 2009 New Revision: 196517 URL: http://svn.freebsd.org/changeset/base/196517 Log: Don't try to power down PHY when alc(4) failed to map the device. This fixes system crash when mapping alc(4) device failed in device attach. Reported by: Jim < stapleton.41 <> gmail DOT com > MFC after: 3 days Modified: head/sys/dev/alc/if_alc.c Modified: head/sys/dev/alc/if_alc.c ============================================================================== --- head/sys/dev/alc/if_alc.c Mon Aug 24 18:58:13 2009 (r196516) +++ head/sys/dev/alc/if_alc.c Mon Aug 24 20:37:15 2009 (r196517) @@ -858,7 +858,8 @@ alc_detach(device_t dev) sc->alc_intrhand[i] = NULL; } } - alc_phy_down(sc); + if (sc->alc_res[0] != NULL) + alc_phy_down(sc); bus_release_resources(dev, sc->alc_irq_spec, sc->alc_irq); if ((sc->alc_flags & (ALC_FLAG_MSI | ALC_FLAG_MSIX)) != 0) pci_release_msi(dev);