Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Sep 2009 17:20:11 +0000 (UTC)
From:      Pyun YongHyeon <yongari@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r197097 - in stable/7/sys: . contrib/pf dev/alc
Message-ID:  <200909111720.n8BHKBCn058476@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yongari
Date: Fri Sep 11 17:20:11 2009
New Revision: 197097
URL: http://svn.freebsd.org/changeset/base/197097

Log:
  MFC r196517:
    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 >

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/alc/if_alc.c

Modified: stable/7/sys/dev/alc/if_alc.c
==============================================================================
--- stable/7/sys/dev/alc/if_alc.c	Fri Sep 11 17:18:08 2009	(r197096)
+++ stable/7/sys/dev/alc/if_alc.c	Fri Sep 11 17:20:11 2009	(r197097)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909111720.n8BHKBCn058476>