Lines Matching defs:bridge
49 struct pci_dev *bridge = NULL;
69 * find the associated bridge device and save off its PCI
74 /* Look for the bridge -- its device ID will be 2 more
77 while ((bridge = pci_get_device(mdev->pdev->vendor,
79 bridge)) != NULL) {
80 if (bridge->hdr_type == PCI_HEADER_TYPE_BRIDGE &&
81 bridge->subordinate == mdev->pdev->bus) {
82 mthca_dbg(mdev, "Found bridge: %s\n",
83 pci_name(bridge));
88 if (!bridge) {
90 * Didn't find a bridge for a Tavor device --
91 * assume we're in no-bridge mode and hope for
94 mthca_warn(mdev, "No bridge found for %s\n",
128 if (bridge) {
133 "bridge PCI header, aborting.\n");
140 if (pci_read_config_dword(bridge, i * 4, bridge_header + i)) {
142 mthca_err(mdev, "Couldn't save HCA bridge "
147 bridge_pcix_cap = pci_find_capability(bridge, PCI_CAP_ID_PCIX);
150 mthca_err(mdev, "Couldn't locate HCA bridge "
182 if (pci_read_config_dword(bridge ? bridge : mdev->pdev, 0, &v)) {
204 if (bridge) {
205 if (pci_write_config_dword(bridge, bridge_pcix_cap + 0x8,
208 mthca_err(mdev, "Couldn't restore HCA bridge Upstream "
212 if (pci_write_config_dword(bridge, bridge_pcix_cap + 0xc,
215 mthca_err(mdev, "Couldn't restore HCA bridge Downstream "
227 if (pci_write_config_dword(bridge, i * 4, bridge_header[i])) {
229 mthca_err(mdev, "Couldn't restore HCA bridge reg %x, "
235 if (pci_write_config_dword(bridge, PCI_COMMAND,
238 mthca_err(mdev, "Couldn't restore HCA bridge COMMAND, "
296 if (bridge)
297 pci_dev_put(bridge);