Lines Matching refs:mdev

41 int mthca_reset(struct mthca_dev *mdev)
69 if (!(mdev->mthca_flags & MTHCA_FLAG_PCIE)) {
73 while ((bridge = pci_get_device(mdev->pdev->vendor,
74 mdev->pdev->device + 2,
77 bridge->subordinate == mdev->pdev->bus) {
78 mthca_dbg(mdev, "Found bridge: %s\n",
90 mthca_warn(mdev, "No bridge found for %s\n",
91 pci_name(mdev->pdev));
94 mthca_warn(mdev, "Reset on PCI-X is not supported.\n");
104 mthca_err(mdev, "Couldn't allocate memory to save HCA "
112 if (pci_read_config_dword(mdev->pdev, i * 4, hca_header + i)) {
114 mthca_err(mdev, "Couldn't save HCA "
120 hca_pcix_cap = pci_find_capability(mdev->pdev, PCI_CAP_ID_PCIX);
121 hca_pcie_cap = pci_find_capability(mdev->pdev, PCI_CAP_ID_EXP);
128 mthca_err(mdev, "Couldn't allocate memory to save HCA "
138 mthca_err(mdev, "Couldn't save HCA bridge "
146 mthca_err(mdev, "Couldn't locate HCA bridge "
155 void __iomem *reset = ioremap(pci_resource_start(mdev->pdev, 0) +
160 mthca_err(mdev, "Couldn't map HCA reset register, "
178 if (pci_read_config_dword(bridge ? bridge : mdev->pdev, 0, &v)) {
180 mthca_err(mdev, "Couldn't access HCA after reset, "
192 mthca_err(mdev, "PCI device did not come back after reset, "
203 mthca_err(mdev, "Couldn't restore HCA bridge Upstream "
210 mthca_err(mdev, "Couldn't restore HCA bridge Downstream "
224 mthca_err(mdev, "Couldn't restore HCA bridge reg %x, "
233 mthca_err(mdev, "Couldn't restore HCA bridge COMMAND, "
240 if (pci_write_config_dword(mdev->pdev, hca_pcix_cap,
243 mthca_err(mdev, "Couldn't restore HCA PCI-X "
251 if (pci_write_config_word(mdev->pdev, hca_pcie_cap + PCI_EXP_DEVCTL,
254 mthca_err(mdev, "Couldn't restore HCA PCI Express "
259 if (pci_write_config_word(mdev->pdev, hca_pcie_cap + PCI_EXP_LNKCTL,
262 mthca_err(mdev, "Couldn't restore HCA PCI Express "
272 if (pci_write_config_dword(mdev->pdev, i * 4, hca_header[i])) {
274 mthca_err(mdev, "Couldn't restore HCA reg %x, "
280 if (pci_write_config_dword(mdev->pdev, PCI_COMMAND,
283 mthca_err(mdev, "Couldn't restore HCA COMMAND, "