Lines Matching defs:ats
729 struct pci_ats *ats;
735 ats = kzalloc(sizeof(*ats), GFP_KERNEL);
736 if (!ats)
739 ats->pos = pos;
740 ats->stu = ps;
742 ats->qdep = PCI_ATS_CAP_QDEP(cap) ? PCI_ATS_CAP_QDEP(cap) :
744 dev->ats = ats;
751 kfree(dev->ats);
752 dev->ats = NULL;
767 BUG_ON(dev->ats && dev->ats->is_enabled);
776 if (pdev->ats)
777 rc = pdev->ats->stu == ps ? 0 : -EINVAL;
782 pdev->ats->ref_cnt++;
797 pci_write_config_word(dev, dev->ats->pos + PCI_ATS_CTRL, ctrl);
799 dev->ats->is_enabled = 1;
812 BUG_ON(!dev->ats || !dev->ats->is_enabled);
814 pci_read_config_word(dev, dev->ats->pos + PCI_ATS_CTRL, &ctrl);
816 pci_write_config_word(dev, dev->ats->pos + PCI_ATS_CTRL, ctrl);
818 dev->ats->is_enabled = 0;
824 pdev->ats->ref_cnt--;
825 if (!pdev->ats->ref_cnt)
854 if (dev->ats)
855 return dev->ats->qdep;