• Home
  • Raw
  • Download

Lines Matching refs:cap

181 				   u8 pos, int cap, int *ttl)  in __pci_find_next_cap_ttl()  argument
197 if (id == cap) in __pci_find_next_cap_ttl()
205 u8 pos, int cap) in __pci_find_next_cap() argument
209 return __pci_find_next_cap_ttl(bus, devfn, pos, cap, &ttl); in __pci_find_next_cap()
212 int pci_find_next_capability(struct pci_dev *dev, u8 pos, int cap) in pci_find_next_capability() argument
215 pos + PCI_CAP_LIST_NEXT, cap); in pci_find_next_capability()
258 int pci_find_capability(struct pci_dev *dev, int cap) in pci_find_capability() argument
264 pos = __pci_find_next_cap(dev->bus, dev->devfn, pos, cap); in pci_find_capability()
283 int pci_bus_find_capability(struct pci_bus *bus, unsigned int devfn, int cap) in pci_bus_find_capability() argument
292 pos = __pci_find_next_cap(bus, devfn, pos, cap); in pci_bus_find_capability()
309 int pci_find_next_ext_capability(struct pci_dev *dev, int start, int cap) in pci_find_next_ext_capability() argument
335 if (PCI_EXT_CAP_ID(header) == cap && pos != start) in pci_find_next_ext_capability()
364 int pci_find_ext_capability(struct pci_dev *dev, int cap) in pci_find_ext_capability() argument
366 return pci_find_next_ext_capability(dev, 0, cap); in pci_find_ext_capability()
373 u8 cap, mask; in __pci_find_next_ht_cap() local
383 rc = pci_read_config_byte(dev, pos + 3, &cap); in __pci_find_next_ht_cap()
387 if ((cap & mask) == ht_cap) in __pci_find_next_ht_cap()
986 u16 cap, bool extended) in _pci_find_saved_cap() argument
991 if (tmp->cap.cap_extended == extended && tmp->cap.cap_nr == cap) in _pci_find_saved_cap()
997 struct pci_cap_saved_state *pci_find_saved_cap(struct pci_dev *dev, char cap) in pci_find_saved_cap() argument
999 return _pci_find_saved_cap(dev, cap, false); in pci_find_saved_cap()
1002 struct pci_cap_saved_state *pci_find_saved_ext_cap(struct pci_dev *dev, u16 cap) in pci_find_saved_ext_cap() argument
1004 return _pci_find_saved_cap(dev, cap, true); in pci_find_saved_ext_cap()
1011 u16 *cap; in pci_save_pcie_state() local
1022 cap = (u16 *)&save_state->cap.data[0]; in pci_save_pcie_state()
1023 pcie_capability_read_word(dev, PCI_EXP_DEVCTL, &cap[i++]); in pci_save_pcie_state()
1024 pcie_capability_read_word(dev, PCI_EXP_LNKCTL, &cap[i++]); in pci_save_pcie_state()
1025 pcie_capability_read_word(dev, PCI_EXP_SLTCTL, &cap[i++]); in pci_save_pcie_state()
1026 pcie_capability_read_word(dev, PCI_EXP_RTCTL, &cap[i++]); in pci_save_pcie_state()
1027 pcie_capability_read_word(dev, PCI_EXP_DEVCTL2, &cap[i++]); in pci_save_pcie_state()
1028 pcie_capability_read_word(dev, PCI_EXP_LNKCTL2, &cap[i++]); in pci_save_pcie_state()
1029 pcie_capability_read_word(dev, PCI_EXP_SLTCTL2, &cap[i++]); in pci_save_pcie_state()
1038 u16 *cap; in pci_restore_pcie_state() local
1044 cap = (u16 *)&save_state->cap.data[0]; in pci_restore_pcie_state()
1045 pcie_capability_write_word(dev, PCI_EXP_DEVCTL, cap[i++]); in pci_restore_pcie_state()
1046 pcie_capability_write_word(dev, PCI_EXP_LNKCTL, cap[i++]); in pci_restore_pcie_state()
1047 pcie_capability_write_word(dev, PCI_EXP_SLTCTL, cap[i++]); in pci_restore_pcie_state()
1048 pcie_capability_write_word(dev, PCI_EXP_RTCTL, cap[i++]); in pci_restore_pcie_state()
1049 pcie_capability_write_word(dev, PCI_EXP_DEVCTL2, cap[i++]); in pci_restore_pcie_state()
1050 pcie_capability_write_word(dev, PCI_EXP_LNKCTL2, cap[i++]); in pci_restore_pcie_state()
1051 pcie_capability_write_word(dev, PCI_EXP_SLTCTL2, cap[i++]); in pci_restore_pcie_state()
1071 (u16 *)save_state->cap.data); in pci_save_pcix_state()
1080 u16 *cap; in pci_restore_pcix_state() local
1086 cap = (u16 *)&save_state->cap.data[0]; in pci_restore_pcix_state()
1088 pci_write_config_word(dev, pos + PCI_X_CMD, cap[i++]); in pci_restore_pcix_state()
1194 struct pci_cap_saved_data cap[0]; member
1208 struct pci_cap_saved_data *cap; in pci_store_saved_state() local
1217 size += sizeof(struct pci_cap_saved_data) + tmp->cap.size; in pci_store_saved_state()
1226 cap = state->cap; in pci_store_saved_state()
1228 size_t len = sizeof(struct pci_cap_saved_data) + tmp->cap.size; in pci_store_saved_state()
1229 memcpy(cap, &tmp->cap, len); in pci_store_saved_state()
1230 cap = (struct pci_cap_saved_data *)((u8 *)cap + len); in pci_store_saved_state()
1246 struct pci_cap_saved_data *cap; in pci_load_saved_state() local
1256 cap = state->cap; in pci_load_saved_state()
1257 while (cap->size) { in pci_load_saved_state()
1260 tmp = _pci_find_saved_cap(dev, cap->cap_nr, cap->cap_extended); in pci_load_saved_state()
1261 if (!tmp || tmp->cap.size != cap->size) in pci_load_saved_state()
1264 memcpy(tmp->cap.data, cap->data, tmp->cap.size); in pci_load_saved_state()
1265 cap = (struct pci_cap_saved_data *)((u8 *)cap + in pci_load_saved_state()
1266 sizeof(struct pci_cap_saved_data) + cap->size); in pci_load_saved_state()
2660 static int _pci_add_cap_save_buffer(struct pci_dev *dev, u16 cap, in _pci_add_cap_save_buffer() argument
2667 pos = pci_find_ext_capability(dev, cap); in _pci_add_cap_save_buffer()
2669 pos = pci_find_capability(dev, cap); in _pci_add_cap_save_buffer()
2678 save_state->cap.cap_nr = cap; in _pci_add_cap_save_buffer()
2679 save_state->cap.cap_extended = extended; in _pci_add_cap_save_buffer()
2680 save_state->cap.size = size; in _pci_add_cap_save_buffer()
2686 int pci_add_cap_save_buffer(struct pci_dev *dev, char cap, unsigned int size) in pci_add_cap_save_buffer() argument
2688 return _pci_add_cap_save_buffer(dev, cap, false, size); in pci_add_cap_save_buffer()
2691 int pci_add_ext_cap_save_buffer(struct pci_dev *dev, u16 cap, unsigned int size) in pci_add_ext_cap_save_buffer() argument
2693 return _pci_add_cap_save_buffer(dev, cap, true, size); in pci_add_ext_cap_save_buffer()
2736 u32 cap; in pci_configure_ari() local
2746 pcie_capability_read_dword(bridge, PCI_EXP_DEVCAP2, &cap); in pci_configure_ari()
2747 if (!(cap & PCI_EXP_DEVCAP2_ARI)) in pci_configure_ari()
2778 u16 cap; in pci_std_enable_acs() local
2785 pci_read_config_word(dev, pos + PCI_ACS_CAP, &cap); in pci_std_enable_acs()
2789 ctrl |= (cap & PCI_ACS_SV); in pci_std_enable_acs()
2792 ctrl |= (cap & PCI_ACS_RR); in pci_std_enable_acs()
2795 ctrl |= (cap & PCI_ACS_CR); in pci_std_enable_acs()
2798 ctrl |= (cap & PCI_ACS_UF); in pci_std_enable_acs()
2821 u16 cap, ctrl; in pci_acs_flags_enabled() local
2832 pci_read_config_word(pdev, pos + PCI_ACS_CAP, &cap); in pci_acs_flags_enabled()
2833 acs_flags &= (cap | PCI_ACS_EC); in pci_acs_flags_enabled()
3806 u32 cap; in pcie_flr() local
3808 pcie_capability_read_dword(dev, PCI_EXP_DEVCAP, &cap); in pcie_flr()
3809 if (!(cap & PCI_EXP_DEVCAP_FLR)) in pcie_flr()
3826 u8 cap; in pci_af_flr() local
3832 pci_read_config_byte(dev, pos + PCI_AF_CAP, &cap); in pci_af_flr()
3833 if (!(cap & PCI_AF_CAP_TP) || !(cap & PCI_AF_CAP_FLR)) in pci_af_flr()
4625 int cap; in pcix_get_max_mmrbc() local
4628 cap = pci_find_capability(dev, PCI_CAP_ID_PCIX); in pcix_get_max_mmrbc()
4629 if (!cap) in pcix_get_max_mmrbc()
4632 if (pci_read_config_dword(dev, cap + PCI_X_STATUS, &stat)) in pcix_get_max_mmrbc()
4648 int cap; in pcix_get_mmrbc() local
4651 cap = pci_find_capability(dev, PCI_CAP_ID_PCIX); in pcix_get_mmrbc()
4652 if (!cap) in pcix_get_mmrbc()
4655 if (pci_read_config_word(dev, cap + PCI_X_CMD, &cmd)) in pcix_get_mmrbc()
4673 int cap; in pcix_set_mmrbc() local
4682 cap = pci_find_capability(dev, PCI_CAP_ID_PCIX); in pcix_set_mmrbc()
4683 if (!cap) in pcix_set_mmrbc()
4686 if (pci_read_config_dword(dev, cap + PCI_X_STATUS, &stat)) in pcix_set_mmrbc()
4692 if (pci_read_config_word(dev, cap + PCI_X_CMD, &cmd)) in pcix_set_mmrbc()
4702 if (pci_write_config_word(dev, cap + PCI_X_CMD, cmd)) in pcix_set_mmrbc()