Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/pci/pci_pci.c
Show First 20 Lines • Show All 1,234 Lines • ▼ Show 20 Lines | pcib_pcie_hotplug_task(void *context, int pending) | ||||
} | } | ||||
mtx_unlock(&Giant); | mtx_unlock(&Giant); | ||||
} | } | ||||
static void | static void | ||||
pcib_pcie_ab_timeout(void *arg) | pcib_pcie_ab_timeout(void *arg) | ||||
{ | { | ||||
struct pcib_softc *sc; | struct pcib_softc *sc; | ||||
device_t dev; | |||||
sc = arg; | sc = arg; | ||||
dev = sc->dev; | |||||
mtx_assert(&Giant, MA_OWNED); | mtx_assert(&Giant, MA_OWNED); | ||||
if (sc->flags & PCIB_DETACH_PENDING) { | if (sc->flags & PCIB_DETACH_PENDING) { | ||||
sc->flags |= PCIB_DETACHING; | sc->flags |= PCIB_DETACHING; | ||||
sc->flags &= ~PCIB_DETACH_PENDING; | sc->flags &= ~PCIB_DETACH_PENDING; | ||||
pcib_pcie_hotplug_update(sc, 0, 0, true); | pcib_pcie_hotplug_update(sc, 0, 0, true); | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 223 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
/* | /* | ||||
* Restore previous bridge configuration. | * Restore previous bridge configuration. | ||||
*/ | */ | ||||
static void | static void | ||||
pcib_cfg_restore(struct pcib_softc *sc) | pcib_cfg_restore(struct pcib_softc *sc) | ||||
{ | { | ||||
device_t dev; | |||||
#ifndef NEW_PCIB | #ifndef NEW_PCIB | ||||
uint16_t command; | uint16_t command; | ||||
#endif | #endif | ||||
dev = sc->dev; | |||||
#ifdef NEW_PCIB | #ifdef NEW_PCIB | ||||
pcib_write_windows(sc, WIN_IO | WIN_MEM | WIN_PMEM); | pcib_write_windows(sc, WIN_IO | WIN_MEM | WIN_PMEM); | ||||
#else | #else | ||||
command = pci_read_config(dev, PCIR_COMMAND, 2); | command = pci_read_config(sc->dev, PCIR_COMMAND, 2); | ||||
if (command & PCIM_CMD_PORTEN) | if (command & PCIM_CMD_PORTEN) | ||||
pcib_set_io_decode(sc); | pcib_set_io_decode(sc); | ||||
if (command & PCIM_CMD_MEMEN) | if (command & PCIM_CMD_MEMEN) | ||||
pcib_set_mem_decode(sc); | pcib_set_mem_decode(sc); | ||||
#endif | #endif | ||||
} | } | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 1,382 Lines • Show Last 20 Lines |