mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
The PCI bus code saves/restores these config registers now.
This commit is contained in:
parent
4d3c2a319c
commit
95af165d7f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=147029
@ -950,13 +950,6 @@ fxp_suspend(device_t dev)
|
||||
|
||||
fxp_stop(sc);
|
||||
|
||||
for (i = 0; i < 5; i++)
|
||||
sc->saved_maps[i] = pci_read_config(dev, PCIR_BAR(i), 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;
|
||||
|
||||
FXP_UNLOCK(sc);
|
||||
@ -980,14 +973,6 @@ fxp_resume(device_t dev)
|
||||
FXP_LOCK(sc);
|
||||
s = splimp();
|
||||
|
||||
/* better way to do this? */
|
||||
for (i = 0; i < 5; i++)
|
||||
pci_write_config(dev, PCIR_BAR(i), 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_command = pci_read_config(dev, PCIR_COMMAND, 2);
|
||||
pci_command |= (PCIM_CMD_MEMEN|PCIM_CMD_BUSMASTEREN);
|
||||
|
@ -192,11 +192,6 @@ struct fxp_softc {
|
||||
int cu_resume_bug;
|
||||
int revision;
|
||||
int flags;
|
||||
uint32_t saved_maps[5]; /* pci data */
|
||||
uint32_t saved_biosaddr;
|
||||
uint8_t saved_intline;
|
||||
uint8_t saved_cachelnsz;
|
||||
uint8_t saved_lattimer;
|
||||
uint8_t rfa_size;
|
||||
uint32_t tx_cmd;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user