Lines Matching defs:bridge
47 struct pci_dev *bridge = NULL;
65 * find the associated bridge device and save off its PCI
70 /* Look for the bridge -- its device ID will be 2 more
72 while ((bridge = pci_get_device(mdev->pdev->vendor,
74 bridge)) != NULL) {
75 if (bridge->hdr_type == PCI_HEADER_TYPE_BRIDGE &&
76 bridge->subordinate == mdev->pdev->bus) {
77 mthca_dbg(mdev, "Found bridge: %s\n",
78 pci_name(bridge));
83 if (!bridge) {
85 * Didn't find a bridge for a Tavor device --
86 * assume we're in no-bridge mode and hope for
89 mthca_warn(mdev, "No bridge found for %s\n",
116 if (bridge) {
126 if (pci_read_config_dword(bridge, i * 4, bridge_header + i)) {
128 mthca_err(mdev, "Couldn't save HCA bridge "
133 bridge_pcix_cap = pci_find_capability(bridge, PCI_CAP_ID_PCIX);
136 mthca_err(mdev, "Couldn't locate HCA bridge "
167 if (pci_read_config_dword(bridge ? bridge : mdev->pdev, 0, &v)) {
188 if (bridge) {
189 if (pci_write_config_dword(bridge, bridge_pcix_cap + 0x8,
192 mthca_err(mdev, "Couldn't restore HCA bridge Upstream "
196 if (pci_write_config_dword(bridge, bridge_pcix_cap + 0xc,
199 mthca_err(mdev, "Couldn't restore HCA bridge Downstream "
211 if (pci_write_config_dword(bridge, i * 4, bridge_header[i])) {
213 mthca_err(mdev, "Couldn't restore HCA bridge reg %x, "
219 if (pci_write_config_dword(bridge, PCI_COMMAND,
222 mthca_err(mdev, "Couldn't restore HCA bridge COMMAND, "
280 pci_dev_put(bridge);