The PCI bus code saves/restores these config registers now.

This commit is contained in:
imp 2005-06-05 22:45:19 +00:00
parent eb7b540c92
commit 05e710de71
2 changed files with 0 additions and 21 deletions

View File

@ -2380,13 +2380,6 @@ vge_suspend(dev)
vge_stop(sc);
for (i = 0; i < 5; i++)
sc->saved_maps[i] = pci_read_config(dev, PCIR_MAPS + i * 4, 4);
sc->saved_biosaddr = pci_read_config(dev, PCIR_BIOS, 4);
sc->saved_intline = pci_read_config(dev, PCIR_INTLINE, 1);
sc->saved_cachelnsz = pci_read_config(dev, PCIR_CACHELNSZ, 1);
sc->saved_lattimer = pci_read_config(dev, PCIR_LATTIMER, 1);
sc->suspended = 1;
return (0);
@ -2408,14 +2401,6 @@ vge_resume(dev)
sc = device_get_softc(dev);
ifp = &sc->arpcom.ac_if;
/* better way to do this? */
for (i = 0; i < 5; i++)
pci_write_config(dev, PCIR_MAPS + i * 4, sc->saved_maps[i], 4);
pci_write_config(dev, PCIR_BIOS, sc->saved_biosaddr, 4);
pci_write_config(dev, PCIR_INTLINE, sc->saved_intline, 1);
pci_write_config(dev, PCIR_CACHELNSZ, sc->saved_cachelnsz, 1);
pci_write_config(dev, PCIR_LATTIMER, sc->saved_lattimer, 1);
/* reenable busmastering */
pci_enable_busmaster(dev);
pci_enable_io(dev, SYS_RES_MEMORY);

View File

@ -125,12 +125,6 @@ struct vge_softc {
#ifdef DEVICE_POLLING
int rxcycles;
#endif
u_int32_t saved_maps[5]; /* pci data */
u_int32_t saved_biosaddr;
u_int8_t saved_intline;
u_int8_t saved_cachelnsz;
u_int8_t saved_lattimer;
};
#define VGE_LOCK(_sc) mtx_lock(&(_sc)->vge_mtx)