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
This commit is contained in:
Pyun YongHyeon 2009-08-24 20:37:15 +00:00
parent 5fa06abe89
commit e4d5e24821
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=196517

View File

@ -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);