thunderbolt: Rework NFC credits handling
authorMika Westerberg <mika.westerberg@linux.intel.com>
Thu, 11 Oct 2018 08:38:22 +0000 (11:38 +0300)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Thu, 18 Apr 2019 08:18:53 +0000 (11:18 +0300)
commitc5ee6feb34709da96f9909b8a2e1e42875020efb
tree2a60a880e678769575f181228d646c90fd106f6c
parente78db6f08b6a2a50eea9ed4146f019026491d63c
thunderbolt: Rework NFC credits handling

NFC (non flow control) credits is actually 20-bit field so update
tb_port_add_nfc_credits() to handle this properly. This allows us to set
NFC credits for Display Port path in subsequent patches.

Also make sure the function does not update the hardware if the
underlying switch is already unplugged.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/thunderbolt/switch.c
drivers/thunderbolt/tb_regs.h