diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2020-12-10 16:07:59 +0200 |
---|---|---|
committer | Mika Westerberg <mika.westerberg@linux.intel.com> | 2021-06-01 10:48:59 +0300 |
commit | 02c5e7c2db2bdfe227dd3e7f6febd732ccec5440 (patch) | |
tree | cdf7d5d640ebc24500d27e388701103dcfe48bb3 /drivers/thunderbolt/path.c | |
parent | 1c561e4e659d59f1f2825dec42f09338eac1c774 (diff) | |
download | linux-stable-02c5e7c2db2bdfe227dd3e7f6febd732ccec5440.tar.gz linux-stable-02c5e7c2db2bdfe227dd3e7f6febd732ccec5440.tar.bz2 linux-stable-02c5e7c2db2bdfe227dd3e7f6febd732ccec5440.zip |
thunderbolt: Move nfc_credits field to struct tb_path_hop
With the USB4 buffer allocation the number of credits (and non-flow
credits) may be different depending on the router buffer allocation
preferences. To allow this move the nfc_credits field to struct
tb_path_hop.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/path.c')
-rw-r--r-- | drivers/thunderbolt/path.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/thunderbolt/path.c b/drivers/thunderbolt/path.c index f63e205a35d9..564e2f42cebd 100644 --- a/drivers/thunderbolt/path.c +++ b/drivers/thunderbolt/path.c @@ -367,7 +367,7 @@ static void __tb_path_deallocate_nfc(struct tb_path *path, int first_hop) int i, res; for (i = first_hop; i < path->path_length; i++) { res = tb_port_add_nfc_credits(path->hops[i].in_port, - -path->nfc_credits); + -path->hops[i].nfc_credits); if (res) tb_port_warn(path->hops[i].in_port, "nfc credits deallocation failed for hop %d\n", @@ -502,7 +502,7 @@ int tb_path_activate(struct tb_path *path) /* Add non flow controlled credits. */ for (i = path->path_length - 1; i >= 0; i--) { res = tb_port_add_nfc_credits(path->hops[i].in_port, - path->nfc_credits); + path->hops[i].nfc_credits); if (res) { __tb_path_deallocate_nfc(path, i); goto err; |