thunderbolt: Enable TMU access when accessing port space on legacy devices

Light Ridge and Eagle Ridge both need to have TMU access enabled before
port space can be fully accessed so make sure it happens on those. This
allows us to get rid of the offset quirk in tb_port_find_cap().

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
此提交包含在:
Mika Westerberg
2019-01-08 18:55:09 +02:00
父節點 f0342e757c
當前提交 8b0110d9d1
共有 2 個檔案被更改,包括 62 行新增17 行删除

查看文件

@@ -436,6 +436,16 @@ static inline struct tb_switch *tb_to_switch(struct device *dev)
return NULL;
}
static inline bool tb_switch_is_lr(const struct tb_switch *sw)
{
return sw->config.device_id == PCI_DEVICE_ID_INTEL_LIGHT_RIDGE;
}
static inline bool tb_switch_is_er(const struct tb_switch *sw)
{
return sw->config.device_id == PCI_DEVICE_ID_INTEL_EAGLE_RIDGE;
}
int tb_wait_for_port(struct tb_port *port, bool wait_if_unplugged);
int tb_port_add_nfc_credits(struct tb_port *port, int credits);
int tb_port_clear_counter(struct tb_port *port, int counter);