USB/Thunderbolt fixes for 5.10-rc4
Here are some small Thunderbolt and USB driver fixes for 5.10-rc4 to solve some reported issues. Nothing huge in here, just small things: - thunderbolt memory leaks fixed and new device ids added - revert of problem patch for the musb driver - new quirks added for USB devices - typec power supply fixes to resolve much reported problems about charging notifications not working anymore All except the cdc-acm driver quirk addition have been in linux-next with no reported issues (the quirk patch was applied on Friday, and is self-contained.) Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCX7E6EA8cZ3JlZ0Brcm9h aC5jb20ACgkQMUfUDdst+ymHNwCePOBlfVmcH3eEqVTByPdAG+L5m7MAnRLRqmMw aPpNB/a0CRSPxH+5Z+nV =Vi/z -----END PGP SIGNATURE----- Merge tag 'usb-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB and Thunderbolt fixes from Greg KH: "Here are some small Thunderbolt and USB driver fixes for 5.10-rc4 to solve some reported issues. Nothing huge in here, just small things: - thunderbolt memory leaks fixed and new device ids added - revert of problem patch for the musb driver - new quirks added for USB devices - typec power supply fixes to resolve much reported problems about charging notifications not working anymore All except the cdc-acm driver quirk addition have been in linux-next with no reported issues (the quirk patch was applied on Friday, and is self-contained)" * tag 'usb-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: cdc-acm: Add DISABLE_ECHO for Renesas USB Download mode MAINTAINERS: add usb raw gadget entry usb: typec: ucsi: Report power supply changes xhci: hisilicon: fix refercence leak in xhci_histb_probe Revert "usb: musb: convert to devm_platform_ioremap_resource_byname" thunderbolt: Add support for Intel Tiger Lake-H thunderbolt: Only configure USB4 wake for lane 0 adapters thunderbolt: Add uaccess dependency to debugfs interface thunderbolt: Fix memory leak if ida_simple_get() fails in enumerate_services() thunderbolt: Add the missed ida_simple_remove() in ring_request_msix()
This commit is contained in:
commit
281b3ec3a7
|
@ -18173,6 +18173,14 @@ L: linux-usb@vger.kernel.org
|
|||
S: Supported
|
||||
F: drivers/usb/class/usblp.c
|
||||
|
||||
USB RAW GADGET DRIVER
|
||||
R: Andrey Konovalov <andreyknvl@gmail.com>
|
||||
L: linux-usb@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/usb/raw-gadget.rst
|
||||
F: drivers/usb/gadget/legacy/raw_gadget.c
|
||||
F: include/uapi/linux/usb/raw_gadget.h
|
||||
|
||||
USB QMI WWAN NETWORK DRIVER
|
||||
M: Bjørn Mork <bjorn@mork.no>
|
||||
L: netdev@vger.kernel.org
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include <linux/debugfs.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/uaccess.h>
|
||||
|
||||
#include "tb.h"
|
||||
|
||||
|
|
|
@ -2284,6 +2284,8 @@ struct tb *icm_probe(struct tb_nhi *nhi)
|
|||
|
||||
case PCI_DEVICE_ID_INTEL_TGL_NHI0:
|
||||
case PCI_DEVICE_ID_INTEL_TGL_NHI1:
|
||||
case PCI_DEVICE_ID_INTEL_TGL_H_NHI0:
|
||||
case PCI_DEVICE_ID_INTEL_TGL_H_NHI1:
|
||||
icm->is_supported = icm_tgl_is_supported;
|
||||
icm->driver_ready = icm_icl_driver_ready;
|
||||
icm->set_uuid = icm_icl_set_uuid;
|
||||
|
|
|
@ -406,12 +406,23 @@ static int ring_request_msix(struct tb_ring *ring, bool no_suspend)
|
|||
|
||||
ring->vector = ret;
|
||||
|
||||
ring->irq = pci_irq_vector(ring->nhi->pdev, ring->vector);
|
||||
if (ring->irq < 0)
|
||||
return ring->irq;
|
||||
ret = pci_irq_vector(ring->nhi->pdev, ring->vector);
|
||||
if (ret < 0)
|
||||
goto err_ida_remove;
|
||||
|
||||
ring->irq = ret;
|
||||
|
||||
irqflags = no_suspend ? IRQF_NO_SUSPEND : 0;
|
||||
return request_irq(ring->irq, ring_msix, irqflags, "thunderbolt", ring);
|
||||
ret = request_irq(ring->irq, ring_msix, irqflags, "thunderbolt", ring);
|
||||
if (ret)
|
||||
goto err_ida_remove;
|
||||
|
||||
return 0;
|
||||
|
||||
err_ida_remove:
|
||||
ida_simple_remove(&nhi->msix_ida, ring->vector);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void ring_release_msix(struct tb_ring *ring)
|
||||
|
@ -1334,6 +1345,10 @@ static struct pci_device_id nhi_ids[] = {
|
|||
.driver_data = (kernel_ulong_t)&icl_nhi_ops },
|
||||
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_TGL_NHI1),
|
||||
.driver_data = (kernel_ulong_t)&icl_nhi_ops },
|
||||
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_TGL_H_NHI0),
|
||||
.driver_data = (kernel_ulong_t)&icl_nhi_ops },
|
||||
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_TGL_H_NHI1),
|
||||
.driver_data = (kernel_ulong_t)&icl_nhi_ops },
|
||||
|
||||
/* Any USB4 compliant host */
|
||||
{ PCI_DEVICE_CLASS(PCI_CLASS_SERIAL_USB_USB4, ~0) },
|
||||
|
|
|
@ -75,6 +75,8 @@ extern const struct tb_nhi_ops icl_nhi_ops;
|
|||
#define PCI_DEVICE_ID_INTEL_ICL_NHI0 0x8a17
|
||||
#define PCI_DEVICE_ID_INTEL_TGL_NHI0 0x9a1b
|
||||
#define PCI_DEVICE_ID_INTEL_TGL_NHI1 0x9a1d
|
||||
#define PCI_DEVICE_ID_INTEL_TGL_H_NHI0 0x9a1f
|
||||
#define PCI_DEVICE_ID_INTEL_TGL_H_NHI1 0x9a21
|
||||
|
||||
#define PCI_CLASS_SERIAL_USB_USB4 0x0c0340
|
||||
|
||||
|
|
|
@ -784,6 +784,8 @@ static inline bool tb_switch_is_tiger_lake(const struct tb_switch *sw)
|
|||
switch (sw->config.device_id) {
|
||||
case PCI_DEVICE_ID_INTEL_TGL_NHI0:
|
||||
case PCI_DEVICE_ID_INTEL_TGL_NHI1:
|
||||
case PCI_DEVICE_ID_INTEL_TGL_H_NHI0:
|
||||
case PCI_DEVICE_ID_INTEL_TGL_H_NHI1:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -421,8 +421,12 @@ int usb4_switch_set_wake(struct tb_switch *sw, unsigned int flags)
|
|||
* upstream USB4 port.
|
||||
*/
|
||||
tb_switch_for_each_port(sw, port) {
|
||||
if (!tb_port_is_null(port))
|
||||
continue;
|
||||
if (!route && tb_is_upstream_port(port))
|
||||
continue;
|
||||
if (!port->cap_usb4)
|
||||
continue;
|
||||
|
||||
ret = tb_port_read(port, &val, TB_CFG_PORT,
|
||||
port->cap_usb4 + PORT_CS_19, 1);
|
||||
|
|
|
@ -881,6 +881,7 @@ static void enumerate_services(struct tb_xdomain *xd)
|
|||
|
||||
id = ida_simple_get(&xd->service_ids, 0, 0, GFP_KERNEL);
|
||||
if (id < 0) {
|
||||
kfree(svc->key);
|
||||
kfree(svc);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1693,6 +1693,15 @@ static const struct usb_device_id acm_ids[] = {
|
|||
{ USB_DEVICE(0x0870, 0x0001), /* Metricom GS Modem */
|
||||
.driver_info = NO_UNION_NORMAL, /* has no union descriptor */
|
||||
},
|
||||
{ USB_DEVICE(0x045b, 0x023c), /* Renesas USB Download mode */
|
||||
.driver_info = DISABLE_ECHO, /* Don't echo banner */
|
||||
},
|
||||
{ USB_DEVICE(0x045b, 0x0248), /* Renesas USB Download mode */
|
||||
.driver_info = DISABLE_ECHO, /* Don't echo banner */
|
||||
},
|
||||
{ USB_DEVICE(0x045b, 0x024D), /* Renesas USB Download mode */
|
||||
.driver_info = DISABLE_ECHO, /* Don't echo banner */
|
||||
},
|
||||
{ USB_DEVICE(0x0e8d, 0x0003), /* FIREFLY, MediaTek Inc; andrey.arapov@gmail.com */
|
||||
.driver_info = NO_UNION_NORMAL, /* has no union descriptor */
|
||||
},
|
||||
|
|
|
@ -240,7 +240,7 @@ static int xhci_histb_probe(struct platform_device *pdev)
|
|||
/* Initialize dma_mask and coherent_dma_mask to 32-bits */
|
||||
ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32));
|
||||
if (ret)
|
||||
return ret;
|
||||
goto disable_pm;
|
||||
|
||||
hcd = usb_create_hcd(driver, dev, dev_name(dev));
|
||||
if (!hcd) {
|
||||
|
|
|
@ -429,10 +429,12 @@ static int dsps_musb_init(struct musb *musb)
|
|||
struct platform_device *parent = to_platform_device(dev->parent);
|
||||
const struct dsps_musb_wrapper *wrp = glue->wrp;
|
||||
void __iomem *reg_base;
|
||||
struct resource *r;
|
||||
u32 rev, val;
|
||||
int ret;
|
||||
|
||||
reg_base = devm_platform_ioremap_resource_byname(parent, "control");
|
||||
r = platform_get_resource_byname(parent, IORESOURCE_MEM, "control");
|
||||
reg_base = devm_ioremap_resource(dev, r);
|
||||
if (IS_ERR(reg_base))
|
||||
return PTR_ERR(reg_base);
|
||||
musb->ctrl_base = reg_base;
|
||||
|
|
|
@ -238,4 +238,13 @@ void ucsi_unregister_port_psy(struct ucsi_connector *con)
|
|||
return;
|
||||
|
||||
power_supply_unregister(con->psy);
|
||||
con->psy = NULL;
|
||||
}
|
||||
|
||||
void ucsi_port_psy_changed(struct ucsi_connector *con)
|
||||
{
|
||||
if (IS_ERR_OR_NULL(con->psy))
|
||||
return;
|
||||
|
||||
power_supply_changed(con->psy);
|
||||
}
|
||||
|
|
|
@ -643,8 +643,10 @@ static void ucsi_handle_connector_change(struct work_struct *work)
|
|||
role = !!(con->status.flags & UCSI_CONSTAT_PWR_DIR);
|
||||
|
||||
if (con->status.change & UCSI_CONSTAT_POWER_OPMODE_CHANGE ||
|
||||
con->status.change & UCSI_CONSTAT_POWER_LEVEL_CHANGE)
|
||||
con->status.change & UCSI_CONSTAT_POWER_LEVEL_CHANGE) {
|
||||
ucsi_pwr_opmode_change(con);
|
||||
ucsi_port_psy_changed(con);
|
||||
}
|
||||
|
||||
if (con->status.change & UCSI_CONSTAT_POWER_DIR_CHANGE) {
|
||||
typec_set_pwr_role(con->port, role);
|
||||
|
@ -674,6 +676,8 @@ static void ucsi_handle_connector_change(struct work_struct *work)
|
|||
ucsi_register_partner(con);
|
||||
else
|
||||
ucsi_unregister_partner(con);
|
||||
|
||||
ucsi_port_psy_changed(con);
|
||||
}
|
||||
|
||||
if (con->status.change & UCSI_CONSTAT_CAM_CHANGE) {
|
||||
|
@ -994,6 +998,7 @@ static int ucsi_register_port(struct ucsi *ucsi, int index)
|
|||
!!(con->status.flags & UCSI_CONSTAT_PWR_DIR));
|
||||
ucsi_pwr_opmode_change(con);
|
||||
ucsi_register_partner(con);
|
||||
ucsi_port_psy_changed(con);
|
||||
}
|
||||
|
||||
if (con->partner) {
|
||||
|
|
|
@ -340,9 +340,11 @@ int ucsi_resume(struct ucsi *ucsi);
|
|||
#if IS_ENABLED(CONFIG_POWER_SUPPLY)
|
||||
int ucsi_register_port_psy(struct ucsi_connector *con);
|
||||
void ucsi_unregister_port_psy(struct ucsi_connector *con);
|
||||
void ucsi_port_psy_changed(struct ucsi_connector *con);
|
||||
#else
|
||||
static inline int ucsi_register_port_psy(struct ucsi_connector *con) { return 0; }
|
||||
static inline void ucsi_unregister_port_psy(struct ucsi_connector *con) { }
|
||||
static inline void ucsi_port_psy_changed(struct ucsi_connector *con) { }
|
||||
#endif /* CONFIG_POWER_SUPPLY */
|
||||
|
||||
#if IS_ENABLED(CONFIG_TYPEC_DP_ALTMODE)
|
||||
|
|
Loading…
Reference in New Issue