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 >
Approved by:	re (kib)
This commit is contained in:
Pyun YongHyeon 2009-08-28 18:01:37 +00:00
parent 83b5def49a
commit 180e7945c7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/stable/8/; revision=196619

View File

@ -858,6 +858,7 @@ alc_detach(device_t dev)
sc->alc_intrhand[i] = NULL; sc->alc_intrhand[i] = NULL;
} }
} }
if (sc->alc_res[0] != NULL)
alc_phy_down(sc); alc_phy_down(sc);
bus_release_resources(dev, sc->alc_irq_spec, sc->alc_irq); bus_release_resources(dev, sc->alc_irq_spec, sc->alc_irq);
if ((sc->alc_flags & (ALC_FLAG_MSI | ALC_FLAG_MSIX)) != 0) if ((sc->alc_flags & (ALC_FLAG_MSI | ALC_FLAG_MSIX)) != 0)