diff options
author | 2019-06-25 15:10:01 +0300 | |
---|---|---|
committer | 2019-11-01 14:31:59 +0300 | |
commit | f07a360813f6c551380dca8817d8eb5e7ab40a21 (patch) | |
tree | 585e2ecadbb618d9473dd3bae5b8cc0620496f51 /drivers/thunderbolt/switch.c | |
parent | Merge branch 'thunderbolt/fixes' into thunderbolt/next (diff) | |
download | linux-f07a360813f6c551380dca8817d8eb5e7ab40a21.tar.gz linux-f07a360813f6c551380dca8817d8eb5e7ab40a21.tar.bz2 linux-f07a360813f6c551380dca8817d8eb5e7ab40a21.zip |
thunderbolt: Introduce tb_switch_is_icm()
We currently differentiate between SW CM (Software Connection Manager,
sometimes also called External Connection Manager) and ICM (Firmware
based Connection Manager, Internal Connection Manager) by looking
directly at the sw->config.enabled field which may be rather hard to
understand for the casual reader. For this reason introduce a wrapper
function with documentation that should make the intention more clear.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/switch.c')
-rw-r--r-- | drivers/thunderbolt/switch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c index c498464875cf..d42fc0f8b060 100644 --- a/drivers/thunderbolt/switch.c +++ b/drivers/thunderbolt/switch.c @@ -986,7 +986,7 @@ static int tb_plug_events_active(struct tb_switch *sw, bool active) u32 data; int res; - if (!sw->config.enabled) + if (tb_switch_is_icm(sw)) return 0; sw->config.plug_events_delay = 0xff; @@ -1720,7 +1720,7 @@ static int tb_switch_add_dma_port(struct tb_switch *sw) } /* Root switch DMA port requires running firmware */ - if (!tb_route(sw) && sw->config.enabled) + if (!tb_route(sw) && !tb_switch_is_icm(sw)) return 0; sw->dma_port = dma_port_alloc(sw); |