The PCI bus code saves/restores these config registers now.
This commit is contained in:
parent
eb7b540c92
commit
05e710de71
@ -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);
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user