thunderbolt: Read retimer NVM authentication status prior tb_retimer_set_inbound_sbtx()
According to the USB4 retimer guide the correct order is immediately after sending ENUMERATE_RETIMERS so update the code to follow this. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
This commit is contained in:
Родитель
53ba2e1695
Коммит
1402ba08ab
|
@ -187,6 +187,21 @@ static ssize_t nvm_authenticate_show(struct device *dev,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void tb_retimer_nvm_authenticate_status(struct tb_port *port, u32 *status)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
tb_port_dbg(port, "reading NVM authentication status of retimers\n");
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Before doing anything else, read the authentication status.
|
||||||
|
* If the retimer has it set, store it for the new retimer
|
||||||
|
* device instance.
|
||||||
|
*/
|
||||||
|
for (i = 1; i <= TB_MAX_RETIMER_INDEX; i++)
|
||||||
|
usb4_port_retimer_nvm_authenticate_status(port, i, &status[i]);
|
||||||
|
}
|
||||||
|
|
||||||
static void tb_retimer_set_inbound_sbtx(struct tb_port *port)
|
static void tb_retimer_set_inbound_sbtx(struct tb_port *port)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -448,20 +463,18 @@ int tb_retimer_scan(struct tb_port *port, bool add)
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Immediately after sending enumerate retimers read the
|
||||||
|
* authentication status of each retimer.
|
||||||
|
*/
|
||||||
|
tb_retimer_nvm_authenticate_status(port, status);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Enable sideband channel for each retimer. We can do this
|
* Enable sideband channel for each retimer. We can do this
|
||||||
* regardless whether there is device connected or not.
|
* regardless whether there is device connected or not.
|
||||||
*/
|
*/
|
||||||
tb_retimer_set_inbound_sbtx(port);
|
tb_retimer_set_inbound_sbtx(port);
|
||||||
|
|
||||||
/*
|
|
||||||
* Before doing anything else, read the authentication status.
|
|
||||||
* If the retimer has it set, store it for the new retimer
|
|
||||||
* device instance.
|
|
||||||
*/
|
|
||||||
for (i = 1; i <= TB_MAX_RETIMER_INDEX; i++)
|
|
||||||
usb4_port_retimer_nvm_authenticate_status(port, i, &status[i]);
|
|
||||||
|
|
||||||
for (i = 1; i <= TB_MAX_RETIMER_INDEX; i++) {
|
for (i = 1; i <= TB_MAX_RETIMER_INDEX; i++) {
|
||||||
/*
|
/*
|
||||||
* Last retimer is true only for the last on-board
|
* Last retimer is true only for the last on-board
|
||||||
|
|
Загрузка…
Ссылка в новой задаче