Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'usb-5.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fix from Greg KH:
"Here is a single USB typec tcpm fix for a reported problem for
5.14-rc7. It showed up in 5.13 and resolves an issue that Hans found.
It has been in linux-next this week with no reported problems"

* tag 'usb-5.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
usb: typec: tcpm: Fix VDMs sometimes not being forwarded to alt-mode drivers

+7 -6
+7 -6
drivers/usb/typec/tcpm/tcpm.c
··· 1737 1737 return rlen; 1738 1738 } 1739 1739 1740 + static void tcpm_pd_handle_msg(struct tcpm_port *port, 1741 + enum pd_msg_request message, 1742 + enum tcpm_ams ams); 1743 + 1740 1744 static void tcpm_handle_vdm_request(struct tcpm_port *port, 1741 1745 const __le32 *payload, int cnt) 1742 1746 { ··· 1768 1764 port->vdm_state = VDM_STATE_DONE; 1769 1765 } 1770 1766 1771 - if (PD_VDO_SVDM(p[0])) { 1767 + if (PD_VDO_SVDM(p[0]) && (adev || tcpm_vdm_ams(port) || port->nr_snk_vdo)) { 1772 1768 rlen = tcpm_pd_svdm(port, adev, p, cnt, response, &adev_action); 1773 1769 } else { 1774 1770 if (port->negotiated_rev >= PD_REV30) 1775 - tcpm_queue_message(port, PD_MSG_CTRL_NOT_SUPP); 1771 + tcpm_pd_handle_msg(port, PD_MSG_CTRL_NOT_SUPP, NONE_AMS); 1776 1772 } 1777 1773 1778 1774 /* ··· 2475 2471 NONE_AMS); 2476 2472 break; 2477 2473 case PD_DATA_VENDOR_DEF: 2478 - if (tcpm_vdm_ams(port) || port->nr_snk_vdo) 2479 - tcpm_handle_vdm_request(port, msg->payload, cnt); 2480 - else if (port->negotiated_rev > PD_REV20) 2481 - tcpm_pd_handle_msg(port, PD_MSG_CTRL_NOT_SUPP, NONE_AMS); 2474 + tcpm_handle_vdm_request(port, msg->payload, cnt); 2482 2475 break; 2483 2476 case PD_DATA_BIST: 2484 2477 port->bist_request = le32_to_cpu(msg->payload[0]);