Lines Matching refs:mdev

41 int mthca_reset(struct mthca_dev *mdev)  in mthca_reset()  argument
69 if (!(mdev->mthca_flags & MTHCA_FLAG_PCIE)) { in mthca_reset()
72 while ((bridge = pci_get_device(mdev->pdev->vendor, in mthca_reset()
73 mdev->pdev->device + 2, in mthca_reset()
76 bridge->subordinate == mdev->pdev->bus) { in mthca_reset()
77 mthca_dbg(mdev, "Found bridge: %s\n", in mthca_reset()
89 mthca_warn(mdev, "No bridge found for %s\n", in mthca_reset()
90 pci_name(mdev->pdev)); in mthca_reset()
105 if (pci_read_config_dword(mdev->pdev, i * 4, hca_header + i)) { in mthca_reset()
107 mthca_err(mdev, "Couldn't save HCA " in mthca_reset()
113 hca_pcix_cap = pci_find_capability(mdev->pdev, PCI_CAP_ID_PCIX); in mthca_reset()
114 hca_pcie_cap = pci_pcie_cap(mdev->pdev); in mthca_reset()
128 mthca_err(mdev, "Couldn't save HCA bridge " in mthca_reset()
136 mthca_err(mdev, "Couldn't locate HCA bridge " in mthca_reset()
144 void __iomem *reset = ioremap(pci_resource_start(mdev->pdev, 0) + in mthca_reset()
149 mthca_err(mdev, "Couldn't map HCA reset register, " in mthca_reset()
167 if (pci_read_config_dword(bridge ? bridge : mdev->pdev, 0, &v)) { in mthca_reset()
169 mthca_err(mdev, "Couldn't access HCA after reset, " in mthca_reset()
181 mthca_err(mdev, "PCI device did not come back after reset, " in mthca_reset()
192 mthca_err(mdev, "Couldn't restore HCA bridge Upstream " in mthca_reset()
199 mthca_err(mdev, "Couldn't restore HCA bridge Downstream " in mthca_reset()
213 mthca_err(mdev, "Couldn't restore HCA bridge reg %x, " in mthca_reset()
222 mthca_err(mdev, "Couldn't restore HCA bridge COMMAND, " in mthca_reset()
229 if (pci_write_config_dword(mdev->pdev, hca_pcix_cap, in mthca_reset()
232 mthca_err(mdev, "Couldn't restore HCA PCI-X " in mthca_reset()
240 if (pcie_capability_write_word(mdev->pdev, PCI_EXP_DEVCTL, in mthca_reset()
243 mthca_err(mdev, "Couldn't restore HCA PCI Express " in mthca_reset()
248 if (pcie_capability_write_word(mdev->pdev, PCI_EXP_LNKCTL, in mthca_reset()
251 mthca_err(mdev, "Couldn't restore HCA PCI Express " in mthca_reset()
261 if (pci_write_config_dword(mdev->pdev, i * 4, hca_header[i])) { in mthca_reset()
263 mthca_err(mdev, "Couldn't restore HCA reg %x, " in mthca_reset()
269 if (pci_write_config_dword(mdev->pdev, PCI_COMMAND, in mthca_reset()
272 mthca_err(mdev, "Couldn't restore HCA COMMAND, " in mthca_reset()