refactoring Pci code, to not repeat code in pci devices like fcms, eth