Lines Matching refs:SaveArea

884 int pci_save_config_regs(struct pci_dev* PciDev,struct pci_config_reg_save_area* SaveArea)  in pci_save_config_regs()  argument
886 memset(SaveArea,0x00,sizeof(struct pci_config_reg_save_area) ); in pci_save_config_regs()
887 SaveArea->PciDev = PciDev; in pci_save_config_regs()
888 SaveArea->RCode = 0; in pci_save_config_regs()
889 SaveArea->Register = 0; in pci_save_config_regs()
893 while (SaveArea->Register < REG_SAVE_SIZE && SaveArea->RCode == 0) { in pci_save_config_regs()
894SaveArea->RCode = pci_read_config_byte(PciDev, SaveArea->Register, &SaveArea->Regs[SaveArea->Regis… in pci_save_config_regs()
895 ++SaveArea->Register; in pci_save_config_regs()
897 if (SaveArea->RCode != 0) { /* Ouch */ in pci_save_config_regs()
898 SaveArea->Flags = 0x80; in pci_save_config_regs()
899 printk("PCI: pci_restore_save_regs failed! %p\n 0x%04X",PciDev,SaveArea->RCode); in pci_save_config_regs()
900 PCIFR( "pci_restore_save_regs failed! %p\n 0x%04X",PciDev,SaveArea->RCode); in pci_save_config_regs()
903 SaveArea->Flags = 0x01; in pci_save_config_regs()
905 return SaveArea->RCode; in pci_save_config_regs()
912 int pci_restore_config_regs(struct pci_dev* PciDev,struct pci_config_reg_save_area* SaveArea) in pci_restore_config_regs() argument
914 if (SaveArea->PciDev != PciDev || SaveArea->Flags == 0x80 || SaveArea->RCode != 0) { in pci_restore_config_regs()
924 SaveArea->Register = 0; in pci_restore_config_regs()
925 while(SaveArea->Register < REG_SAVE_SIZE && SaveArea->RCode == 0) { in pci_restore_config_regs()
926SaveArea->RCode = pci_write_config_byte(PciDev,SaveArea->Register,SaveArea->Regs[SaveArea->Registe… in pci_restore_config_regs()
927 ++SaveArea->Register; in pci_restore_config_regs()
928 if ( SaveArea->Register == PCI_COMMAND) SaveArea->Register = PCI_CACHE_LINE_SIZE; in pci_restore_config_regs()
929 else if (SaveArea->Register == PCI_HEADER_TYPE) SaveArea->Register = PCI_BASE_ADDRESS_0; in pci_restore_config_regs()
931 if (SaveArea->RCode != 0) { in pci_restore_config_regs()
932 printk("PCI: pci_restore_config_regs failed! %p\n 0x%04X",PciDev,SaveArea->RCode); in pci_restore_config_regs()
933 PCIFR( "pci_restore_config_regs failed! %p\n 0x%04X",PciDev,SaveArea->RCode); in pci_restore_config_regs()
935 return SaveArea->RCode; in pci_restore_config_regs()