summaryrefslogtreecommitdiffstats
path: root/drivers/thunderbolt/tb.c
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2023-01-23 08:28:20 +0200
committerMika Westerberg <mika.westerberg@linux.intel.com>2023-01-27 08:25:21 +0200
commitace75e18e736bffda1eaf9fd7eab596ecccb4877 (patch)
treedbdca9bb42ebfc3e8e71b4b8288e13c152b8cf07 /drivers/thunderbolt/tb.c
parent6ce3563520be90a155706bafc186fc264a13850e (diff)
downloadlinux-stable-ace75e18e736bffda1eaf9fd7eab596ecccb4877.tar.gz
linux-stable-ace75e18e736bffda1eaf9fd7eab596ecccb4877.tar.bz2
linux-stable-ace75e18e736bffda1eaf9fd7eab596ecccb4877.zip
thunderbolt: Handle bandwidth allocation mode enablement notification
When the graphics side enables bandwidth allocation mode the DP IN adapter sends notification to the connection manager about this. Currently the handler misses this and tries to allocate 0 Mb/s that then makes the graphics side to think the request failed. Fix this by properly handling the enablement notification. Fixes: 6ce3563520be ("thunderbolt: Add support for DisplayPort bandwidth allocation mode") Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/tb.c')
-rw-r--r--drivers/thunderbolt/tb.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/thunderbolt/tb.c b/drivers/thunderbolt/tb.c
index cdd1daaa5da1..bd5d119d7f64 100644
--- a/drivers/thunderbolt/tb.c
+++ b/drivers/thunderbolt/tb.c
@@ -1746,11 +1746,15 @@ static void tb_handle_dp_bandwidth_request(struct work_struct *work)
goto unlock;
}
- requested_bw = usb4_dp_port_requested_bw(in);
- if (requested_bw < 0) {
- tb_port_dbg(in, "no bandwidth request active\n");
+ ret = usb4_dp_port_requested_bw(in);
+ if (ret < 0) {
+ if (ret == -ENODATA)
+ tb_port_dbg(in, "no bandwidth request active\n");
+ else
+ tb_port_warn(in, "failed to read requested bandwidth\n");
goto unlock;
}
+ requested_bw = ret;
tb_port_dbg(in, "requested bandwidth %d Mb/s\n", requested_bw);