Lines Matching refs:pdev

44  * @pdev: PCI device this mailbox belongs to
52 struct pci_dev *pdev;
106 struct pci_dev *pdev = doe_mb->pdev;
109 pci_write_config_dword(pdev, offset + PCI_DOE_CTRL, val);
114 struct pci_dev *pdev = doe_mb->pdev;
118 pci_dbg(pdev, "[%x] Issuing Abort\n", offset);
130 pci_read_config_dword(pdev, offset + PCI_DOE_STATUS, &val);
140 pci_err(pdev, "[%x] ABORT timed out\n", offset);
147 struct pci_dev *pdev = doe_mb->pdev;
159 pci_read_config_dword(pdev, offset + PCI_DOE_STATUS, &val);
176 pci_write_config_dword(pdev, offset + PCI_DOE_WRITE, val);
177 pci_write_config_dword(pdev, offset + PCI_DOE_WRITE,
183 pci_write_config_dword(pdev, offset + PCI_DOE_WRITE,
192 pci_write_config_dword(pdev, offset + PCI_DOE_WRITE, val);
202 struct pci_dev *pdev = doe_mb->pdev;
206 pci_read_config_dword(pdev, offset + PCI_DOE_STATUS, &val);
215 struct pci_dev *pdev = doe_mb->pdev;
221 pci_read_config_dword(pdev, offset + PCI_DOE_READ, &val);
224 dev_err_ratelimited(&pdev->dev, "[%x] expected [VID, Protocol] = [%04x, %02x], got [%04x, %02x]\n",
231 pci_write_config_dword(pdev, offset + PCI_DOE_READ, 0);
233 pci_read_config_dword(pdev, offset + PCI_DOE_READ, &val);
234 pci_write_config_dword(pdev, offset + PCI_DOE_READ, 0);
262 pci_read_config_dword(pdev, offset + PCI_DOE_READ,
265 pci_write_config_dword(pdev, offset + PCI_DOE_READ, 0);
269 pci_read_config_dword(pdev, offset + PCI_DOE_READ, &val);
275 pci_write_config_dword(pdev, offset + PCI_DOE_READ, 0);
281 pci_read_config_dword(pdev, offset + PCI_DOE_READ, &val);
282 pci_write_config_dword(pdev, offset + PCI_DOE_READ, 0);
286 pci_read_config_dword(pdev, offset + PCI_DOE_STATUS, &val);
303 struct pci_dev *pdev = doe_mb->pdev;
310 pci_err(pdev, "[%x] Abort failed marking mailbox dead\n",
322 struct pci_dev *pdev = doe_mb->pdev;
344 dev_err_ratelimited(&pdev->dev, "[%x] busy detected; another entity is sending conflicting requests\n",
353 pci_read_config_dword(pdev, offset + PCI_DOE_STATUS, &val);
434 pci_dbg(doe_mb->pdev,
460 * @pdev: PCI device to create the DOE mailbox for
469 static struct pci_doe_mb *pci_doe_create_mb(struct pci_dev *pdev,
479 doe_mb->pdev = pdev;
485 dev_bus_name(&pdev->dev),
486 pci_name(pdev),
489 pci_err(pdev, "[%x] failed to allocate work queue\n",
498 pci_err(pdev, "[%x] failed to reset mailbox with abort command : %d\n",
509 pci_err(pdev, "[%x] failed to cache protocols : %d\n",
658 * @pdev: PCI device
666 struct pci_doe_mb *pci_find_doe_mailbox(struct pci_dev *pdev, u16 vendor,
672 xa_for_each(&pdev->doe_mbs, index, doe_mb)
680 void pci_doe_init(struct pci_dev *pdev)
686 xa_init(&pdev->doe_mbs);
688 while ((offset = pci_find_next_ext_capability(pdev, offset,
690 doe_mb = pci_doe_create_mb(pdev, offset);
692 pci_err(pdev, "[%x] failed to create mailbox: %ld\n",
697 rc = xa_insert(&pdev->doe_mbs, offset, doe_mb, GFP_KERNEL);
699 pci_err(pdev, "[%x] failed to insert mailbox: %d\n",
706 void pci_doe_destroy(struct pci_dev *pdev)
711 xa_for_each(&pdev->doe_mbs, index, doe_mb)
714 xa_destroy(&pdev->doe_mbs);
717 void pci_doe_disconnected(struct pci_dev *pdev)
722 xa_for_each(&pdev->doe_mbs, index, doe_mb)