Merge tag 'thunderbolt-for-v6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-linus
Mika writes: "thunderbolt: Fixes for v6.0-rc3 This includes two fixes: one that corrects the buffer usage in tb_async_error() and another one that limits the xHCI connect operations to Thunderbolt 3 routers. Both have been in linux-next with no reported issues." * tag 'thunderbolt-for-v6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: thunderbolt: Check router generation before connecting xHCI thunderbolt: Use the actual buffer in tb_async_error()
This commit is contained in:
@@ -407,7 +407,7 @@ static void tb_ctl_rx_submit(struct ctl_pkg *pkg)
|
||||
|
||||
static int tb_async_error(const struct ctl_pkg *pkg)
|
||||
{
|
||||
const struct cfg_error_pkg *error = (const struct cfg_error_pkg *)pkg;
|
||||
const struct cfg_error_pkg *error = pkg->buffer;
|
||||
|
||||
if (pkg->frame.eof != TB_CFG_PKG_ERROR)
|
||||
return false;
|
||||
|
||||
@@ -3786,14 +3786,18 @@ int tb_switch_pcie_l1_enable(struct tb_switch *sw)
|
||||
*/
|
||||
int tb_switch_xhci_connect(struct tb_switch *sw)
|
||||
{
|
||||
bool usb_port1, usb_port3, xhci_port1, xhci_port3;
|
||||
struct tb_port *port1, *port3;
|
||||
int ret;
|
||||
|
||||
if (sw->generation != 3)
|
||||
return 0;
|
||||
|
||||
port1 = &sw->ports[1];
|
||||
port3 = &sw->ports[3];
|
||||
|
||||
if (tb_switch_is_alpine_ridge(sw)) {
|
||||
bool usb_port1, usb_port3, xhci_port1, xhci_port3;
|
||||
|
||||
usb_port1 = tb_lc_is_usb_plugged(port1);
|
||||
usb_port3 = tb_lc_is_usb_plugged(port3);
|
||||
xhci_port1 = tb_lc_is_xhci_connected(port1);
|
||||
|
||||
Reference in New Issue
Block a user