• Home
  • Raw
  • Download

Lines Matching refs:cap

429 				  u8 pos, int cap, int *ttl)  in __pci_find_next_cap_ttl()  argument
445 if (id == cap) in __pci_find_next_cap_ttl()
453 u8 pos, int cap) in __pci_find_next_cap() argument
457 return __pci_find_next_cap_ttl(bus, devfn, pos, cap, &ttl); in __pci_find_next_cap()
460 u8 pci_find_next_capability(struct pci_dev *dev, u8 pos, int cap) in pci_find_next_capability() argument
463 pos + PCI_CAP_LIST_NEXT, cap); in pci_find_next_capability()
506 u8 pci_find_capability(struct pci_dev *dev, int cap) in pci_find_capability() argument
512 pos = __pci_find_next_cap(dev->bus, dev->devfn, pos, cap); in pci_find_capability()
531 u8 pci_bus_find_capability(struct pci_bus *bus, unsigned int devfn, int cap) in pci_bus_find_capability() argument
539 pos = __pci_find_next_cap(bus, devfn, pos, cap); in pci_bus_find_capability()
556 u16 pci_find_next_ext_capability(struct pci_dev *dev, u16 start, int cap) in pci_find_next_ext_capability() argument
582 if (PCI_EXT_CAP_ID(header) == cap && pos != start) in pci_find_next_ext_capability()
611 u16 pci_find_ext_capability(struct pci_dev *dev, int cap) in pci_find_ext_capability() argument
613 return pci_find_next_ext_capability(dev, 0, cap); in pci_find_ext_capability()
654 u8 cap, mask; in __pci_find_next_ht_cap() local
664 rc = pci_read_config_byte(dev, pos + 3, &cap); in __pci_find_next_ht_cap()
668 if ((cap & mask) == ht_cap) in __pci_find_next_ht_cap()
731 u16 pci_find_vsec_capability(struct pci_dev *dev, u16 vendor, int cap) in pci_find_vsec_capability() argument
746 if (PCI_VNDR_HEADER_ID(header) == cap) in pci_find_vsec_capability()
956 u16 cap; in pci_std_enable_acs() local
963 pci_read_config_word(dev, pos + PCI_ACS_CAP, &cap); in pci_std_enable_acs()
967 ctrl |= (cap & PCI_ACS_SV); in pci_std_enable_acs()
970 ctrl |= (cap & PCI_ACS_RR); in pci_std_enable_acs()
973 ctrl |= (cap & PCI_ACS_CR); in pci_std_enable_acs()
976 ctrl |= (cap & PCI_ACS_UF); in pci_std_enable_acs()
980 ctrl |= (cap & PCI_ACS_TB); in pci_std_enable_acs()
1549 u16 cap, bool extended) in _pci_find_saved_cap() argument
1554 if (tmp->cap.cap_extended == extended && tmp->cap.cap_nr == cap) in _pci_find_saved_cap()
1560 struct pci_cap_saved_state *pci_find_saved_cap(struct pci_dev *dev, char cap) in pci_find_saved_cap() argument
1562 return _pci_find_saved_cap(dev, cap, false); in pci_find_saved_cap()
1565 struct pci_cap_saved_state *pci_find_saved_ext_cap(struct pci_dev *dev, u16 cap) in pci_find_saved_ext_cap() argument
1567 return _pci_find_saved_cap(dev, cap, true); in pci_find_saved_ext_cap()
1574 u16 *cap; in pci_save_pcie_state() local
1585 cap = (u16 *)&save_state->cap.data[0]; in pci_save_pcie_state()
1586 pcie_capability_read_word(dev, PCI_EXP_DEVCTL, &cap[i++]); in pci_save_pcie_state()
1587 pcie_capability_read_word(dev, PCI_EXP_LNKCTL, &cap[i++]); in pci_save_pcie_state()
1588 pcie_capability_read_word(dev, PCI_EXP_SLTCTL, &cap[i++]); in pci_save_pcie_state()
1589 pcie_capability_read_word(dev, PCI_EXP_RTCTL, &cap[i++]); in pci_save_pcie_state()
1590 pcie_capability_read_word(dev, PCI_EXP_DEVCTL2, &cap[i++]); in pci_save_pcie_state()
1591 pcie_capability_read_word(dev, PCI_EXP_LNKCTL2, &cap[i++]); in pci_save_pcie_state()
1592 pcie_capability_read_word(dev, PCI_EXP_SLTCTL2, &cap[i++]); in pci_save_pcie_state()
1619 u16 *cap; in pci_restore_pcie_state() local
1632 cap = (u16 *)&save_state->cap.data[0]; in pci_restore_pcie_state()
1633 pcie_capability_write_word(dev, PCI_EXP_DEVCTL, cap[i++]); in pci_restore_pcie_state()
1634 pcie_capability_write_word(dev, PCI_EXP_LNKCTL, cap[i++]); in pci_restore_pcie_state()
1635 pcie_capability_write_word(dev, PCI_EXP_SLTCTL, cap[i++]); in pci_restore_pcie_state()
1636 pcie_capability_write_word(dev, PCI_EXP_RTCTL, cap[i++]); in pci_restore_pcie_state()
1637 pcie_capability_write_word(dev, PCI_EXP_DEVCTL2, cap[i++]); in pci_restore_pcie_state()
1638 pcie_capability_write_word(dev, PCI_EXP_LNKCTL2, cap[i++]); in pci_restore_pcie_state()
1639 pcie_capability_write_word(dev, PCI_EXP_SLTCTL2, cap[i++]); in pci_restore_pcie_state()
1658 (u16 *)save_state->cap.data); in pci_save_pcix_state()
1667 u16 *cap; in pci_restore_pcix_state() local
1673 cap = (u16 *)&save_state->cap.data[0]; in pci_restore_pcix_state()
1675 pci_write_config_word(dev, pos + PCI_X_CMD, cap[i++]); in pci_restore_pcix_state()
1682 u32 *cap; in pci_save_ltr_state() local
1698 cap = &save_state->cap.data[0]; in pci_save_ltr_state()
1699 pci_read_config_dword(dev, ltr + PCI_LTR_MAX_SNOOP_LAT, cap); in pci_save_ltr_state()
1706 u32 *cap; in pci_restore_ltr_state() local
1714 cap = &save_state->cap.data[0]; in pci_restore_ltr_state()
1715 pci_write_config_dword(dev, ltr + PCI_LTR_MAX_SNOOP_LAT, *cap); in pci_restore_ltr_state()
1877 struct pci_cap_saved_data cap[]; member
1891 struct pci_cap_saved_data *cap; in pci_store_saved_state() local
1900 size += sizeof(struct pci_cap_saved_data) + tmp->cap.size; in pci_store_saved_state()
1909 cap = state->cap; in pci_store_saved_state()
1911 size_t len = sizeof(struct pci_cap_saved_data) + tmp->cap.size; in pci_store_saved_state()
1912 memcpy(cap, &tmp->cap, len); in pci_store_saved_state()
1913 cap = (struct pci_cap_saved_data *)((u8 *)cap + len); in pci_store_saved_state()
1929 struct pci_cap_saved_data *cap; in pci_load_saved_state() local
1939 cap = state->cap; in pci_load_saved_state()
1940 while (cap->size) { in pci_load_saved_state()
1943 tmp = _pci_find_saved_cap(dev, cap->cap_nr, cap->cap_extended); in pci_load_saved_state()
1944 if (!tmp || tmp->cap.size != cap->size) in pci_load_saved_state()
1947 memcpy(tmp->cap.data, cap->data, tmp->cap.size); in pci_load_saved_state()
1948 cap = (struct pci_cap_saved_data *)((u8 *)cap + in pci_load_saved_state()
1949 sizeof(struct pci_cap_saved_data) + cap->size); in pci_load_saved_state()
3511 static int _pci_add_cap_save_buffer(struct pci_dev *dev, u16 cap, in _pci_add_cap_save_buffer() argument
3518 pos = pci_find_ext_capability(dev, cap); in _pci_add_cap_save_buffer()
3520 pos = pci_find_capability(dev, cap); in _pci_add_cap_save_buffer()
3529 save_state->cap.cap_nr = cap; in _pci_add_cap_save_buffer()
3530 save_state->cap.cap_extended = extended; in _pci_add_cap_save_buffer()
3531 save_state->cap.size = size; in _pci_add_cap_save_buffer()
3537 int pci_add_cap_save_buffer(struct pci_dev *dev, char cap, unsigned int size) in pci_add_cap_save_buffer() argument
3539 return _pci_add_cap_save_buffer(dev, cap, false, size); in pci_add_cap_save_buffer()
3542 int pci_add_ext_cap_save_buffer(struct pci_dev *dev, u16 cap, unsigned int size) in pci_add_ext_cap_save_buffer() argument
3544 return _pci_add_cap_save_buffer(dev, cap, true, size); in pci_add_ext_cap_save_buffer()
3590 u32 cap; in pci_configure_ari() local
3600 pcie_capability_read_dword(bridge, PCI_EXP_DEVCAP2, &cap); in pci_configure_ari()
3601 if (!(cap & PCI_EXP_DEVCAP2_ARI)) in pci_configure_ari()
3618 u16 cap, ctrl; in pci_acs_flags_enabled() local
3629 pci_read_config_word(pdev, pos + PCI_ACS_CAP, &cap); in pci_acs_flags_enabled()
3630 acs_flags &= (cap | PCI_ACS_EC); in pci_acs_flags_enabled()
3807 u32 cap; in pci_rebar_get_possible_sizes() local
3813 pci_read_config_dword(pdev, pos + PCI_REBAR_CAP, &cap); in pci_rebar_get_possible_sizes()
3814 cap = FIELD_GET(PCI_REBAR_CAP_SIZES, cap); in pci_rebar_get_possible_sizes()
3818 bar == 0 && cap == 0x700) in pci_rebar_get_possible_sizes()
3821 return cap; in pci_rebar_get_possible_sizes()
3888 u32 cap, ctl2; in pci_enable_atomic_ops_to_root() local
3920 pcie_capability_read_dword(bridge, PCI_EXP_DEVCAP2, &cap); in pci_enable_atomic_ops_to_root()
3926 if (!(cap & PCI_EXP_DEVCAP2_ATOMIC_ROUTE)) in pci_enable_atomic_ops_to_root()
3932 if ((cap & cap_mask) != cap_mask) in pci_enable_atomic_ops_to_root()
4868 u8 cap; in pci_af_flr() local
4877 pci_read_config_byte(dev, pos + PCI_AF_CAP, &cap); in pci_af_flr()
4878 if (!(cap & PCI_AF_CAP_TP) || !(cap & PCI_AF_CAP_FLR)) in pci_af_flr()
6094 int cap; in pcix_get_max_mmrbc() local
6097 cap = pci_find_capability(dev, PCI_CAP_ID_PCIX); in pcix_get_max_mmrbc()
6098 if (!cap) in pcix_get_max_mmrbc()
6101 if (pci_read_config_dword(dev, cap + PCI_X_STATUS, &stat)) in pcix_get_max_mmrbc()
6117 int cap; in pcix_get_mmrbc() local
6120 cap = pci_find_capability(dev, PCI_CAP_ID_PCIX); in pcix_get_mmrbc()
6121 if (!cap) in pcix_get_mmrbc()
6124 if (pci_read_config_word(dev, cap + PCI_X_CMD, &cmd)) in pcix_get_mmrbc()
6142 int cap; in pcix_set_mmrbc() local
6151 cap = pci_find_capability(dev, PCI_CAP_ID_PCIX); in pcix_set_mmrbc()
6152 if (!cap) in pcix_set_mmrbc()
6155 if (pci_read_config_dword(dev, cap + PCI_X_STATUS, &stat)) in pcix_set_mmrbc()
6161 if (pci_read_config_word(dev, cap + PCI_X_CMD, &cmd)) in pcix_set_mmrbc()
6171 if (pci_write_config_word(dev, cap + PCI_X_CMD, cmd)) in pcix_set_mmrbc()