Skip to content

Commit cfdfdb1

Browse files
committed
thunderbolt: Log config space when invalid config space reply is received
For debugging purposes helps to see the config space that was being accessed. Signed-off-by: Mika Westerberg <[email protected]>
1 parent 939ae02 commit cfdfdb1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/thunderbolt/ctl.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ static struct tb_cfg_result parse_header(const struct ctl_pkg *pkg, u32 len,
265265
return res;
266266
}
267267

268-
static void tb_cfg_print_error(struct tb_ctl *ctl,
268+
static void tb_cfg_print_error(struct tb_ctl *ctl, enum tb_cfg_space space,
269269
const struct tb_cfg_result *res)
270270
{
271271
WARN_ON(res->err != 1);
@@ -279,8 +279,8 @@ static void tb_cfg_print_error(struct tb_ctl *ctl,
279279
* Invalid cfg_space/offset/length combination in
280280
* cfg_read/cfg_write.
281281
*/
282-
tb_ctl_dbg(ctl, "%llx:%x: invalid config space or offset\n",
283-
res->response_route, res->response_port);
282+
tb_ctl_dbg(ctl, "%llx:%x: invalid config space (%u) or offset\n",
283+
res->response_route, res->response_port, space);
284284
return;
285285
case TB_CFG_ERROR_NO_SUCH_PORT:
286286
/*
@@ -1072,7 +1072,7 @@ static int tb_cfg_get_error(struct tb_ctl *ctl, enum tb_cfg_space space,
10721072
res->tb_error == TB_CFG_ERROR_INVALID_CONFIG_SPACE)
10731073
return -ENODEV;
10741074

1075-
tb_cfg_print_error(ctl, res);
1075+
tb_cfg_print_error(ctl, space, res);
10761076

10771077
if (res->tb_error == TB_CFG_ERROR_LOCK)
10781078
return -EACCES;

0 commit comments

Comments
 (0)