Lines Matching +full:a +full:- +full:facing
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
94 "Thunderbolt 3 PCI-PCI Bridge (Alpine Ridge 2C)" },
96 "Thunderbolt 3 PCI-PCI Bridge (Alpine Ridge LP)" },
98 "Thunderbolt 3 PCI-PCI Bridge (Alpine Ridge C 4C)" },
100 "Thunderbolt 3 PCI-PCI Bridge C (Alpine Ridge C 2C)" },
102 "Thunderbolt 3 PCI-PCI Bridge (IceLake)" },
104 "Thunderbolt 3 PCI-PCI Bridge (IceLake)" },
119 for (n = tb_pcib_identifiers; n->vendor != 0; n++) { in tb_pcib_find_ident()
120 if ((n->vendor != v) || (n->device != d)) in tb_pcib_find_ident()
122 if (((n->subvendor != 0xffff) && (n->subvendor != sv)) || in tb_pcib_find_ident()
123 ((n->subdevice != 0xffff) && (n->subdevice != sd))) in tb_pcib_find_ident()
137 sc->debug = 0; in tb_pcib_get_tunables()
142 tb_parse_debug(&sc->debug, oid); in tb_pcib_get_tunables()
147 device_get_unit(sc->dev)); in tb_pcib_get_tunables()
149 tb_parse_debug(&sc->debug, oid); in tb_pcib_get_tunables()
160 ctx = device_get_sysctl_ctx(sc->dev); in tb_pcib_setup_sysctl()
162 tree = device_get_sysctl_tree(sc->dev); in tb_pcib_setup_sysctl()
168 sc->sysctl_tree = tree; in tb_pcib_setup_sysctl()
169 sc->sysctl_ctx = ctx; in tb_pcib_setup_sysctl()
173 &sc->debug, 0, tb_debug_sysctl, "A", "Thunderbolt debug level"); in tb_pcib_setup_sysctl()
195 snprintf(desc, TB_DESC_MAX, "%s %s", n->desc, suffix); in tb_pcib_probe_common()
223 sc->dev = dev; in tb_pcib_attach_common()
224 sc->vsec = -1; in tb_pcib_attach_common()
228 sc->flags = n->flags; in tb_pcib_attach_common()
240 * Determine if this is an upstream or downstream facing device, and in tb_pcib_attach_common()
247 sc->flags |= TB_FLAGS_ISUFP; in tb_pcib_attach_common()
250 sc->flags |= TB_FLAGS_ISROOT; in tb_pcib_attach_common()
260 error = pci_find_extcap(dev, PCIZ_VENDOR, &sc->vsec); in tb_pcib_attach_common()
269 * Take the AR bridge out of low-power mode. in tb_pcib_attach_common()
283 /* The downstream facing port on AR needs some help */ in tb_pcib_attach_common()
286 val = pci_read_config(dev, sc->vsec + AR_VSCAP_1C, 4); in tb_pcib_attach_common()
289 pci_write_config(dev, sc->vsec + AR_VSCAP_1C, val, 4); in tb_pcib_attach_common()
291 val = pci_read_config(dev, sc->vsec + AR_VSCAP_B0, 4); in tb_pcib_attach_common()
294 pci_write_config(dev, sc->vsec + AR_VSCAP_B0, val, 4); in tb_pcib_attach_common()
348 if (vsec == -1) in tb_pcib_lc_mailbox()
360 /* Set the valid bit to signal we're sending a command */ in tb_pcib_lc_mailbox()
361 regcmd = LC_MBOXOUT_VALID | (cmd->cmd & LC_MBOXOUT_CMD_MASK); in tb_pcib_lc_mailbox()
362 regcmd |= (cmd->data_in << LC_MBOXOUT_DATA_SHIFT); in tb_pcib_lc_mailbox()
378 cmd->cmd_resp = result & LC_MBOXIN_CMD_MASK; in tb_pcib_lc_mailbox()
379 cmd->data_out = result >> LC_MBOXIN_CMD_SHIFT; in tb_pcib_lc_mailbox()
419 if (vsec == -1) in tb_pcib_pcie2cio_read()
445 if (vsec == -1) in tb_pcib_pcie2cio_write()
461 * The Upstream Facing Port (UFP) in a switch is special, it's the function
463 * differentiated by PCI ID, so a heuristic approach to identifying it is
529 *debug = sc->debug; in tb_pcib_get_debug()
554 pci, tb_pcib, tb_pcib_identifiers, nitems(tb_pcib_identifiers) - 1);
562 switch (n->flags & TB_GEN_MASK) { in tb_pci_probe()