* Re: [PATCH 0/4] USB: fix use-after-free on disconnect race
From: Johan Hovold @ 2026-06-23 8:29 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Juergen Stuber, Yue Sun, linux-usb, linux-kernel
In-Reply-To: <20260622152612.116422-1-johan@kernel.org>
On Mon, Jun 22, 2026 at 05:26:08PM +0200, Johan Hovold wrote:
> Mutexes cannot be used to manage lifetime of objects directly as the
> mutex structure is accessed by mutex_unlock() after releasing the lock.
> Johan Hovold (4):
> USB: iowarrior: fix use-after-free on disconnect race
> USB: idmouse: fix use-after-free on disconnect race
> USB: ldusb: fix use-after-free on disconnect race
> USB: legousbtower: fix use-after-free on disconnect race
I forgot to mention that these apply on top of:
https://lore.kernel.org/all/20260523170523.1074563-1-johan@kernel.org/
Johan
^ permalink raw reply
* [PATCH v2 4/4] USB: serial: mxuport: support RS485 mode configuration
From: Crescent Hsieh @ 2026-06-23 8:01 UTC (permalink / raw)
To: Johan Hovold, Greg Kroah-Hartman
Cc: linux-usb, linux-kernel, FangpingFP.Cheng, Epson.Chiang,
Crescent Hsieh
In-Reply-To: <20260623080138.166398-2-crescentcy.hsieh@moxa.com>
Add support for TIOCSRS485 and TIOCGRS485 so that userspace can
configure the serial interface mode using struct serial_rs485.
Map the serial_rs485 flags to the device interface modes as follows:
- RS232 = no flags set
- RS422 = SER_RS485_ENABLED | SER_RS485_MODE_RS422
- RS485_2W (half-duplex) = SER_RS485_ENABLED
- RS485_4W (full-duplex) = SER_RS485_ENABLED | SER_RS485_RX_DURING_TX
Unsupported flags and fields are cleared before applying the
configuration. Cache the sanitized per-port configuration and serialize
access with the per-port mutex.
Signed-off-by: Crescent Hsieh <crescentcy.hsieh@moxa.com>
---
drivers/usb/serial/mxuport.c | 98 +++++++++++++++++++++++++++++++++++-
1 file changed, 97 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/serial/mxuport.c b/drivers/usb/serial/mxuport.c
index f3be2b3bd95b..79085595345c 100644
--- a/drivers/usb/serial/mxuport.c
+++ b/drivers/usb/serial/mxuport.c
@@ -199,7 +199,8 @@ struct mxuport_port {
u8 hold_reason;
u8 mcr_state; /* Last MCR state */
u8 msr_state; /* Last MSR state */
- struct mutex mutex; /* Protects mcr_state */
+ struct serial_rs485 rs485;
+ struct mutex mutex; /* Protects per-port control state */
spinlock_t spinlock; /* Protects msr_state */
};
@@ -983,6 +984,100 @@ static int mxuport_tiocmget(struct tty_struct *tty)
return result;
}
+static void mxuport_sanitize_serial_rs485(struct serial_rs485 *rs485)
+{
+ if (!(rs485->flags & SER_RS485_ENABLED)) {
+ memset(rs485, 0, sizeof(*rs485));
+ return;
+ }
+
+ if (rs485->flags & SER_RS485_MODE_RS422)
+ rs485->flags &= SER_RS485_ENABLED | SER_RS485_MODE_RS422;
+ else
+ rs485->flags &= SER_RS485_ENABLED | SER_RS485_RX_DURING_TX;
+
+ rs485->delay_rts_before_send = 0;
+ rs485->delay_rts_after_send = 0;
+ memset(rs485->padding, 0, sizeof(rs485->padding));
+}
+
+static int mxuport_rs485_config(struct usb_serial_port *port,
+ const struct serial_rs485 *rs485)
+{
+ struct usb_serial *serial = port->serial;
+ u16 mode = MX_INT_RS232;
+
+ if (rs485->flags & SER_RS485_ENABLED) {
+ if (rs485->flags & SER_RS485_MODE_RS422)
+ mode = MX_INT_RS422;
+ else if (rs485->flags & SER_RS485_RX_DURING_TX)
+ mode = MX_INT_4W_RS485;
+ else
+ mode = MX_INT_2W_RS485;
+ }
+
+ return mxuport_send_ctrl_urb(serial, RQ_VENDOR_SET_INTERFACE, mode,
+ port->port_number);
+}
+
+static int mxuport_get_rs485_config(struct usb_serial_port *port,
+ struct serial_rs485 __user *argp)
+{
+ struct mxuport_port *mxport = usb_get_serial_port_data(port);
+ struct serial_rs485 rs485;
+
+ mutex_lock(&mxport->mutex);
+ rs485 = mxport->rs485;
+ mutex_unlock(&mxport->mutex);
+
+ if (copy_to_user(argp, &rs485, sizeof(rs485)))
+ return -EFAULT;
+
+ return 0;
+}
+
+static int mxuport_set_rs485_config(struct usb_serial_port *port,
+ struct serial_rs485 __user *argp)
+{
+ struct mxuport_port *mxport = usb_get_serial_port_data(port);
+ struct serial_rs485 rs485;
+ int err;
+
+ if (copy_from_user(&rs485, argp, sizeof(rs485)))
+ return -EFAULT;
+
+ mxuport_sanitize_serial_rs485(&rs485);
+
+ mutex_lock(&mxport->mutex);
+ err = mxuport_rs485_config(port, &rs485);
+ if (!err)
+ mxport->rs485 = rs485;
+ mutex_unlock(&mxport->mutex);
+ if (err)
+ return err;
+
+ if (copy_to_user(argp, &rs485, sizeof(rs485)))
+ return -EFAULT;
+
+ return 0;
+}
+
+static int mxuport_ioctl(struct tty_struct *tty, unsigned int cmd,
+ unsigned long arg)
+{
+ struct usb_serial_port *port = tty->driver_data;
+ void __user *argp = (void __user *)arg;
+
+ switch (cmd) {
+ case TIOCGRS485:
+ return mxuport_get_rs485_config(port, argp);
+ case TIOCSRS485:
+ return mxuport_set_rs485_config(port, argp);
+ }
+
+ return -ENOIOCTLCMD;
+}
+
static int mxuport_set_termios_flow(struct tty_struct *tty,
const struct ktermios *old_termios,
struct usb_serial_port *port,
@@ -1625,6 +1720,7 @@ static struct usb_serial_driver mxuport_device = {
.tx_empty = mxuport_tx_empty,
.write = mxuport_write,
.write_bulk_callback = mxuport_write_bulk_callback,
+ .ioctl = mxuport_ioctl,
.tiocmiwait = usb_serial_generic_tiocmiwait,
.get_icount = usb_serial_generic_get_icount,
.throttle = mxuport_throttle,
--
2.43.0
^ permalink raw reply related
* [PATCH v2 3/4] USB: serial: mxuport: handle SEND_NEXT transmit flow control
From: Crescent Hsieh @ 2026-06-23 8:01 UTC (permalink / raw)
To: Johan Hovold, Greg Kroah-Hartman
Cc: linux-usb, linux-kernel, FangpingFP.Cheng, Epson.Chiang,
Crescent Hsieh
In-Reply-To: <20260623080138.166398-2-crescentcy.hsieh@moxa.com>
The device uses the SEND_NEXT event to pace host-to-device transmission.
Without waiting for this event, continuous transmission on multiple
ports can make the driver submit bulk-out URBs faster than the device
can process them, which can result in data errors during burn-in
testing.
Stop submitting further write URBs after requesting SEND_NEXT and resume
transmission when the matching event is received.
This cannot be implemented by returning zero from
prepare_write_buffer(), as the generic write implementation expects the
callback to return a transfer length once data is available in the write
FIFO. Add a mxuport-specific write path so that URB submission can be
stopped and resumed explicitly.
This may reduce throughput, but avoids data errors under sustained
transmit load.
Signed-off-by: Crescent Hsieh <crescentcy.hsieh@moxa.com>
---
drivers/usb/serial/mxuport.c | 165 +++++++++++++++++++++++++++++++++--
1 file changed, 156 insertions(+), 9 deletions(-)
diff --git a/drivers/usb/serial/mxuport.c b/drivers/usb/serial/mxuport.c
index 067c8d9752e0..f3be2b3bd95b 100644
--- a/drivers/usb/serial/mxuport.c
+++ b/drivers/usb/serial/mxuport.c
@@ -147,6 +147,8 @@ static const u16 mxuport_mux50u_fw_ver_offsets[] = {
#define UPORT_EVENT_LSR 4 /* Line status */
#define UPORT_EVENT_MCR 5 /* Modem control */
+#define UPORT_REQUEST_SEND_NEXT 0x80
+
/* Definitions for serial event type */
#define SERIAL_EV_CTS 0x0008 /* CTS changed state */
#define SERIAL_EV_DSR 0x0010 /* DSR changed state */
@@ -193,6 +195,8 @@ static const u16 mxuport_mux50u_fw_ver_offsets[] = {
/* This structure holds all of the local port information */
struct mxuport_port {
+ u32 sent_payload;
+ u8 hold_reason;
u8 mcr_state; /* Last MCR state */
u8 msr_state; /* Last MSR state */
struct mutex mutex; /* Protects mcr_state */
@@ -276,22 +280,148 @@ MODULE_DEVICE_TABLE(usb, mxuport_idtable);
static int mxuport_prepare_write_buffer(struct usb_serial_port *port,
void *dest, size_t size)
{
+ struct mxuport_port *mxport = usb_get_serial_port_data(port);
u8 *buf = dest;
+ unsigned long flags;
+ bool request_send_next;
int count;
- count = kfifo_out_locked(&port->write_fifo, buf + HEADER_SIZE,
- size - HEADER_SIZE,
- &port->lock);
+ spin_lock_irqsave(&port->lock, flags);
+ count = kfifo_out(&port->write_fifo, buf + HEADER_SIZE,
+ size - HEADER_SIZE);
+ mxport->sent_payload += count;
+ request_send_next = mxport->sent_payload >= port->bulk_out_size;
+ if (request_send_next)
+ mxport->hold_reason |= MX_WAIT_FOR_SEND_NEXT;
+ spin_unlock_irqrestore(&port->lock, flags);
put_unaligned_be16(port->port_number, buf);
put_unaligned_be16(count, buf + 2);
+ if (request_send_next)
+ buf[0] |= UPORT_REQUEST_SEND_NEXT;
+
dev_dbg(&port->dev, "%s - size %zd count %d\n", __func__,
size, count);
return count + HEADER_SIZE;
}
+static int mxuport_write_start(struct usb_serial_port *port, gfp_t mem_flags)
+{
+ struct mxuport_port *mxport = usb_get_serial_port_data(port);
+ struct urb *urb;
+ unsigned long flags;
+ int i;
+ int count;
+ int result;
+
+ if (test_and_set_bit_lock(USB_SERIAL_WRITE_BUSY, &port->flags))
+ return 0;
+retry:
+ spin_lock_irqsave(&port->lock, flags);
+ if ((mxport->hold_reason & MX_WAIT_FOR_SEND_NEXT) ||
+ !port->write_urbs_free || !kfifo_len(&port->write_fifo)) {
+ clear_bit_unlock(USB_SERIAL_WRITE_BUSY, &port->flags);
+ spin_unlock_irqrestore(&port->lock, flags);
+ return 0;
+ }
+
+ i = (int)find_first_bit(&port->write_urbs_free,
+ ARRAY_SIZE(port->write_urbs));
+ spin_unlock_irqrestore(&port->lock, flags);
+
+ urb = port->write_urbs[i];
+ count = mxuport_prepare_write_buffer(port, urb->transfer_buffer,
+ port->bulk_out_size);
+ urb->transfer_buffer_length = count;
+ usb_serial_debug_data(&port->dev, __func__, count,
+ urb->transfer_buffer);
+
+ spin_lock_irqsave(&port->lock, flags);
+ port->tx_bytes += count;
+ spin_unlock_irqrestore(&port->lock, flags);
+
+ clear_bit(i, &port->write_urbs_free);
+ result = usb_submit_urb(urb, mem_flags);
+ if (result) {
+ dev_err_console(port, "%s - error submitting urb: %d\n",
+ __func__, result);
+ set_bit(i, &port->write_urbs_free);
+ spin_lock_irqsave(&port->lock, flags);
+ port->tx_bytes -= count;
+ if (mxport->hold_reason & MX_WAIT_FOR_SEND_NEXT) {
+ mxport->hold_reason &= ~MX_WAIT_FOR_SEND_NEXT;
+ mxport->sent_payload = 0;
+ }
+ spin_unlock_irqrestore(&port->lock, flags);
+
+ clear_bit_unlock(USB_SERIAL_WRITE_BUSY, &port->flags);
+ return result;
+ }
+
+ goto retry;
+}
+
+static int mxuport_write(struct tty_struct *tty, struct usb_serial_port *port,
+ const unsigned char *buf, int count)
+{
+ int result;
+
+ if (!port->bulk_out_size)
+ return -ENODEV;
+
+ if (!count)
+ return 0;
+
+ count = kfifo_in_locked(&port->write_fifo, buf, count, &port->lock);
+ result = mxuport_write_start(port, GFP_ATOMIC);
+ if (result)
+ return result;
+
+ return count;
+}
+
+static void mxuport_write_bulk_callback(struct urb *urb)
+{
+ struct usb_serial_port *port = urb->context;
+ unsigned long flags;
+ int status = urb->status;
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(port->write_urbs); ++i) {
+ if (port->write_urbs[i] == urb)
+ break;
+ }
+
+ spin_lock_irqsave(&port->lock, flags);
+ port->tx_bytes -= urb->transfer_buffer_length;
+ set_bit(i, &port->write_urbs_free);
+ spin_unlock_irqrestore(&port->lock, flags);
+
+ switch (status) {
+ case 0:
+ break;
+ case -ENOENT:
+ case -ECONNRESET:
+ case -ESHUTDOWN:
+ dev_dbg(&port->dev, "%s - urb stopped: %d\n", __func__,
+ status);
+ return;
+ case -EPIPE:
+ dev_err_console(port, "%s - urb stopped: %d\n", __func__,
+ status);
+ return;
+ default:
+ dev_err_console(port, "%s - nonzero urb status: %d\n",
+ __func__, status);
+ break;
+ }
+
+ mxuport_write_start(port, GFP_ATOMIC);
+ usb_serial_port_softint(port);
+}
+
/* Read the given buffer in from the control pipe. */
static int mxuport_recv_ctrl_urb(struct usb_serial *serial,
u8 request, u16 value, u16 index,
@@ -510,14 +640,24 @@ static void mxuport_lsr_event(struct usb_serial_port *port, u8 buf[4])
static void mxuport_process_read_urb_event(struct usb_serial_port *port,
u8 buf[4], u32 event)
{
+ struct mxuport_port *mxport = usb_get_serial_port_data(port);
+ unsigned long flags;
+ bool resume_tx = false;
+
dev_dbg(&port->dev, "%s - receive event : %04x\n", __func__, event);
switch (event) {
case UPORT_EVENT_SEND_NEXT:
- /*
- * Sent as part of the flow control on device buffers.
- * Not currently used.
- */
+ spin_lock_irqsave(&port->lock, flags);
+ if (mxport->hold_reason & MX_WAIT_FOR_SEND_NEXT) {
+ mxport->hold_reason &= ~MX_WAIT_FOR_SEND_NEXT;
+ mxport->sent_payload = 0;
+ resume_tx = true;
+ }
+ spin_unlock_irqrestore(&port->lock, flags);
+
+ if (resume_tx)
+ mxuport_write_start(port, GFP_ATOMIC);
break;
case UPORT_EVENT_MSR:
mxuport_msr_event(port, buf);
@@ -1372,6 +1512,7 @@ static int mxuport_open(struct tty_struct *tty, struct usb_serial_port *port)
{
struct mxuport_port *mxport = usb_get_serial_port_data(port);
struct usb_serial *serial = port->serial;
+ unsigned long flags;
int err;
/* Set receive host (enable) */
@@ -1396,6 +1537,11 @@ static int mxuport_open(struct tty_struct *tty, struct usb_serial_port *port)
* TODO: use RQ_VENDOR_GET_MSR, once we know what it
* returns.
*/
+ spin_lock_irqsave(&port->lock, flags);
+ mxport->sent_payload = 0;
+ mxport->hold_reason &= ~MX_WAIT_FOR_SEND_NEXT;
+ spin_unlock_irqrestore(&port->lock, flags);
+
mxport->msr_state = 0;
return err;
@@ -1451,7 +1597,7 @@ static int mxuport_resume(struct usb_serial *serial)
if (!tty_port_initialized(&port->port))
continue;
- r = usb_serial_generic_write_start(port, GFP_NOIO);
+ r = mxuport_write_start(port, GFP_NOIO);
if (r < 0)
c++;
}
@@ -1477,6 +1623,8 @@ static struct usb_serial_driver mxuport_device = {
.set_termios = mxuport_set_termios,
.break_ctl = mxuport_break_ctl,
.tx_empty = mxuport_tx_empty,
+ .write = mxuport_write,
+ .write_bulk_callback = mxuport_write_bulk_callback,
.tiocmiwait = usb_serial_generic_tiocmiwait,
.get_icount = usb_serial_generic_get_icount,
.throttle = mxuport_throttle,
@@ -1485,7 +1633,6 @@ static struct usb_serial_driver mxuport_device = {
.tiocmset = mxuport_tiocmset,
.dtr_rts = mxuport_dtr_rts,
.process_read_urb = mxuport_process_read_urb,
- .prepare_write_buffer = mxuport_prepare_write_buffer,
.resume = mxuport_resume,
};
--
2.43.0
^ permalink raw reply related
* [PATCH v2 2/4] USB: serial: mxuport: add MUX50U-based device support
From: Crescent Hsieh @ 2026-06-23 8:01 UTC (permalink / raw)
To: Johan Hovold, Greg Kroah-Hartman
Cc: linux-usb, linux-kernel, FangpingFP.Cheng, Epson.Chiang,
Crescent Hsieh
In-Reply-To: <20260623080138.166398-2-crescentcy.hsieh@moxa.com>
Add support for MUX50U-based UPort G2 devices and Platform UARTs.
Encode the firmware family in the USB device id table so that the table
remains the single source for both the number of ports and the firmware
handling policy.
The MUX50U-based devices use two shared firmware images: UPort G2
devices use the UP firmware image (moxa-up-mux50u.fw), while Platform
UARTs use the PF firmware image (moxa-pf-mux50u.fw). Platform UARTs are
board-level UARTs accessed through the USB bus.
For MUX50U-based devices, the factory firmware reports versions in a
different format from the bundled runtime firmware image, so version
comparison cannot reliably determine whether a firmware download is
needed. The system-register remap state is used instead to check whether
the device has already booted the runtime firmware from SRAM.
Signed-off-by: Crescent Hsieh <crescentcy.hsieh@moxa.com>
---
drivers/usb/serial/mxuport.c | 174 ++++++++++++++++++++++++++++++++---
1 file changed, 162 insertions(+), 12 deletions(-)
diff --git a/drivers/usb/serial/mxuport.c b/drivers/usb/serial/mxuport.c
index 5a9dd251ceff..067c8d9752e0 100644
--- a/drivers/usb/serial/mxuport.c
+++ b/drivers/usb/serial/mxuport.c
@@ -7,8 +7,11 @@
*
* Supports the following Moxa USB to serial converters:
* 2 ports : UPort 1250, UPort 1250I
+ * UPort 1250 G2, UPort 1250I G2
* 4 ports : UPort 1410, UPort 1450, UPort 1450I
+ * UPort 1410 G2, UPort 1450 G2, UPort 1450I G2
* 8 ports : UPort 1610-8, UPort 1650-8
+ * UPort 1610-8 G2, UPort 1650-8 G2
* 16 ports : UPort 1610-16, UPort 1650-16
*/
@@ -37,6 +40,24 @@
#define MX_UPORT1613_PID 0x1613
#define MX_UPORT1653_PID 0x1653
+#define MX_UPORT1252_PID 0x1252
+#define MX_UPORT1253_PID 0x1253
+#define MX_UPORT1411_PID 0x1411
+#define MX_UPORT1452_PID 0x1452
+#define MX_UPORT1453_PID 0x1453
+#define MX_UPORT1619_PID 0x1619
+#define MX_UPORT1659_PID 0x1659
+#define MX_UPORT165A_PID 0x165a
+#define MX_UPORT165B_PID 0x165b
+
+#define MX_MU250U_PID 0x0250
+#define MX_MU450U_PID 0x0450
+#define MX_MU850U_PID 0x0850
+#define MX_MU850U_6PORT_PID 0x7002
+#define MX_MUX50U_3PORT_PID 0x7003
+#define MX_MU850U_5PORT_PID 0x7004
+#define MX_MU850U_7PORT_PID 0x7005
+
/* Definitions for USB info */
#define HEADER_SIZE 4
#define EVENT_LENGTH 8
@@ -46,6 +67,13 @@
#define MX_FW_VER_BYTE1_OFF 0x20
#define MX_FW_VER_BYTE2_OFF 0x24
#define MX_FW_VER_BYTE3_OFF 0x28
+#define MX_MUX50U_FW_VER_BYTE1_OFF 0x86
+#define MX_MUX50U_FW_VER_BYTE2_OFF 0x88
+#define MX_MUX50U_FW_VER_BYTE3_OFF 0x8a
+
+#define MX_SYS_REG_REMAP_OFF 0x20
+#define MX_PWR_REMAP_MASK 0x03
+#define MX_REMAP_TO_SRAM 0x02
struct mxuport_fw_version {
u8 major;
@@ -60,6 +88,12 @@ static const u16 mxuport_fw_ver_offsets[] = {
MX_FW_VER_BYTE3_OFF,
};
+static const u16 mxuport_mux50u_fw_ver_offsets[] = {
+ MX_MUX50U_FW_VER_BYTE1_OFF,
+ MX_MUX50U_FW_VER_BYTE2_OFF,
+ MX_MUX50U_FW_VER_BYTE3_OFF,
+};
+
/* Definitions for USB vendor request */
#define RQ_VENDOR_NONE 0x00
#define RQ_VENDOR_SET_BAUD 0x01 /* Set baud rate */
@@ -95,6 +129,7 @@ static const u16 mxuport_fw_ver_offsets[] = {
#define RQ_VENDOR_RESET_DEVICE 0x23 /* Try to reset the device */
#define RQ_VENDOR_QUERY_FW_CONFIG 0x24
+#define RQ_VENDOR_GET_SYS_REG 0x34
#define RQ_VENDOR_GET_VERSION 0x81 /* Get firmware version */
#define RQ_VENDOR_GET_PAGE 0x82 /* Read flash page */
#define RQ_VENDOR_GET_ROM_PROC 0x83 /* Get ROM process state */
@@ -169,26 +204,65 @@ struct mxuport_port {
#define MX_PORTS_OFFSET 1
#define MX_PORTS(n) (((n) - MX_PORTS_OFFSET) & MX_PORTS_MASK)
+#define MX_FW_FAMILY_MASK GENMASK(5, 4)
+#define MX_FW_UPORT_G1 (0 << 4)
+#define MX_FW_UPORT_G2 (1 << 4)
+#define MX_FW_PLATFORM_UART (2 << 4)
+#define MX_FW_FAMILY(info) ((info) & MX_FW_FAMILY_MASK)
+#define MX_DEVICE_INFO(ports, family) (MX_PORTS(ports) | (family))
+
/* Table of devices that work with this driver */
static const struct usb_device_id mxuport_idtable[] = {
{ USB_DEVICE(MX_USBSERIAL_VID, MX_UPORT1250_PID),
- .driver_info = MX_PORTS(2) },
+ .driver_info = MX_DEVICE_INFO(2, MX_FW_UPORT_G1) },
{ USB_DEVICE(MX_USBSERIAL_VID, MX_UPORT1251_PID),
- .driver_info = MX_PORTS(2) },
+ .driver_info = MX_DEVICE_INFO(2, MX_FW_UPORT_G1) },
{ USB_DEVICE(MX_USBSERIAL_VID, MX_UPORT1410_PID),
- .driver_info = MX_PORTS(4) },
+ .driver_info = MX_DEVICE_INFO(4, MX_FW_UPORT_G1) },
{ USB_DEVICE(MX_USBSERIAL_VID, MX_UPORT1450_PID),
- .driver_info = MX_PORTS(4) },
+ .driver_info = MX_DEVICE_INFO(4, MX_FW_UPORT_G1) },
{ USB_DEVICE(MX_USBSERIAL_VID, MX_UPORT1451_PID),
- .driver_info = MX_PORTS(4) },
+ .driver_info = MX_DEVICE_INFO(4, MX_FW_UPORT_G1) },
{ USB_DEVICE(MX_USBSERIAL_VID, MX_UPORT1618_PID),
- .driver_info = MX_PORTS(8) },
+ .driver_info = MX_DEVICE_INFO(8, MX_FW_UPORT_G1) },
{ USB_DEVICE(MX_USBSERIAL_VID, MX_UPORT1658_PID),
- .driver_info = MX_PORTS(8) },
+ .driver_info = MX_DEVICE_INFO(8, MX_FW_UPORT_G1) },
{ USB_DEVICE(MX_USBSERIAL_VID, MX_UPORT1613_PID),
- .driver_info = MX_PORTS(16) },
+ .driver_info = MX_DEVICE_INFO(16, MX_FW_UPORT_G1) },
{ USB_DEVICE(MX_USBSERIAL_VID, MX_UPORT1653_PID),
- .driver_info = MX_PORTS(16) },
+ .driver_info = MX_DEVICE_INFO(16, MX_FW_UPORT_G1) },
+ { USB_DEVICE(MX_USBSERIAL_VID, MX_UPORT1252_PID),
+ .driver_info = MX_DEVICE_INFO(2, MX_FW_UPORT_G2) },
+ { USB_DEVICE(MX_USBSERIAL_VID, MX_UPORT1253_PID),
+ .driver_info = MX_DEVICE_INFO(2, MX_FW_UPORT_G2) },
+ { USB_DEVICE(MX_USBSERIAL_VID, MX_UPORT1411_PID),
+ .driver_info = MX_DEVICE_INFO(4, MX_FW_UPORT_G2) },
+ { USB_DEVICE(MX_USBSERIAL_VID, MX_UPORT1452_PID),
+ .driver_info = MX_DEVICE_INFO(4, MX_FW_UPORT_G2) },
+ { USB_DEVICE(MX_USBSERIAL_VID, MX_UPORT1453_PID),
+ .driver_info = MX_DEVICE_INFO(4, MX_FW_UPORT_G2) },
+ { USB_DEVICE(MX_USBSERIAL_VID, MX_UPORT1619_PID),
+ .driver_info = MX_DEVICE_INFO(8, MX_FW_UPORT_G2) },
+ { USB_DEVICE(MX_USBSERIAL_VID, MX_UPORT1659_PID),
+ .driver_info = MX_DEVICE_INFO(8, MX_FW_UPORT_G2) },
+ { USB_DEVICE(MX_USBSERIAL_VID, MX_UPORT165A_PID),
+ .driver_info = MX_DEVICE_INFO(8, MX_FW_UPORT_G2) },
+ { USB_DEVICE(MX_USBSERIAL_VID, MX_UPORT165B_PID),
+ .driver_info = MX_DEVICE_INFO(8, MX_FW_UPORT_G2) },
+ { USB_DEVICE(MX_USBSERIAL_VID, MX_MU250U_PID),
+ .driver_info = MX_DEVICE_INFO(2, MX_FW_PLATFORM_UART) },
+ { USB_DEVICE(MX_USBSERIAL_VID, MX_MU450U_PID),
+ .driver_info = MX_DEVICE_INFO(4, MX_FW_PLATFORM_UART) },
+ { USB_DEVICE(MX_USBSERIAL_VID, MX_MU850U_PID),
+ .driver_info = MX_DEVICE_INFO(8, MX_FW_PLATFORM_UART) },
+ { USB_DEVICE(MX_USBSERIAL_VID, MX_MU850U_6PORT_PID),
+ .driver_info = MX_DEVICE_INFO(6, MX_FW_PLATFORM_UART) },
+ { USB_DEVICE(MX_USBSERIAL_VID, MX_MUX50U_3PORT_PID),
+ .driver_info = MX_DEVICE_INFO(3, MX_FW_PLATFORM_UART) },
+ { USB_DEVICE(MX_USBSERIAL_VID, MX_MU850U_5PORT_PID),
+ .driver_info = MX_DEVICE_INFO(5, MX_FW_PLATFORM_UART) },
+ { USB_DEVICE(MX_USBSERIAL_VID, MX_MU850U_7PORT_PID),
+ .driver_info = MX_DEVICE_INFO(7, MX_FW_PLATFORM_UART) },
{} /* Terminating entry */
};
@@ -1005,6 +1079,68 @@ static int mxuport_parse_fw_version(const struct firmware *fw,
return 0;
}
+static const u16 *mxuport_fw_version_offsets(unsigned long features)
+{
+ switch (MX_FW_FAMILY(features)) {
+ case MX_FW_UPORT_G2:
+ case MX_FW_PLATFORM_UART:
+ return mxuport_mux50u_fw_ver_offsets;
+ default:
+ return mxuport_fw_ver_offsets;
+ }
+}
+
+static void mxuport_get_fw_name(unsigned long features, u16 productid,
+ char *buf, size_t size)
+{
+ switch (MX_FW_FAMILY(features)) {
+ case MX_FW_UPORT_G2:
+ strscpy(buf, "moxa/moxa-up-mux50u.fw", size);
+ break;
+ case MX_FW_PLATFORM_UART:
+ strscpy(buf, "moxa/moxa-pf-mux50u.fw", size);
+ break;
+ default:
+ snprintf(buf, size, "moxa/moxa-%04x.fw", productid);
+ break;
+ }
+}
+
+static bool mxuport_is_mux50u_device(unsigned long features)
+{
+ switch (MX_FW_FAMILY(features)) {
+ case MX_FW_UPORT_G2:
+ case MX_FW_PLATFORM_UART:
+ return true;
+ default:
+ return false;
+ }
+}
+
+static int mxuport_fw_running_from_sram(struct usb_serial *serial,
+ bool *from_sram)
+{
+ u8 *buf;
+ u32 reg;
+ int err;
+
+ buf = kzalloc(4, GFP_KERNEL);
+ if (!buf)
+ return -ENOMEM;
+
+ err = mxuport_recv_ctrl_urb(serial, RQ_VENDOR_GET_SYS_REG,
+ MX_SYS_REG_REMAP_OFF, 0, buf, 4);
+ if (err != 4)
+ goto out;
+
+ reg = get_unaligned_be32(buf);
+ *from_sram = (((reg >> 24) & MX_PWR_REMAP_MASK) == MX_REMAP_TO_SRAM);
+ err = 0;
+out:
+ kfree(buf);
+ return err;
+}
+
/* Get the version of the firmware currently running. */
static int mxuport_get_fw_version(struct usb_serial *serial,
struct mxuport_fw_version *version)
@@ -1083,9 +1219,12 @@ static int mxuport_download_fw(struct usb_serial *serial,
static int mxuport_probe(struct usb_serial *serial,
const struct usb_device_id *id)
{
+ unsigned long features = id->driver_info;
+ const u16 *fw_version_offsets;
u16 productid = le16_to_cpu(serial->dev->descriptor.idProduct);
const struct firmware *fw_p = NULL;
struct mxuport_fw_version version, local_ver;
+ bool download_fw, from_sram;
char buf[32];
int err;
@@ -1103,7 +1242,8 @@ static int mxuport_probe(struct usb_serial *serial,
dev_dbg(&serial->interface->dev, "Device firmware version v%u.%u.%u\n",
version.major, version.minor, version.build);
- snprintf(buf, sizeof(buf) - 1, "moxa/moxa-%04x.fw", productid);
+ fw_version_offsets = mxuport_fw_version_offsets(features);
+ mxuport_get_fw_name(features, productid, buf, sizeof(buf));
err = request_firmware(&fw_p, buf, &serial->interface->dev);
if (err) {
@@ -1113,7 +1253,7 @@ static int mxuport_probe(struct usb_serial *serial,
/* Use the firmware already in the device */
err = 0;
} else {
- err = mxuport_parse_fw_version(fw_p, mxuport_fw_ver_offsets,
+ err = mxuport_parse_fw_version(fw_p, fw_version_offsets,
&local_ver);
if (err)
goto out;
@@ -1122,7 +1262,17 @@ static int mxuport_probe(struct usb_serial *serial,
"Available firmware version v%u.%u.%u\n",
local_ver.major, local_ver.minor, local_ver.build);
- if (local_ver.value > version.value) {
+ if (mxuport_is_mux50u_device(features)) {
+ err = mxuport_fw_running_from_sram(serial, &from_sram);
+ if (err)
+ goto out;
+
+ download_fw = !from_sram;
+ } else {
+ download_fw = local_ver.value > version.value;
+ }
+
+ if (download_fw) {
err = mxuport_download_fw(serial, fw_p);
if (err)
goto out;
--
2.43.0
^ permalink raw reply related
* [PATCH v2 1/4] USB: serial: mxuport: clean up firmware version handling
From: Crescent Hsieh @ 2026-06-23 8:01 UTC (permalink / raw)
To: Johan Hovold, Greg Kroah-Hartman
Cc: linux-usb, linux-kernel, FangpingFP.Cheng, Epson.Chiang,
Crescent Hsieh
In-Reply-To: <20260623080138.166398-2-crescentcy.hsieh@moxa.com>
Add a small helper for parsing firmware versions and use it for the
bundled firmware image. This avoids open-coded firmware image offsets
in probe() and validates the image size before reading the version
bytes.
Keep the existing version comparison policy unchanged, but store the
version components explicitly so that the version can be printed
without unpacking a raw integer.
Print the firmware version fields in decimal, as these fields represent
readable version components rather than hexadecimal values.
Signed-off-by: Crescent Hsieh <crescentcy.hsieh@moxa.com>
---
drivers/usb/serial/mxuport.c | 81 +++++++++++++++++++++++++-----------
1 file changed, 57 insertions(+), 24 deletions(-)
diff --git a/drivers/usb/serial/mxuport.c b/drivers/usb/serial/mxuport.c
index e3c5a1b97542..5a9dd251ceff 100644
--- a/drivers/usb/serial/mxuport.c
+++ b/drivers/usb/serial/mxuport.c
@@ -43,9 +43,22 @@
#define DOWN_BLOCK_SIZE 64
/* Definitions for firmware info */
-#define VER_ADDR_1 0x20
-#define VER_ADDR_2 0x24
-#define VER_ADDR_3 0x28
+#define MX_FW_VER_BYTE1_OFF 0x20
+#define MX_FW_VER_BYTE2_OFF 0x24
+#define MX_FW_VER_BYTE3_OFF 0x28
+
+struct mxuport_fw_version {
+ u8 major;
+ u8 minor;
+ u8 build;
+ u32 value;
+};
+
+static const u16 mxuport_fw_ver_offsets[] = {
+ MX_FW_VER_BYTE1_OFF,
+ MX_FW_VER_BYTE2_OFF,
+ MX_FW_VER_BYTE3_OFF,
+};
/* Definitions for USB vendor request */
#define RQ_VENDOR_NONE 0x00
@@ -82,7 +95,6 @@
#define RQ_VENDOR_RESET_DEVICE 0x23 /* Try to reset the device */
#define RQ_VENDOR_QUERY_FW_CONFIG 0x24
-
#define RQ_VENDOR_GET_VERSION 0x81 /* Get firmware version */
#define RQ_VENDOR_GET_PAGE 0x82 /* Read flash page */
#define RQ_VENDOR_GET_ROM_PROC 0x83 /* Get ROM process state */
@@ -970,8 +982,32 @@ static int mxuport_calc_num_ports(struct usb_serial *serial,
return num_ports;
}
+static void mxuport_set_fw_version(struct mxuport_fw_version *version,
+ u8 major, u8 minor, u8 build)
+{
+ version->major = major;
+ version->minor = minor;
+ version->build = build;
+ version->value = (major << 16) | (minor << 8) | build;
+}
+
+static int mxuport_parse_fw_version(const struct firmware *fw,
+ const u16 *offsets,
+ struct mxuport_fw_version *version)
+{
+ if (fw->size <= offsets[0] || fw->size <= offsets[1] ||
+ fw->size <= offsets[2])
+ return -EINVAL;
+
+ mxuport_set_fw_version(version, fw->data[offsets[0]],
+ fw->data[offsets[1]], fw->data[offsets[2]]);
+
+ return 0;
+}
+
/* Get the version of the firmware currently running. */
-static int mxuport_get_fw_version(struct usb_serial *serial, u32 *version)
+static int mxuport_get_fw_version(struct usb_serial *serial,
+ struct mxuport_fw_version *version)
{
u8 *ver_buf;
int err;
@@ -988,7 +1024,7 @@ static int mxuport_get_fw_version(struct usb_serial *serial, u32 *version)
goto out;
}
- *version = (ver_buf[0] << 16) | (ver_buf[1] << 8) | ver_buf[2];
+ mxuport_set_fw_version(version, ver_buf[0], ver_buf[1], ver_buf[2]);
err = 0;
out:
kfree(ver_buf);
@@ -1049,8 +1085,7 @@ static int mxuport_probe(struct usb_serial *serial,
{
u16 productid = le16_to_cpu(serial->dev->descriptor.idProduct);
const struct firmware *fw_p = NULL;
- u32 version;
- int local_ver;
+ struct mxuport_fw_version version, local_ver;
char buf[32];
int err;
@@ -1065,10 +1100,8 @@ static int mxuport_probe(struct usb_serial *serial,
if (err < 0)
return err;
- dev_dbg(&serial->interface->dev, "Device firmware version v%x.%x.%x\n",
- (version & 0xff0000) >> 16,
- (version & 0xff00) >> 8,
- (version & 0xff));
+ dev_dbg(&serial->interface->dev, "Device firmware version v%u.%u.%u\n",
+ version.major, version.minor, version.build);
snprintf(buf, sizeof(buf) - 1, "moxa/moxa-%04x.fw", productid);
@@ -1080,28 +1113,28 @@ static int mxuport_probe(struct usb_serial *serial,
/* Use the firmware already in the device */
err = 0;
} else {
- local_ver = ((fw_p->data[VER_ADDR_1] << 16) |
- (fw_p->data[VER_ADDR_2] << 8) |
- fw_p->data[VER_ADDR_3]);
+ err = mxuport_parse_fw_version(fw_p, mxuport_fw_ver_offsets,
+ &local_ver);
+ if (err)
+ goto out;
+
dev_dbg(&serial->interface->dev,
- "Available firmware version v%x.%x.%x\n",
- fw_p->data[VER_ADDR_1], fw_p->data[VER_ADDR_2],
- fw_p->data[VER_ADDR_3]);
- if (local_ver > version) {
+ "Available firmware version v%u.%u.%u\n",
+ local_ver.major, local_ver.minor, local_ver.build);
+
+ if (local_ver.value > version.value) {
err = mxuport_download_fw(serial, fw_p);
if (err)
goto out;
- err = mxuport_get_fw_version(serial, &version);
+ err = mxuport_get_fw_version(serial, &version);
if (err < 0)
goto out;
}
}
dev_info(&serial->interface->dev,
- "Using device firmware version v%x.%x.%x\n",
- (version & 0xff0000) >> 16,
- (version & 0xff00) >> 8,
- (version & 0xff));
+ "Using device firmware version v%u.%u.%u\n",
+ version.major, version.minor, version.build);
/*
* Contains the features of this hardware. Store away for
--
2.43.0
^ permalink raw reply related
* [PATCH v2 0/4] USB: serial: mxuport: add MUX50U support and updates
From: Crescent Hsieh @ 2026-06-23 8:01 UTC (permalink / raw)
To: Johan Hovold, Greg Kroah-Hartman
Cc: linux-usb, linux-kernel, FangpingFP.Cheng, Epson.Chiang,
Crescent Hsieh
This series updates the mxuport driver to support MUX50U-based devices
and fixes a few device-specific runtime behaviours.
The first two patches clean up firmware version handling and add support
for UPort G2 and Platform UART devices. The firmware family is encoded in
the USB device-id table so that the table remains the single source for
both port count and firmware handling policy.
The third patch adds SEND_NEXT handling to pace host-to-device
transmission. The fourth patch adds RS485 mode configuration through the
standard TIOCSRS485/TIOCGRS485 interface.
Changes in v2:
- [PATCH v1 1/4]:
Split into [PATCH v2 1/4] and [PATCH v2 2/4]. Clean up firmware
version parsing and printing in the first patch, and move MUX50U
device support to the second patch. Encode the firmware family in
the USB device-id table and use the system-register remap state for
the MUX50U firmware download decision.
- [PATCH v1 2/4]:
Moved to [PATCH v2 3/4]. Add mxuport-specific write(), write_start(),
and write_bulk_callback() paths so SEND_NEXT can stop and resume
transmission without returning zero from prepare_write_buffer().
Drop the open-time FIFO flush.
- [PATCH v1 3/4]:
Moved to [PATCH v2 4/4]. Clear unsupported serial_rs485 flags and
fields, cache the sanitized configuration, and protect it with the
per-port mutex.
- [PATCH v1 4/4]:
Drop the UART FIFO sysfs interface from this revision.
v1: https://lore.kernel.org/all/20260324035041.352190-1-crescentcy.hsieh@moxa.com/
Crescent Hsieh (4):
USB: serial: mxuport: clean up firmware version handling
USB: serial: mxuport: add MUX50U-based device support
USB: serial: mxuport: handle SEND_NEXT transmit flow control
USB: serial: mxuport: support RS485 mode configuration
drivers/usb/serial/mxuport.c | 514 ++++++++++++++++++++++++++++++++---
1 file changed, 470 insertions(+), 44 deletions(-)
--
2.43.0
^ permalink raw reply
* [PATCH v3 2/2] USB: serial: ftdi_sio: make explicit latency_timer sysfs write authoritative
From: Chinna Mopurigari Naveen Kumar Reddy @ 2026-06-23 8:03 UTC (permalink / raw)
To: Johan Hovold, Greg Kroah-Hartman; +Cc: linux-usb, linux-kernel, Arun Pappan
In-Reply-To: <cover.1782201674.git.naveen.reddy@ftdichip.com>
write_latency_timer() clamps the value programmed into the FT chip's
per-channel latency_timer register to 1 whenever ASYNC_LOW_LATENCY is
set in priv->flags. ASYNC_LOW_LATENCY is set by userspace via
TIOCSSERIAL, used by setserial(8), libftdi and certain tcsetattr
paths. The interaction with the existing sysfs latency_timer
attribute is surprising: once any of those tools has set the flag, a
later write of "16" (or any other value) to
/sys/bus/usb-serial/devices/ttyUSBx/latency_timer is silently
clamped to 1 and never reaches the chip.
The store path is the most explicit way userspace can ask for a
particular latency_timer value; treat it as authoritative. On an
explicit sysfs write, clear ASYNC_LOW_LATENCY before calling
write_latency_timer() so the requested value is what the chip
register actually receives. The override is logged at debug level
(dev_dbg) for diagnostics only.
Reads continue to honour ASYNC_LOW_LATENCY (returning "1") so any
userspace that previously inspected the attribute to confirm
low-latency mode keeps working until it does its own explicit write.
Signed-off-by: Chinna Mopurigari Naveen Kumar Reddy <naveen.reddy@ftdichip.com>
---
drivers/usb/serial/ftdi_sio.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 7aaa7fc1be71..d2547ad76423 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -1683,6 +1683,23 @@ static ssize_t latency_timer_store(struct device *dev,
if (kstrtou8(valbuf, 10, &v))
return -EINVAL;
+ /*
+ * An explicit sysfs write wins over the legacy ASYNC_LOW_LATENCY
+ * tty-flag override. Without this, if any userspace tool
+ * (setserial(8), libftdi, certain tcsetattr paths) had set
+ * ASYNC_LOW_LATENCY via TIOCSSERIAL, write_latency_timer() would
+ * silently clamp the chip register to 1 regardless of what was
+ * written to sysfs. Clearing the flag here makes sysfs the
+ * authoritative source so the next chip-side write uses exactly
+ * the value the caller asked for.
+ */
+ if (priv->flags & ASYNC_LOW_LATENCY) {
+ dev_dbg(&port->dev,
+ "explicit latency_timer=%u clears ASYNC_LOW_LATENCY flag\n",
+ v);
+ priv->flags &= ~ASYNC_LOW_LATENCY;
+ }
+
priv->latency = v;
rv = write_latency_timer(port);
if (rv < 0)
--
2.43.0
^ permalink raw reply related
* [PATCH v3 1/2] USB: serial: ftdi_sio: retry transient errors on chip-side control transfers
From: Chinna Mopurigari Naveen Kumar Reddy @ 2026-06-23 8:03 UTC (permalink / raw)
To: Johan Hovold, Greg Kroah-Hartman; +Cc: linux-usb, linux-kernel, Arun Pappan
In-Reply-To: <cover.1782201674.git.naveen.reddy@ftdichip.com>
usb_control_msg() can return -ETIMEDOUT, -EPIPE or -EPROTO on a
functioning device when the host controller is momentarily unable to
complete the transfer. These are transient conditions that surface
under heavy USB bus load -- for example when several high-baud FTDI
channels share a busy host controller -- and a short retry generally
succeeds.
When such an error happens during a one-shot userspace operation such
as a sysfs write to /sys/bus/usb-serial/devices/ttyUSBx/latency_timer,
the write fails back to userspace with -EIO and the chip's per-channel
latency timer register is left unchanged, even though the device is
healthy and the next attempt would have worked.
Introduce a small helper, ftdi_send_request(), that wraps
usb_control_msg() with up to FTDI_CONTROL_RETRIES attempts on these
documented transient errno values, separated by
FTDI_CONTROL_RETRY_DELAY_MS. Non-transient errors are returned
immediately, as before. Each retry is logged with dev_warn() so the
underlying bus condition stays visible in dmesg.
Convert write_latency_timer() to use the helper. Only this site is
converted, as it is the one where a transient failure has a directly
userspace-visible effect; other chip-side control transfers are left
unchanged.
Signed-off-by: Chinna Mopurigari Naveen Kumar Reddy <naveen.reddy@ftdichip.com>
---
drivers/usb/serial/ftdi_sio.c | 48 ++++++++++++++++++++++++++++++-----
1 file changed, 41 insertions(+), 7 deletions(-)
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index af14548fa03d..7aaa7fc1be71 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -30,6 +30,7 @@
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/slab.h>
+#include <linux/delay.h>
#include <linux/tty.h>
#include <linux/tty_driver.h>
#include <linux/tty_flip.h>
@@ -1363,10 +1364,46 @@ static int change_speed(struct tty_struct *tty, struct usb_serial_port *port)
return rv;
}
+/*
+ * Send a chip-side control request, retrying transient bus errors.
+ *
+ * On a healthy device, usb_control_msg() can still return -ETIMEDOUT,
+ * -EPIPE or -EPROTO when the host controller is under heavy load --
+ * for example multiple high-baud FTDI channels sharing a host
+ * controller with limited DMA-channel fairness. Failing a single
+ * one-shot configuration (e.g. a sysfs latency_timer write) to the
+ * caller as -EIO in that situation is unhelpful: the next attempt
+ * usually succeeds. Retry a small number of times before giving up.
+ */
+#define FTDI_CONTROL_RETRIES 3
+#define FTDI_CONTROL_RETRY_DELAY_MS 2
+
+static int ftdi_send_request(struct usb_serial_port *port, u8 request,
+ u8 requesttype, u16 value, u16 index)
+{
+ struct usb_device *udev = port->serial->dev;
+ int attempts;
+ int rv = -EIO;
+
+ for (attempts = 0; attempts < FTDI_CONTROL_RETRIES; ++attempts) {
+ rv = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
+ request, requesttype, value, index,
+ NULL, 0, WDR_TIMEOUT);
+ if (rv >= 0)
+ return rv;
+ if (rv != -ETIMEDOUT && rv != -EPIPE && rv != -EPROTO)
+ return rv;
+ dev_warn(&port->dev,
+ "control msg req 0x%02x attempt %d returned %d, retrying\n",
+ request, attempts + 1, rv);
+ msleep(FTDI_CONTROL_RETRY_DELAY_MS);
+ }
+ return rv;
+}
+
static int write_latency_timer(struct usb_serial_port *port)
{
struct ftdi_private *priv = usb_get_serial_port_data(port);
- struct usb_device *udev = port->serial->dev;
int rv;
int l = priv->latency;
@@ -1378,12 +1415,9 @@ static int write_latency_timer(struct usb_serial_port *port)
dev_dbg(&port->dev, "%s: setting latency timer = %i\n", __func__, l);
- rv = usb_control_msg(udev,
- usb_sndctrlpipe(udev, 0),
- FTDI_SIO_SET_LATENCY_TIMER_REQUEST,
- FTDI_SIO_SET_LATENCY_TIMER_REQUEST_TYPE,
- l, priv->channel,
- NULL, 0, WDR_TIMEOUT);
+ rv = ftdi_send_request(port, FTDI_SIO_SET_LATENCY_TIMER_REQUEST,
+ FTDI_SIO_SET_LATENCY_TIMER_REQUEST_TYPE,
+ l, priv->channel);
if (rv < 0)
dev_err(&port->dev, "Unable to write latency timer: %i\n", rv);
return rv;
--
2.43.0
^ permalink raw reply related
* [PATCH v3 0/2] USB: serial: ftdi_sio: latency_timer reliability fixes
From: Chinna Mopurigari Naveen Kumar Reddy @ 2026-06-23 8:03 UTC (permalink / raw)
To: Johan Hovold, Greg Kroah-Hartman; +Cc: linux-usb, linux-kernel, Arun Pappan
In-Reply-To: <cover.1782121274.git.naveen.reddy@ftdichip.com>
Two independent correctness fixes for ftdi_sio:
1. Retry transient errors (-ETIMEDOUT / -EPIPE / -EPROTO) on
chip-side control transfers so that a single transient USB hiccup
under bus load does not fail an otherwise-healthy one-shot
configuration (e.g. a latency_timer sysfs write) back to
userspace as -EIO.
2. Make an explicit sysfs write to latency_timer authoritative so
that a userspace write is not silently clamped to 1 by the
ASYNC_LOW_LATENCY tty flag left set by an earlier TIOCSSERIAL
(setserial(8), libftdi, certain tcsetattr paths).
Changes since v2:
- patch 2/2: lower the override notice from dev_info() to dev_dbg()
so the driver stays quiet in normal operation (Greg Kroah-Hartman).
Changes since v1:
- Dropped the urb_defer_timer_ns and low_latency_defer_ns
module-parameter patches, which addressed DMA-channel starvation on
a host controller that does not enforce DMA-channel fairness. As
Greg Kroah-Hartman noted, that belongs in the host controller
driver, not as a per-driver workaround in ftdi_sio.
- Dropped the per-port low_latency sysfs attribute and its
serialisation fix, which depended on the hrtimer infrastructure
introduced by the dropped patch and have no standalone purpose
without it.
Earlier postings:
[v1] https://lore.kernel.org/linux-usb/cover.1781744946.git.naveen.reddy@ftdichip.com/
[v2] https://lore.kernel.org/linux-usb/cover.1782121274.git.naveen.reddy@ftdichip.com/
Chinna Mopurigari Naveen Kumar Reddy (2):
USB: serial: ftdi_sio: retry transient errors on chip-side control
transfers
USB: serial: ftdi_sio: make explicit latency_timer sysfs write
authoritative
drivers/usb/serial/ftdi_sio.c | 65 +++++++++++++++++++++++++++++++----
1 file changed, 58 insertions(+), 7 deletions(-)
base-commit: ba3e43a9e601636f5edb54e259a74f96ca3b8fd8
--
2.43.0
^ permalink raw reply
* [PATCH] usb: xhci-pci: Disable 64-bit DMA for VIA VL805
From: Xincheng Zhang @ 2026-06-23 7:32 UTC (permalink / raw)
To: Mathias Nyman, Greg Kroah-Hartman; +Cc: linux-usb, linux-kernel, Xincheng Zhang
The VIA VL805 XHCI controller (Device ID 0x3483) fails to handle DMA
addresses correctly when they exceed 0x1000000000 (64GB). On systems
with large amounts of RAM, this hardware limitation causes device failures.
Add the XHCI_NO_64BIT_SUPPORT quirk to restrict DMA addressing to 32-bit,
preventing the controller from receiving addresses beyond its hardware
limit.
Signed-off-by: Xincheng Zhang <zhangxincheng@ultrarisc.com>
---
drivers/usb/host/xhci-pci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index 039c26b241d0..99c2dc3cebfe 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -448,6 +448,7 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
if (pdev->vendor == PCI_VENDOR_ID_VIA && pdev->device == PCI_DEVICE_ID_VIA_VL805) {
xhci->quirks |= XHCI_LPM_SUPPORT;
xhci->quirks |= XHCI_TRB_OVERFETCH;
+ xhci->quirks |= XHCI_NO_64BIT_SUPPORT;
}
if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
---
base-commit: 502d801f0ab03e4f32f9a33d203154ce84887921
change-id: 20260623-xhci-via-dma-fix-c563b889ea54
Best regards,
--
Xincheng Zhang <zhangxincheng@ultrarisc.com>
^ permalink raw reply related
* Re: [PATCH] usbcore: Add quirk for 255-bytes initial config read
From: Nikhil Solanke @ 2026-06-23 7:31 UTC (permalink / raw)
To: Alan Stern; +Cc: linux-usb, gregkh, linux-kernel, michal.pecio, stable
In-Reply-To: <8da4a00f-a01c-4b38-82a3-a718e5588f51@rowland.harvard.edu>
I have a v2 patch ready with all the requested changes along with the
documentation in Documentation/admin-guide/kernel-parameters.txt. Is
there any other place where I have to write documentation?
Also, I would like to know the "low-level" type reason as to why do we
have 2 separate buffers. a desc and then a bigbuffer? Why don't we
just realloc the desc buffer? Does this have something to do with
reallocs in general?
Also (a bit more tangent), can the usb device potentially fingerprint
the host os? if we are asking for 9 bytes first and windows ask for
255, is it possible that some usb devices will fingerprint the OS
based on this, and behave differently? are there any other such places
where fingerprinting is possible? In those cases, is it theoretically
possible that this patch might fix some weird devices that "seem to
work" on windows but not on linux? I might just add this one line to
documentation that it might theoretically fix other usb devices as
well instead of it just being a quirk to fix a game controller.
Nikhil Solanke
^ permalink raw reply
* [PATCH] USB: misc: adutux: use kmalloc_array() for read buffers
From: Can Peng @ 2026-06-23 7:22 UTC (permalink / raw)
To: gregkh, kees; +Cc: linux-usb, linux-kernel, Can Peng
Use kmalloc_array() for the primary and secondary read buffers. Each
buffer stores four interrupt-in endpoint packets, so express the
allocation as 4 elements of in_end_size bytes and avoid open-coded
multiplication in allocator arguments.
Signed-off-by: Can Peng <pengcan@kylinos.cn>
---
drivers/usb/misc/adutux.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/misc/adutux.c b/drivers/usb/misc/adutux.c
index 369d0d2ee2be..7615cb6bb482 100644
--- a/drivers/usb/misc/adutux.c
+++ b/drivers/usb/misc/adutux.c
@@ -680,7 +680,7 @@ static int adu_probe(struct usb_interface *interface,
in_end_size = usb_endpoint_maxp(dev->interrupt_in_endpoint);
out_end_size = usb_endpoint_maxp(dev->interrupt_out_endpoint);
- dev->read_buffer_primary = kmalloc((4 * in_end_size), GFP_KERNEL);
+ dev->read_buffer_primary = kmalloc_array(4, in_end_size, GFP_KERNEL);
if (!dev->read_buffer_primary)
goto error;
@@ -690,7 +690,7 @@ static int adu_probe(struct usb_interface *interface,
memset(dev->read_buffer_primary + (2 * in_end_size), 'c', in_end_size);
memset(dev->read_buffer_primary + (3 * in_end_size), 'd', in_end_size);
- dev->read_buffer_secondary = kmalloc((4 * in_end_size), GFP_KERNEL);
+ dev->read_buffer_secondary = kmalloc_array(4, in_end_size, GFP_KERNEL);
if (!dev->read_buffer_secondary)
goto error;
--
2.53.0
^ permalink raw reply related
* [RFC PATCH] thunderbolt: icm: report switch runtime resume timeout
From: Pengpeng Hou @ 2026-06-23 6:18 UTC (permalink / raw)
To: Andreas Noever, Mika Westerberg, Yehezkel Bernat, linux-usb,
linux-kernel
Cc: Pengpeng Hou
icm_runtime_resume_switch() waits for firmware to signal switch runtime-
resume completion. If the wait expires, it only prints a debug message
and still returns success to the runtime PM path.
Return -ETIMEDOUT when the completion does not arrive so runtime PM
callers can observe the failed switch resume instead of using the device
as if resume had completed.
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
---
drivers/thunderbolt/icm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/thunderbolt/icm.c b/drivers/thunderbolt/icm.c
index 10fefac3b1d9..46d491627970 100644
--- a/drivers/thunderbolt/icm.c
+++ b/drivers/thunderbolt/icm.c
@@ -2179,6 +2179,7 @@ static int icm_runtime_resume_switch(struct tb_switch *sw)
if (!wait_for_completion_timeout(&sw->rpm_complete,
msecs_to_jiffies(500))) {
dev_dbg(&sw->dev, "runtime resuming timed out\n");
+ return -ETIMEDOUT;
}
}
return 0;
--
2.50.1 (Apple Git-155)
^ permalink raw reply related
* [PATCH v2 2/2] dt-bindings: Drop incorrect usage of double '::'
From: Krzysztof Kozlowski @ 2026-06-23 5:48 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Peter Griffin, Alim Akhtar, Michael Turquette,
Stephen Boyd, Brian Masney, Sylwester Nawrocki, Chanwoo Choi,
Sam Protsenko, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
Jessica Zhang, Sean Paul, Marijn Suijten, David Airlie,
Simona Vetter, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Inki Dae, Seung-Woo Kim, Kyungmin Park,
Andi Shyti, Georgi Djakov, Lee Jones, Pavel Machek, Hans Verkuil,
Mauro Carvalho Chehab, Ulf Hansson, Vinod Koul, Neil Armstrong,
Linus Walleij, Geert Uytterhoeven, Magnus Damm, Sebastian Reichel,
Javier Martinez Canillas, Liam Girdwood, Mark Brown,
Greg Kroah-Hartman, Jiri Slaby, Srinivas Kandagatla,
Bartlomiej Zolnierkiewicz, Rafael J. Wysocki, Daniel Lezcano,
Zhang Rui, Lukasz Luba, Jonathan Marek, Taniya Das, Robert Marko,
Christian Marangi, Stephan Gerhold, Adam Skladowski,
Sireesh Kodali, Barnabas Czeman, Imran Shaik,
Sricharan Ramabadhran, Anusha Rao, Luo Jie, Tomasz Figa,
Chanho Park, Sunyeal Hong, Shin Son, Krishna Manikandan,
Jacek Anaszewski, Jaehoon Chung, Marek Szyprowski, Alina Yu,
Andy Gross, Niklas Söderlund, Wesley Cheng, linux-arm-msm,
devicetree, linux-kernel, linux-arm-kernel, linux-samsung-soc,
linux-clk, dri-devel, freedreno, linux-i2c, linux-pm, linux-leds,
linux-media, linux-mmc, linux-phy, linux-gpio, linux-renesas-soc,
linux-serial, linux-sound, linux-usb
Cc: Krzysztof Kozlowski, Conor Dooley, Sebastian Reichel,
Niklas Söderlund
In-Reply-To: <20260623054842.21831-3-krzysztof.kozlowski@oss.qualcomm.com>
There is no use of double colon '::' in YAML. OTOH, the literal style
block, e.g. using '|' treats all characters as content [1] therefore
single use of ':' in descriptions is perfectly fine, whenever '|' is
used.
Cleanup existing code, so the confusing style won't be re-used in new
contributions.
Link: https://yaml.org/spec/1.2.2/#literal-style [1]
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Acked-by: Alim Akhtar <alim.akhtar@samsung.com>
Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> # renesas
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
Intention for this patch is to go via Rob's tree.
Changes in v2:
1. Add tags (partial Reviews as Acks, as that's the meaning of Ack)
2. Do not replace ::= in mux.
---
.../devicetree/bindings/arm/qcom-soc.yaml | 4 ++--
.../devicetree/bindings/arm/qcom.yaml | 4 ++--
.../bindings/arm/samsung/samsung-soc.yaml | 4 ++--
.../display/msm/dsi-controller-main.yaml | 20 +++++++++----------
.../display/samsung/samsung,fimd.yaml | 4 ++--
.../bindings/i2c/samsung,s3c2410-i2c.yaml | 2 +-
.../interconnect/qcom,msm8998-bwmon.yaml | 2 +-
.../interconnect/samsung,exynos-bus.yaml | 14 ++++++-------
.../bindings/leds/qcom,pm8058-led.yaml | 4 ++--
.../bindings/leds/skyworks,aat1290.yaml | 6 +++---
.../bindings/media/cec/cec-gpio.yaml | 2 +-
.../bindings/mmc/samsung,exynos-dw-mshc.yaml | 2 +-
.../bindings/phy/samsung,mipi-video-phy.yaml | 4 ++--
.../bindings/phy/samsung,usb2-phy.yaml | 2 +-
.../bindings/phy/samsung,usb3-drd-phy.yaml | 2 +-
.../bindings/pinctrl/samsung,pinctrl.yaml | 2 +-
.../bindings/power/renesas,rcar-sysc.yaml | 2 +-
.../bindings/power/reset/restart-handler.yaml | 8 ++++----
.../bindings/regulator/maxim,max77802.yaml | 4 ++--
.../bindings/regulator/richtek,rtq2208.yaml | 2 +-
.../bindings/serial/qcom,msm-uartdm.yaml | 2 +-
.../devicetree/bindings/slimbus/slimbus.yaml | 4 ++--
.../bindings/soc/qcom/qcom,apr-services.yaml | 2 +-
.../bindings/soc/qcom/qcom,rpmh-rsc.yaml | 8 ++++----
.../bindings/soc/qcom/qcom,wcnss.yaml | 2 +-
.../bindings/soc/renesas/renesas-soc.yaml | 4 ++--
.../bindings/sound/qcom,q6asm-dais.yaml | 2 +-
.../thermal/samsung,exynos-thermal.yaml | 4 ++--
.../devicetree/bindings/usb/qcom,dwc3.yaml | 12 +++++------
.../bindings/usb/qcom,snps-dwc3.yaml | 12 +++++------
30 files changed, 73 insertions(+), 73 deletions(-)
diff --git a/Documentation/devicetree/bindings/arm/qcom-soc.yaml b/Documentation/devicetree/bindings/arm/qcom-soc.yaml
index 27261039d56f..37fdd5a080b7 100644
--- a/Documentation/devicetree/bindings/arm/qcom-soc.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom-soc.yaml
@@ -11,10 +11,10 @@ maintainers:
description: |
Guidelines for new compatibles for SoC blocks/components.
- When adding new compatibles in new bindings, use the format::
+ When adding new compatibles in new bindings, use the format:
qcom,SoC-IP
- For example::
+ For example:
qcom,sdm845-llcc-bwmon
When adding new compatibles to existing bindings, use the format in the
diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml
index 50cc18a6ec5e..667607ae2c32 100644
--- a/Documentation/devicetree/bindings/arm/qcom.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom.yaml
@@ -1215,7 +1215,7 @@ properties:
items:
items:
- description: |
- MSM chipset ID - an exact match value consisting of two bitfields::
+ MSM chipset ID - an exact match value consisting of two bitfields:
- bits 0-15 - The unique MSM chipset ID
- bits 16-31 - Reserved; should be 0
- description: |
@@ -1241,7 +1241,7 @@ properties:
- items:
- items:
- description: |
- Board ID consisting of three bitfields::
+ Board ID consisting of three bitfields:
- bits 31-24 - Unused
- bits 23-16 - Platform Version Major
- bits 15-8 - Platform Version Minor
diff --git a/Documentation/devicetree/bindings/arm/samsung/samsung-soc.yaml b/Documentation/devicetree/bindings/arm/samsung/samsung-soc.yaml
index 653f85997643..ab000befe76d 100644
--- a/Documentation/devicetree/bindings/arm/samsung/samsung-soc.yaml
+++ b/Documentation/devicetree/bindings/arm/samsung/samsung-soc.yaml
@@ -11,10 +11,10 @@ maintainers:
description: |
Guidelines for new compatibles for SoC blocks/components.
- When adding new compatibles in new bindings, use the format::
+ When adding new compatibles in new bindings, use the format:
samsung,SoC-IP
- For example::
+ For example:
samsung,exynos5433-cmu-isp
select:
diff --git a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index dbc0613e427e..395425a70db8 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -73,16 +73,16 @@ properties:
clocks:
description: |
- Several clocks are used, depending on the variant. Typical ones are::
- - bus:: Display AHB clock.
- - byte:: Display byte clock.
- - byte_intf:: Display byte interface clock.
- - core:: Display core clock.
- - core_mss:: Core MultiMedia SubSystem clock.
- - iface:: Display AXI clock.
- - mdp_core:: MDP Core clock.
- - mnoc:: MNOC clock
- - pixel:: Display pixel clock.
+ Several clocks are used, depending on the variant. Typical ones are:
+ - bus: Display AHB clock.
+ - byte: Display byte clock.
+ - byte_intf: Display byte interface clock.
+ - core: Display core clock.
+ - core_mss: Core MultiMedia SubSystem clock.
+ - iface: Display AXI clock.
+ - mdp_core: MDP Core clock.
+ - mnoc: MNOC clock
+ - pixel: Display pixel clock.
minItems: 3
maxItems: 12
diff --git a/Documentation/devicetree/bindings/display/samsung/samsung,fimd.yaml b/Documentation/devicetree/bindings/display/samsung/samsung,fimd.yaml
index ff685031bb2c..729705f419bb 100644
--- a/Documentation/devicetree/bindings/display/samsung/samsung,fimd.yaml
+++ b/Documentation/devicetree/bindings/display/samsung/samsung,fimd.yaml
@@ -41,7 +41,7 @@ properties:
additionalProperties: false
description: |
Timing configuration for lcd i80 interface support.
- The parameters are defined as::
+ The parameters are defined as:
VCLK(internal) __|??????|_____|??????|_____|??????|_____|??????|_____|??
: : : : :
Address Output --:<XXXXXXXXXXX:XXXXXXXXXXXX:XXXXXXXXXXXX:XXXXXXXXXXXX:XX
@@ -132,7 +132,7 @@ patternProperties:
"^port@[0-4]+$":
$ref: /schemas/graph.yaml#/properties/port
description: |
- Contains ports with port with index::
+ Contains ports with port with index:
0 - for CAMIF0 input,
1 - for CAMIF1 input,
2 - for CAMIF2 input,
diff --git a/Documentation/devicetree/bindings/i2c/samsung,s3c2410-i2c.yaml b/Documentation/devicetree/bindings/i2c/samsung,s3c2410-i2c.yaml
index a2ddc6803617..07600b49f2f9 100644
--- a/Documentation/devicetree/bindings/i2c/samsung,s3c2410-i2c.yaml
+++ b/Documentation/devicetree/bindings/i2c/samsung,s3c2410-i2c.yaml
@@ -35,7 +35,7 @@ properties:
gpios:
description: |
- The order of the GPIOs should be the following:: <SDA, SCL>. The GPIO
+ The order of the GPIOs should be the following: <SDA, SCL>. The GPIO
specifier depends on the gpio controller. Required in all cases except
for "samsung,s3c2440-hdmiphy-i2c" whose input/output lines are
permanently wired to the respective client.
diff --git a/Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml b/Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml
index ff64225e8281..e002e70580f9 100644
--- a/Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml
+++ b/Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml
@@ -13,7 +13,7 @@ description: |
Bandwidth Monitor measures current throughput on buses between various NoC
fabrics and provides information when it crosses configured thresholds.
- Certain SoCs might have more than one Bandwidth Monitors, for example on SDM845::
+ Certain SoCs might have more than one Bandwidth Monitors, for example on SDM845:
- Measuring the bandwidth between CPUs and Last Level Cache Controller -
called just BWMON,
- Measuring the bandwidth between Last Level Cache Controller and memory
diff --git a/Documentation/devicetree/bindings/interconnect/samsung,exynos-bus.yaml b/Documentation/devicetree/bindings/interconnect/samsung,exynos-bus.yaml
index 5e26e48c7217..0203959c8995 100644
--- a/Documentation/devicetree/bindings/interconnect/samsung,exynos-bus.yaml
+++ b/Documentation/devicetree/bindings/interconnect/samsung,exynos-bus.yaml
@@ -23,7 +23,7 @@ description: |
The each AXI bus has the owned source clock but, has not the only owned power
line. The power line might be shared among one more sub-blocks. So, we can
divide into two type of device as the role of each sub-block. There are two
- type of bus devices as following::
+ type of bus devices as following:
- parent bus device
- passive bus device
@@ -44,8 +44,8 @@ description: |
able to support the bus frequency for all Exynos SoCs.
Detailed correlation between sub-blocks and power line according
- to Exynos SoC::
- - In case of Exynos3250, there are two power line as following::
+ to Exynos SoC:
+ - In case of Exynos3250, there are two power line as following:
VDD_MIF |--- DMC (Dynamic Memory Controller)
VDD_INT |--- LEFTBUS (parent device)
@@ -89,7 +89,7 @@ description: |
|L5 |200000 |200000 |400000 |300000 | ||1000000 |
----------------------------------------------------------
- - In case of Exynos4210, there is one power line as following::
+ - In case of Exynos4210, there is one power line as following:
VDD_INT |--- DMC (parent device, Dynamic Memory Controller)
|--- LEFTBUS
|--- PERIL
@@ -106,7 +106,7 @@ description: |
|--- LCD0
|--- LCD1
- - In case of Exynos4x12, there are two power line as following::
+ - In case of Exynos4x12, there are two power line as following:
VDD_MIF |--- DMC (Dynamic Memory Controller)
VDD_INT |--- LEFTBUS (parent device)
@@ -124,7 +124,7 @@ description: |
|--- LCD0
|--- ISP
- - In case of Exynos5422, there are two power line as following::
+ - In case of Exynos5422, there are two power line as following:
VDD_MIF |--- DREX 0 (parent device, DRAM EXpress controller)
|--- DREX 1
@@ -143,7 +143,7 @@ description: |
|--- FSYS
|--- FSYS2
- - In case of Exynos5433, there is VDD_INT power line as following::
+ - In case of Exynos5433, there is VDD_INT power line as following:
VDD_INT |--- G2D (parent device)
|--- MSCL
|--- GSCL
diff --git a/Documentation/devicetree/bindings/leds/qcom,pm8058-led.yaml b/Documentation/devicetree/bindings/leds/qcom,pm8058-led.yaml
index b409b2a8b5c5..5165bfddcd54 100644
--- a/Documentation/devicetree/bindings/leds/qcom,pm8058-led.yaml
+++ b/Documentation/devicetree/bindings/leds/qcom,pm8058-led.yaml
@@ -10,10 +10,10 @@ maintainers:
- Krzysztof Kozlowski <krzk@kernel.org>
description: |
- The Qualcomm PM8058 contains an LED block for up to six LEDs:: three normal
+ The Qualcomm PM8058 contains an LED block for up to six LEDs: three normal
LEDs, two "flash" LEDs and one "keypad backlight" LED. The names are quoted
because sometimes these LED drivers are used for wildly different things than
- flash or keypad backlight:: their names are more of a suggestion than a
+ flash or keypad backlight: their names are more of a suggestion than a
hard-wired usecase.
Hardware-wise the different LEDs support slightly different output currents.
diff --git a/Documentation/devicetree/bindings/leds/skyworks,aat1290.yaml b/Documentation/devicetree/bindings/leds/skyworks,aat1290.yaml
index a6aaa92dbccd..65576dfdca11 100644
--- a/Documentation/devicetree/bindings/leds/skyworks,aat1290.yaml
+++ b/Documentation/devicetree/bindings/leds/skyworks,aat1290.yaml
@@ -11,7 +11,7 @@ maintainers:
- Krzysztof Kozlowski <krzk@kernel.org>
description: |
- The device is controlled through two pins:: FL_EN and EN_SET. The pins when,
+ The device is controlled through two pins: FL_EN and EN_SET. The pins when,
asserted high, enable flash strobe and movie mode (max 1/2 of flash current)
respectively. In order to add a capability of selecting the strobe signal
source (e.g. CPU or camera sensor) there is an additional switch required,
@@ -39,11 +39,11 @@ properties:
flash-max-microamp:
description: |
Maximum flash LED supply current can be calculated using following
- formula:: I = 1A * 162 kOhm / Rset.
+ formula: I = 1A * 162 kOhm / Rset.
flash-max-timeout-us:
description: |
- Maximum flash timeout can be calculated using following formula::
+ Maximum flash timeout can be calculated using following formula:
T = 8.82 * 10^9 * Ct.
required:
diff --git a/Documentation/devicetree/bindings/media/cec/cec-gpio.yaml b/Documentation/devicetree/bindings/media/cec/cec-gpio.yaml
index 582c6c9cae48..21118e4bae0f 100644
--- a/Documentation/devicetree/bindings/media/cec/cec-gpio.yaml
+++ b/Documentation/devicetree/bindings/media/cec/cec-gpio.yaml
@@ -14,7 +14,7 @@ description: |
hooked up to a pull-up GPIO line and - optionally - the HPD line is hooked up
to another GPIO line.
- Please note:: the maximum voltage for the CEC line is 3.63V, for the HPD and
+ Please note: the maximum voltage for the CEC line is 3.63V, for the HPD and
5V lines it is 5.3V. So you may need some sort of level conversion
circuitry when connecting them to a GPIO line.
diff --git a/Documentation/devicetree/bindings/mmc/samsung,exynos-dw-mshc.yaml b/Documentation/devicetree/bindings/mmc/samsung,exynos-dw-mshc.yaml
index 27c4060f2f91..223fcc9f651f 100644
--- a/Documentation/devicetree/bindings/mmc/samsung,exynos-dw-mshc.yaml
+++ b/Documentation/devicetree/bindings/mmc/samsung,exynos-dw-mshc.yaml
@@ -85,7 +85,7 @@ properties:
description: |
The value of CIU TX and RX clock phase shift value for HS400 mode
operation.
- Valid values for SDR and DDR CIU clock timing::
+ Valid values for SDR and DDR CIU clock timing:
- valid value for tx phase shift and rx phase shift is 0 to 7.
- when CIU clock divider value is set to 3, all possible 8 phase shift
values can be used.
diff --git a/Documentation/devicetree/bindings/phy/samsung,mipi-video-phy.yaml b/Documentation/devicetree/bindings/phy/samsung,mipi-video-phy.yaml
index 16967ef8e9ec..87b6a35b2626 100644
--- a/Documentation/devicetree/bindings/phy/samsung,mipi-video-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/samsung,mipi-video-phy.yaml
@@ -13,14 +13,14 @@ maintainers:
description: |
For samsung,s5pv210-mipi-video-phy compatible PHYs the second cell in the
- PHY specifier identifies the PHY and its meaning is as follows::
+ PHY specifier identifies the PHY and its meaning is as follows:
0 - MIPI CSIS 0,
1 - MIPI DSIM 0,
2 - MIPI CSIS 1,
3 - MIPI DSIM 1.
samsung,exynos5420-mipi-video-phy and samsung,exynos5433-mipi-video-phy
- support additional fifth PHY::
+ support additional fifth PHY:
4 - MIPI CSIS 2.
properties:
diff --git a/Documentation/devicetree/bindings/phy/samsung,usb2-phy.yaml b/Documentation/devicetree/bindings/phy/samsung,usb2-phy.yaml
index d9f22a801cbf..7db7605a82e2 100644
--- a/Documentation/devicetree/bindings/phy/samsung,usb2-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/samsung,usb2-phy.yaml
@@ -14,7 +14,7 @@ maintainers:
description: |
The first phandle argument in the PHY specifier identifies the PHY, its
meaning is compatible dependent. For the currently supported SoCs (Exynos4210
- and Exynos4212) it is as follows::
+ and Exynos4212) it is as follows:
0 - USB device ("device"),
1 - USB host ("host"),
2 - HSIC0 ("hsic0"),
diff --git a/Documentation/devicetree/bindings/phy/samsung,usb3-drd-phy.yaml b/Documentation/devicetree/bindings/phy/samsung,usb3-drd-phy.yaml
index 4562e0468f4f..a1b3d9e6a094 100644
--- a/Documentation/devicetree/bindings/phy/samsung,usb3-drd-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/samsung,usb3-drd-phy.yaml
@@ -14,7 +14,7 @@ maintainers:
description: |
For samsung,exynos5250-usbdrd-phy and samsung,exynos5420-usbdrd-phy
compatible PHYs, the second cell in the PHY specifier identifies the
- PHY id, which is interpreted as follows::
+ PHY id, which is interpreted as follows:
0 - UTMI+ type phy,
1 - PIPE3 type phy.
diff --git a/Documentation/devicetree/bindings/pinctrl/samsung,pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/samsung,pinctrl.yaml
index 7b006009ca0e..5e35686eeed3 100644
--- a/Documentation/devicetree/bindings/pinctrl/samsung,pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/samsung,pinctrl.yaml
@@ -18,7 +18,7 @@ description: |
All the pin controller nodes should be represented in the aliases node using
the following format 'pinctrl{n}' where n is a unique number for the alias.
- The controller supports three types of interrupts::
+ The controller supports three types of interrupts:
- External GPIO interrupts (see interrupts property in pin controller node);
- External wake-up interrupts - multiplexed (capable of waking up the system
diff --git a/Documentation/devicetree/bindings/power/renesas,rcar-sysc.yaml b/Documentation/devicetree/bindings/power/renesas,rcar-sysc.yaml
index 347571e2545a..b67aa170b2c1 100644
--- a/Documentation/devicetree/bindings/power/renesas,rcar-sysc.yaml
+++ b/Documentation/devicetree/bindings/power/renesas,rcar-sysc.yaml
@@ -13,7 +13,7 @@ maintainers:
description: |
The R-Car (RZ/G) System Controller provides power management for the CPU
cores and various coprocessors.
- The power domain IDs for consumers are defined in header files::
+ The power domain IDs for consumers are defined in header files:
include/dt-bindings/power/r8*-sysc.h
properties:
diff --git a/Documentation/devicetree/bindings/power/reset/restart-handler.yaml b/Documentation/devicetree/bindings/power/reset/restart-handler.yaml
index 965a834a3dbe..00c00ec5ec81 100644
--- a/Documentation/devicetree/bindings/power/reset/restart-handler.yaml
+++ b/Documentation/devicetree/bindings/power/reset/restart-handler.yaml
@@ -18,12 +18,12 @@ properties:
priority:
$ref: /schemas/types.yaml#/definitions/uint32
description: |
- A priority ranging from 0 to 255 according to the following guidelines::
- 0:: Restart handler of last resort, with limited restart capabilities.
- 128:: Typical, default restart handler; use if no other restart handler
+ A priority ranging from 0 to 255 according to the following guidelines:
+ 0: Restart handler of last resort, with limited restart capabilities.
+ 128: Typical, default restart handler; use if no other restart handler
is expected to be available, and/or if restart functionality is
sufficient to restart the entire system.
- 255:: Highest priority restart handler, will preempt all other restart handlers.
+ 255: Highest priority restart handler, will preempt all other restart handlers.
minimum: 0
maximum: 255
diff --git a/Documentation/devicetree/bindings/regulator/maxim,max77802.yaml b/Documentation/devicetree/bindings/regulator/maxim,max77802.yaml
index b704f05ea454..b886495c1396 100644
--- a/Documentation/devicetree/bindings/regulator/maxim,max77802.yaml
+++ b/Documentation/devicetree/bindings/regulator/maxim,max77802.yaml
@@ -22,13 +22,13 @@ description: |
Certain regulators support "regulator-initial-mode" and "regulator-mode".
The valid modes list is defined in the dt-bindings/regulator/maxim,max77802.h
- and their meaning is::
+ and their meaning is:
1 - Normal regulator voltage output mode.
3 - Low Power which reduces the quiescent current down to only 1uA
The standard "regulator-mode" property can only be used for regulators that
support changing their mode to Low Power Mode during suspend. These
- regulators are:: bucks 2-4 and LDOs 1-35. Also, it only takes effect if the
+ regulators are: bucks 2-4 and LDOs 1-35. Also, it only takes effect if the
regulator has been enabled for the given suspend state using
"regulator-on-in-suspend" and has not been disabled for that state using
"regulator-off-in-suspend".
diff --git a/Documentation/devicetree/bindings/regulator/richtek,rtq2208.yaml b/Documentation/devicetree/bindings/regulator/richtek,rtq2208.yaml
index 022c1f197364..b0aa38edf8c2 100644
--- a/Documentation/devicetree/bindings/regulator/richtek,rtq2208.yaml
+++ b/Documentation/devicetree/bindings/regulator/richtek,rtq2208.yaml
@@ -21,7 +21,7 @@ description: |
conduction mode (FCCM).
The definition of modes is in the datasheet which is available in below link
- and their meaning is::
+ and their meaning is:
0 - Auto mode for power saving, which reducing the switching frequency at light load condition
to maintain high frequency.
1 - FCCM to meet the strict voltage regulation accuracy, which keeping constant switching frequency.
diff --git a/Documentation/devicetree/bindings/serial/qcom,msm-uartdm.yaml b/Documentation/devicetree/bindings/serial/qcom,msm-uartdm.yaml
index 788ef5c1c446..bc967ead2350 100644
--- a/Documentation/devicetree/bindings/serial/qcom,msm-uartdm.yaml
+++ b/Documentation/devicetree/bindings/serial/qcom,msm-uartdm.yaml
@@ -17,7 +17,7 @@ description: |
software perspective it's mostly compatible with the MSM serial UART except
that it supports reading and writing multiple characters at a time.
- Note:: Aliases may be defined to ensure the correct ordering of the UARTs.
+ Note: Aliases may be defined to ensure the correct ordering of the UARTs.
The alias serialN will result in the UART being assigned port N. If any
serialN alias exists, then an alias must exist for each enabled UART. The
serialN aliases should be in a .dts file instead of in a .dtsi file.
diff --git a/Documentation/devicetree/bindings/slimbus/slimbus.yaml b/Documentation/devicetree/bindings/slimbus/slimbus.yaml
index 5a941610ce4e..3910327c8ded 100644
--- a/Documentation/devicetree/bindings/slimbus/slimbus.yaml
+++ b/Documentation/devicetree/bindings/slimbus/slimbus.yaml
@@ -29,7 +29,7 @@ patternProperties:
description: |
Every SLIMbus controller node can contain zero or more child nodes
representing slave devices on the bus. Every SLIMbus slave device is
- uniquely determined by the enumeration address containing 4 fields::
+ uniquely determined by the enumeration address containing 4 fields:
Manufacturer ID, Product code, Device index, and Instance value for the
device.
@@ -48,7 +48,7 @@ patternProperties:
reg:
maxItems: 1
description: |
- Pair of (device index, instande ID), where::
+ Pair of (device index, instande ID), where:
- Device index, which uniquely identifies multiple devices within a
single component.
- Instance ID, can be used for the cases where multiple devices of
diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,apr-services.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,apr-services.yaml
index bdf482db32aa..b663be3ea5a1 100644
--- a/Documentation/devicetree/bindings/soc/qcom/qcom,apr-services.yaml
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom,apr-services.yaml
@@ -40,7 +40,7 @@ properties:
$ref: /schemas/types.yaml#/definitions/string-array
description: |
Protection domain service name and path for APR service (if supported).
- Possible values are::
+ Possible values are:
"avs/audio", "msm/adsp/audio_pd".
"kernel/elf_loader", "msm/modem/wlan_pd".
"tms/servreg", "msm/adsp/audio_pd".
diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,rpmh-rsc.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,rpmh-rsc.yaml
index 26d9bc773ec5..1889139a3f7a 100644
--- a/Documentation/devicetree/bindings/soc/qcom/qcom,rpmh-rsc.yaml
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom,rpmh-rsc.yaml
@@ -23,7 +23,7 @@ description: |
with a few variations that are captured by the properties here.
A TCS may be triggered from Linux or triggered by the F/W after all the CPUs
- have powered off to facilitate idle power saving. TCS could be classified as::
+ have powered off to facilitate idle power saving. TCS could be classified as:
ACTIVE - Triggered by Linux
SLEEP - Triggered by F/W
WAKE - Triggered by F/W
@@ -76,7 +76,7 @@ properties:
items:
items:
- description: |
- TCS type::
+ TCS type:
- ACTIVE_TCS
- SLEEP_TCS
- WAKE_TCS
@@ -152,7 +152,7 @@ examples:
- |
// For a TCS whose RSC base address is 0x179C0000 and is at a DRV id of
// 2, the register offsets for DRV2 start at 0D00, the register
- // calculations are like this::
+ // calculations are like this:
// DRV0: 0x179C0000
// DRV2: 0x179C0000 + 0x10000 = 0x179D0000
// DRV2: 0x179C0000 + 0x10000 * 2 = 0x179E0000
@@ -182,7 +182,7 @@ examples:
- |
// For a TCS whose RSC base address is 0xAF20000 and is at DRV id of 0, the
// register offsets for DRV0 start at 01C00, the register calculations are
- // like this::
+ // like this:
// DRV0: 0xAF20000
// TCS-OFFSET: 0x1C00
#include <dt-bindings/interrupt-controller/arm-gic.h>
diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,wcnss.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,wcnss.yaml
index 4fcae6bedfff..72a7f8cb09ba 100644
--- a/Documentation/devicetree/bindings/soc/qcom/qcom,wcnss.yaml
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom,wcnss.yaml
@@ -28,7 +28,7 @@ properties:
$ref: /schemas/types.yaml#/definitions/phandle
description: |
Reference to a node specifying the wcnss "ccu" and "dxe" register blocks.
- The node must be compatible with one of the following::
+ The node must be compatible with one of the following:
- qcom,riva"
- qcom,pronto"
diff --git a/Documentation/devicetree/bindings/soc/renesas/renesas-soc.yaml b/Documentation/devicetree/bindings/soc/renesas/renesas-soc.yaml
index 5ddd31f30f26..57c9d3c57021 100644
--- a/Documentation/devicetree/bindings/soc/renesas/renesas-soc.yaml
+++ b/Documentation/devicetree/bindings/soc/renesas/renesas-soc.yaml
@@ -12,10 +12,10 @@ maintainers:
description: |
Guidelines for new compatibles for SoC blocks/components.
- When adding new compatibles in new bindings, use the format::
+ When adding new compatibles in new bindings, use the format:
renesas,SoC-IP
- For example::
+ For example:
renesas,r8a77965-csi2
When adding new compatibles to existing bindings, use the format in the
diff --git a/Documentation/devicetree/bindings/sound/qcom,q6asm-dais.yaml b/Documentation/devicetree/bindings/sound/qcom,q6asm-dais.yaml
index 47a105a97ecf..bc8c8ba24f9c 100644
--- a/Documentation/devicetree/bindings/sound/qcom,q6asm-dais.yaml
+++ b/Documentation/devicetree/bindings/sound/qcom,q6asm-dais.yaml
@@ -45,7 +45,7 @@ patternProperties:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2]
description: |
- The direction of the dai stream::
+ The direction of the dai stream:
- Q6ASM_DAI_TX_RX (0) for both tx and rx
- Q6ASM_DAI_TX (1) for only tx (Capture/Encode)
- Q6ASM_DAI_RX (2) for only rx (Playback/Decode)
diff --git a/Documentation/devicetree/bindings/thermal/samsung,exynos-thermal.yaml b/Documentation/devicetree/bindings/thermal/samsung,exynos-thermal.yaml
index 29a08b0729ee..3f333db72a71 100644
--- a/Documentation/devicetree/bindings/thermal/samsung,exynos-thermal.yaml
+++ b/Documentation/devicetree/bindings/thermal/samsung,exynos-thermal.yaml
@@ -40,7 +40,7 @@ properties:
description: |
The Exynos TMU supports generating interrupts when reaching given
temperature thresholds. Number of supported thermal trip points depends
- on the SoC (only first trip points defined in DT will be configured)::
+ on the SoC (only first trip points defined in DT will be configured):
- most of SoC: 4
- samsung,exynos5433-tmu: 8
- samsung,exynos7-tmu: 8
@@ -52,7 +52,7 @@ properties:
- description: |
Shared TMU registers.
- Note:: On Exynos5420, the TRIMINFO register is misplaced for TMU
+ Note: On Exynos5420, the TRIMINFO register is misplaced for TMU
channels 2, 3 and 4 Use "samsung,exynos5420-tmu-ext-triminfo" in
cases, there is a misplaced register, also provide clock to access
that base.
diff --git a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
index a7f58114c02e..90daee616880 100644
--- a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
+++ b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
@@ -92,14 +92,14 @@ properties:
clocks:
description: |
- Several clocks are used, depending on the variant. Typical ones are::
- - cfg_noc:: System Config NOC clock.
- - core:: Master/Core clock, has to be >= 125 MHz for SS operation and >=
+ Several clocks are used, depending on the variant. Typical ones are:
+ - cfg_noc: System Config NOC clock.
+ - core: Master/Core clock, has to be >= 125 MHz for SS operation and >=
60MHz for HS operation.
- - iface:: System bus AXI clock.
- - sleep:: Sleep clock, used for wakeup when USB3 core goes into low
+ - iface: System bus AXI clock.
+ - sleep: Sleep clock, used for wakeup when USB3 core goes into low
power mode (U3).
- - mock_utmi:: Mock utmi clock needed for ITP/SOF generation in host
+ - mock_utmi: Mock utmi clock needed for ITP/SOF generation in host
mode. Its frequency should be 19.2MHz.
minItems: 1
maxItems: 9
diff --git a/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml
index 8201656b41ed..d99af9f413d0 100644
--- a/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml
+++ b/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml
@@ -87,14 +87,14 @@ properties:
clocks:
description: |
- Several clocks are used, depending on the variant. Typical ones are::
- - cfg_noc:: System Config NOC clock.
- - core:: Master/Core clock, has to be >= 125 MHz for SS operation and >=
+ Several clocks are used, depending on the variant. Typical ones are:
+ - cfg_noc: System Config NOC clock.
+ - core: Master/Core clock, has to be >= 125 MHz for SS operation and >=
60MHz for HS operation.
- - iface:: System bus AXI clock.
- - sleep:: Sleep clock, used for wakeup when USB3 core goes into low
+ - iface: System bus AXI clock.
+ - sleep: Sleep clock, used for wakeup when USB3 core goes into low
power mode (U3).
- - mock_utmi:: Mock utmi clock needed for ITP/SOF generation in host
+ - mock_utmi: Mock utmi clock needed for ITP/SOF generation in host
mode. Its frequency should be 19.2MHz.
minItems: 1
maxItems: 9
--
2.53.0
^ permalink raw reply related
* [PATCH v2 1/2] dt-bindings: clock: Drop incorrect usage of double '::'
From: Krzysztof Kozlowski @ 2026-06-23 5:48 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Peter Griffin, Alim Akhtar, Michael Turquette,
Stephen Boyd, Brian Masney, Sylwester Nawrocki, Chanwoo Choi,
Sam Protsenko, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
Jessica Zhang, Sean Paul, Marijn Suijten, David Airlie,
Simona Vetter, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Inki Dae, Seung-Woo Kim, Kyungmin Park,
Andi Shyti, Georgi Djakov, Lee Jones, Pavel Machek, Hans Verkuil,
Mauro Carvalho Chehab, Ulf Hansson, Vinod Koul, Neil Armstrong,
Linus Walleij, Geert Uytterhoeven, Magnus Damm, Sebastian Reichel,
Javier Martinez Canillas, Liam Girdwood, Mark Brown,
Greg Kroah-Hartman, Jiri Slaby, Srinivas Kandagatla,
Bartlomiej Zolnierkiewicz, Rafael J. Wysocki, Daniel Lezcano,
Zhang Rui, Lukasz Luba, Jonathan Marek, Taniya Das, Robert Marko,
Christian Marangi, Stephan Gerhold, Adam Skladowski,
Sireesh Kodali, Barnabas Czeman, Imran Shaik,
Sricharan Ramabadhran, Anusha Rao, Luo Jie, Tomasz Figa,
Chanho Park, Sunyeal Hong, Shin Son, Krishna Manikandan,
Jacek Anaszewski, Jaehoon Chung, Marek Szyprowski, Alina Yu,
Andy Gross, Niklas Söderlund, Wesley Cheng, linux-arm-msm,
devicetree, linux-kernel, linux-arm-kernel, linux-samsung-soc,
linux-clk, dri-devel, freedreno, linux-i2c, linux-pm, linux-leds,
linux-media, linux-mmc, linux-phy, linux-gpio, linux-renesas-soc,
linux-serial, linux-sound, linux-usb
Cc: Krzysztof Kozlowski, Conor Dooley
There is no use of double colon '::' in YAML. OTOH, the literal style
block, e.g. using '|' treats all characters as content [1] therefore
single use of ':' in descriptions is perfectly fine, whenever '|' is
used.
Cleanup existing code, so the confusing style won't be re-used in new
contributions.
Link: https://yaml.org/spec/1.2.2/#literal-style [1]
Acked-by: Alim Akhtar <alim.akhtar@samsung.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
I split the patches to avoid bounces from mailing list due to email size.
This can go via clock tree (no dependencies)... or both could go via
Rob's tree.
Changes in v2:
1. Add tags (partial Reviews as Acks, as that's the meaning of Ack)
---
.../devicetree/bindings/clock/qcom,dispcc-sm8x50.yaml | 2 +-
.../devicetree/bindings/clock/qcom,gcc-apq8064.yaml | 2 +-
.../devicetree/bindings/clock/qcom,gcc-apq8084.yaml | 2 +-
.../devicetree/bindings/clock/qcom,gcc-ipq6018.yaml | 2 +-
.../devicetree/bindings/clock/qcom,gcc-ipq8064.yaml | 2 +-
.../devicetree/bindings/clock/qcom,gcc-mdm9607.yaml | 2 +-
.../devicetree/bindings/clock/qcom,gcc-mdm9615.yaml | 2 +-
.../devicetree/bindings/clock/qcom,gcc-msm8660.yaml | 2 +-
.../devicetree/bindings/clock/qcom,gcc-msm8909.yaml | 2 +-
.../devicetree/bindings/clock/qcom,gcc-msm8916.yaml | 2 +-
.../devicetree/bindings/clock/qcom,gcc-msm8953.yaml | 2 +-
.../devicetree/bindings/clock/qcom,gcc-msm8974.yaml | 2 +-
.../devicetree/bindings/clock/qcom,gcc-sdm660.yaml | 2 +-
Documentation/devicetree/bindings/clock/qcom,gpucc.yaml | 2 +-
.../devicetree/bindings/clock/qcom,ipq5018-gcc.yaml | 2 +-
.../devicetree/bindings/clock/qcom,ipq9574-gcc.yaml | 2 +-
.../devicetree/bindings/clock/qcom,qca8k-nsscc.yaml | 2 +-
.../devicetree/bindings/clock/qcom,qcm2290-gpucc.yaml | 2 +-
Documentation/devicetree/bindings/clock/qcom,rpmcc.yaml | 2 +-
.../devicetree/bindings/clock/qcom,sc7280-lpasscorecc.yaml | 2 +-
.../devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml | 2 +-
.../devicetree/bindings/clock/qcom,sm6115-lpasscc.yaml | 2 +-
.../devicetree/bindings/clock/qcom,sm8350-videocc.yaml | 2 +-
Documentation/devicetree/bindings/clock/qcom,videocc.yaml | 2 +-
.../devicetree/bindings/clock/samsung,exynos5260-clock.yaml | 6 +++---
.../devicetree/bindings/clock/samsung,exynos5410-clock.yaml | 2 +-
.../devicetree/bindings/clock/samsung,exynos5433-clock.yaml | 2 +-
.../devicetree/bindings/clock/samsung,exynos7-clock.yaml | 2 +-
.../devicetree/bindings/clock/samsung,exynos850-clock.yaml | 2 +-
.../bindings/clock/samsung,exynosautov9-clock.yaml | 2 +-
.../bindings/clock/samsung,exynosautov920-clock.yaml | 2 +-
.../devicetree/bindings/clock/samsung,s5pv210-clock.yaml | 2 +-
32 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/Documentation/devicetree/bindings/clock/qcom,dispcc-sm8x50.yaml b/Documentation/devicetree/bindings/clock/qcom,dispcc-sm8x50.yaml
index 53a5ab319159..6863db9bd092 100644
--- a/Documentation/devicetree/bindings/clock/qcom,dispcc-sm8x50.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,dispcc-sm8x50.yaml
@@ -13,7 +13,7 @@ description: |
Qualcomm display clock control module provides the clocks, resets and power
domains on SM8150/SM8250/SM8350.
- See also::
+ See also:
include/dt-bindings/clock/qcom,dispcc-sm8150.h
include/dt-bindings/clock/qcom,dispcc-sm8250.h
include/dt-bindings/clock/qcom,dispcc-sm8350.h
diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-apq8064.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-apq8064.yaml
index 27df7e3e5bf3..68532244901e 100644
--- a/Documentation/devicetree/bindings/clock/qcom,gcc-apq8064.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,gcc-apq8064.yaml
@@ -14,7 +14,7 @@ description: |
Qualcomm global clock control module provides the clocks, resets and power
domains on APQ8064.
- See also::
+ See also:
include/dt-bindings/clock/qcom,gcc-msm8960.h
include/dt-bindings/reset/qcom,gcc-msm8960.h
diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-apq8084.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-apq8084.yaml
index 0a0a26d9beab..1c022e75fd71 100644
--- a/Documentation/devicetree/bindings/clock/qcom,gcc-apq8084.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,gcc-apq8084.yaml
@@ -14,7 +14,7 @@ description: |
Qualcomm global clock control module provides the clocks, resets and power
domains on APQ8084.
- See also::
+ See also:
include/dt-bindings/clock/qcom,gcc-apq8084.h
include/dt-bindings/reset/qcom,gcc-apq8084.h
diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-ipq6018.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-ipq6018.yaml
index 4d2614d4f368..c7fb84438db7 100644
--- a/Documentation/devicetree/bindings/clock/qcom,gcc-ipq6018.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,gcc-ipq6018.yaml
@@ -15,7 +15,7 @@ description: |
Qualcomm global clock control module provides the clocks, resets and power
domains on IPQ6018.
- See also::
+ See also:
include/dt-bindings/clock/qcom,gcc-ipq6018.h
include/dt-bindings/reset/qcom,gcc-ipq6018.h
diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-ipq8064.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-ipq8064.yaml
index a71557395c01..b4d3175780bc 100644
--- a/Documentation/devicetree/bindings/clock/qcom,gcc-ipq8064.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,gcc-ipq8064.yaml
@@ -13,7 +13,7 @@ description: |
Qualcomm global clock control module provides the clocks, resets and power
domains on IPQ8064.
- See also::
+ See also:
include/dt-bindings/clock/qcom,gcc-ipq806x.h (qcom,gcc-ipq8064)
include/dt-bindings/reset/qcom,gcc-ipq806x.h (qcom,gcc-ipq8064)
diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-mdm9607.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-mdm9607.yaml
index d7da30b0e7ee..0a7be7583bdd 100644
--- a/Documentation/devicetree/bindings/clock/qcom,gcc-mdm9607.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,gcc-mdm9607.yaml
@@ -14,7 +14,7 @@ description: |
Qualcomm global clock control module provides the clocks, resets and power
domains.
- See also::
+ See also:
include/dt-bindings/clock/qcom,gcc-mdm9607.h
allOf:
diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-mdm9615.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-mdm9615.yaml
index 418dea31eb62..0656d5ee448d 100644
--- a/Documentation/devicetree/bindings/clock/qcom,gcc-mdm9615.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,gcc-mdm9615.yaml
@@ -14,7 +14,7 @@ description: |
Qualcomm global clock control module provides the clocks, resets and power
domains.
- See also::
+ See also:
include/dt-bindings/clock/qcom,gcc-mdm9615.h
allOf:
diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-msm8660.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-msm8660.yaml
index e03b6d0acdb6..70c9da1f35c2 100644
--- a/Documentation/devicetree/bindings/clock/qcom,gcc-msm8660.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,gcc-msm8660.yaml
@@ -14,7 +14,7 @@ description: |
Qualcomm global clock control module provides the clocks and resets on
MSM8660
- See also::
+ See also:
include/dt-bindings/clock/qcom,gcc-msm8660.h
include/dt-bindings/reset/qcom,gcc-msm8660.h
diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-msm8909.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-msm8909.yaml
index ce1f5a60bd8c..2edb6c251d99 100644
--- a/Documentation/devicetree/bindings/clock/qcom,gcc-msm8909.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,gcc-msm8909.yaml
@@ -13,7 +13,7 @@ description: |
Qualcomm global clock control module provides the clocks, resets and power
domains on MSM8909, MSM8917 or QM215.
- See also::
+ See also:
include/dt-bindings/clock/qcom,gcc-msm8909.h
include/dt-bindings/clock/qcom,gcc-msm8917.h
diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-msm8916.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-msm8916.yaml
index 258b6b93deca..af4b639ea8c3 100644
--- a/Documentation/devicetree/bindings/clock/qcom,gcc-msm8916.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,gcc-msm8916.yaml
@@ -14,7 +14,7 @@ description: |
Qualcomm global clock control module provides the clocks, resets and power
domains on MSM8916 or MSM8939.
- See also::
+ See also:
include/dt-bindings/clock/qcom,gcc-msm8916.h
include/dt-bindings/clock/qcom,gcc-msm8939.h
include/dt-bindings/reset/qcom,gcc-msm8916.h
diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-msm8953.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-msm8953.yaml
index ced3118c8580..fc0360554f68 100644
--- a/Documentation/devicetree/bindings/clock/qcom,gcc-msm8953.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,gcc-msm8953.yaml
@@ -15,7 +15,7 @@ description: |
Qualcomm global clock control module provides the clocks, resets and power
domains on MSM8937, MSM8940, MSM8953 or SDM439.
- See also::
+ See also:
include/dt-bindings/clock/qcom,gcc-msm8917.h
include/dt-bindings/clock/qcom,gcc-msm8953.h
diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-msm8974.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-msm8974.yaml
index 929fafc84c19..378dfe7854ac 100644
--- a/Documentation/devicetree/bindings/clock/qcom,gcc-msm8974.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,gcc-msm8974.yaml
@@ -15,7 +15,7 @@ description: |
Qualcomm global clock control module provides the clocks, resets and power
domains on MSM8974 (all variants) and MSM8226.
- See also::
+ See also:
include/dt-bindings/clock/qcom,gcc-msm8974.h (qcom,gcc-msm8226 and qcom,gcc-msm8974)
include/dt-bindings/reset/qcom,gcc-msm8974.h (qcom,gcc-msm8226 and qcom,gcc-msm8974)
diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-sdm660.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-sdm660.yaml
index 724ce0491118..72aaf699cf70 100644
--- a/Documentation/devicetree/bindings/clock/qcom,gcc-sdm660.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,gcc-sdm660.yaml
@@ -14,7 +14,7 @@ description: |
Qualcomm global clock control module provides the clocks, resets and power
domains on SDM630, SDM636 and SDM660
- See also::
+ See also:
include/dt-bindings/clock/qcom,gcc-sdm660.h (qcom,gcc-sdm630 and qcom,gcc-sdm660)
$ref: qcom,gcc.yaml#
diff --git a/Documentation/devicetree/bindings/clock/qcom,gpucc.yaml b/Documentation/devicetree/bindings/clock/qcom,gpucc.yaml
index 4cdff6161bf0..3ac4419009a9 100644
--- a/Documentation/devicetree/bindings/clock/qcom,gpucc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,gpucc.yaml
@@ -14,7 +14,7 @@ description: |
Qualcomm graphics clock control module provides the clocks, resets and power
domains on Qualcomm SoCs.
- See also::
+ See also:
include/dt-bindings/clock/qcom,gpucc-sdm845.h
include/dt-bindings/clock/qcom,gpucc-sa8775p.h
include/dt-bindings/clock/qcom,gpucc-sc7180.h
diff --git a/Documentation/devicetree/bindings/clock/qcom,ipq5018-gcc.yaml b/Documentation/devicetree/bindings/clock/qcom,ipq5018-gcc.yaml
index 489d0fc5607c..9925b931ecad 100644
--- a/Documentation/devicetree/bindings/clock/qcom,ipq5018-gcc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,ipq5018-gcc.yaml
@@ -13,7 +13,7 @@ description: |
Qualcomm global clock control module provides the clocks, resets and power
domains on IPQ5018
- See also::
+ See also:
include/dt-bindings/clock/qcom,ipq5018-gcc.h
include/dt-bindings/reset/qcom,ipq5018-gcc.h
diff --git a/Documentation/devicetree/bindings/clock/qcom,ipq9574-gcc.yaml b/Documentation/devicetree/bindings/clock/qcom,ipq9574-gcc.yaml
index 27ae9938febc..5b128fa841aa 100644
--- a/Documentation/devicetree/bindings/clock/qcom,ipq9574-gcc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,ipq9574-gcc.yaml
@@ -14,7 +14,7 @@ description: |
Qualcomm global clock control module provides the clocks, resets and power
domains on IPQ9574
- See also::
+ See also:
include/dt-bindings/clock/qcom,ipq9574-gcc.h
include/dt-bindings/reset/qcom,ipq9574-gcc.h
diff --git a/Documentation/devicetree/bindings/clock/qcom,qca8k-nsscc.yaml b/Documentation/devicetree/bindings/clock/qcom,qca8k-nsscc.yaml
index 61473385da2d..3da10c364a85 100644
--- a/Documentation/devicetree/bindings/clock/qcom,qca8k-nsscc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,qca8k-nsscc.yaml
@@ -14,7 +14,7 @@ description: |
Qualcomm NSS clock control module provides the clocks and resets
on QCA8386(switch mode)/QCA8084(PHY mode)
- See also::
+ See also:
include/dt-bindings/clock/qcom,qca8k-nsscc.h
include/dt-bindings/reset/qcom,qca8k-nsscc.h
diff --git a/Documentation/devicetree/bindings/clock/qcom,qcm2290-gpucc.yaml b/Documentation/devicetree/bindings/clock/qcom,qcm2290-gpucc.yaml
index 734880805c1b..bedbdabef672 100644
--- a/Documentation/devicetree/bindings/clock/qcom,qcm2290-gpucc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,qcm2290-gpucc.yaml
@@ -13,7 +13,7 @@ description: |
Qualcomm graphics clock control module provides the clocks, resets and power
domains on Qualcomm SoCs.
- See also::
+ See also:
include/dt-bindings/clock/qcom,qcm2290-gpucc.h
properties:
diff --git a/Documentation/devicetree/bindings/clock/qcom,rpmcc.yaml b/Documentation/devicetree/bindings/clock/qcom,rpmcc.yaml
index ab97d4b7dba8..b6c835bfd0d9 100644
--- a/Documentation/devicetree/bindings/clock/qcom,rpmcc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,rpmcc.yaml
@@ -12,7 +12,7 @@ maintainers:
description: |
The clock enumerators are defined in <dt-bindings/clock/qcom,rpmcc.h> and
- come in pairs:: FOO_CLK followed by FOO_A_CLK. The latter clock is
+ come in pairs: FOO_CLK followed by FOO_A_CLK. The latter clock is
an "active" clock, which means that the consumer only care that the clock is
available when the apps CPU subsystem is active, i.e. not suspended or in
deep idle. If it is important that the clock keeps running during system
diff --git a/Documentation/devicetree/bindings/clock/qcom,sc7280-lpasscorecc.yaml b/Documentation/devicetree/bindings/clock/qcom,sc7280-lpasscorecc.yaml
index 99ab9106009f..fd06ac9bceb9 100644
--- a/Documentation/devicetree/bindings/clock/qcom,sc7280-lpasscorecc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,sc7280-lpasscorecc.yaml
@@ -13,7 +13,7 @@ description: |
Qualcomm LPASS core and audio clock control module provides the clocks and
power domains on SC7280.
- See also::
+ See also:
include/dt-bindings/clock/qcom,lpasscorecc-sc7280.h
include/dt-bindings/clock/qcom,lpassaudiocc-sc7280.h
diff --git a/Documentation/devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml b/Documentation/devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml
index 273d66e245c5..f235b4e24cc7 100644
--- a/Documentation/devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml
@@ -13,7 +13,7 @@ description: |
Qualcomm LPASS core and audio clock control module provides the clocks,
and reset on SC8280XP.
- See also::
+ See also:
include/dt-bindings/clock/qcom,lpasscc-sc8280xp.h
properties:
diff --git a/Documentation/devicetree/bindings/clock/qcom,sm6115-lpasscc.yaml b/Documentation/devicetree/bindings/clock/qcom,sm6115-lpasscc.yaml
index 8cbab3fbb660..d7e1938b5e1b 100644
--- a/Documentation/devicetree/bindings/clock/qcom,sm6115-lpasscc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,sm6115-lpasscc.yaml
@@ -14,7 +14,7 @@ description: |
Qualcomm LPASS core and audio clock controllers provide audio-related resets
on SM6115 and its derivatives.
- See also::
+ See also:
include/dt-bindings/clock/qcom,sm6115-lpasscc.h
properties:
diff --git a/Documentation/devicetree/bindings/clock/qcom,sm8350-videocc.yaml b/Documentation/devicetree/bindings/clock/qcom,sm8350-videocc.yaml
index 5c2ecec0624e..a986ab4ce7c7 100644
--- a/Documentation/devicetree/bindings/clock/qcom,sm8350-videocc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,sm8350-videocc.yaml
@@ -13,7 +13,7 @@ description: |
Qualcomm video clock control module provides the clocks, resets and power
domains on Qualcomm SoCs.
- See also::
+ See also:
include/dt-bindings/clock/qcom,videocc-sm8350.h
include/dt-bindings/reset/qcom,videocc-sm8350.h
diff --git a/Documentation/devicetree/bindings/clock/qcom,videocc.yaml b/Documentation/devicetree/bindings/clock/qcom,videocc.yaml
index f4ff9acef9d5..124d259fc85e 100644
--- a/Documentation/devicetree/bindings/clock/qcom,videocc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,videocc.yaml
@@ -13,7 +13,7 @@ description: |
Qualcomm video clock control module provides the clocks, resets and power
domains on Qualcomm SoCs.
- See also::
+ See also:
include/dt-bindings/clock/qcom,sm6350-videocc.h
include/dt-bindings/clock/qcom,videocc-sc7180.h
include/dt-bindings/clock/qcom,videocc-sc7280.h
diff --git a/Documentation/devicetree/bindings/clock/samsung,exynos5260-clock.yaml b/Documentation/devicetree/bindings/clock/samsung,exynos5260-clock.yaml
index b05f83533e3d..56ab972c3da5 100644
--- a/Documentation/devicetree/bindings/clock/samsung,exynos5260-clock.yaml
+++ b/Documentation/devicetree/bindings/clock/samsung,exynos5260-clock.yaml
@@ -14,17 +14,17 @@ maintainers:
description: |
Expected external clocks, defined in DTS as fixed-rate clocks with a matching
- name::
+ name:
- "fin_pll" - PLL input clock from XXTI
- "xrtcxti" - input clock from XRTCXTI
- "ioclk_pcm_extclk" - pcm external operation clock
- "ioclk_spdif_extclk" - spdif external operation clock
- "ioclk_i2s_cdclk" - i2s0 codec clock
- Phy clocks::
+ Phy clocks:
There are several clocks which are generated by specific PHYs. These clocks
are fed into the clock controller and then routed to the hardware blocks.
- These clocks are defined as fixed clocks in the driver with following names::
+ These clocks are defined as fixed clocks in the driver with following names:
- "phyclk_dptx_phy_ch3_txd_clk" - dp phy clock for channel 3
- "phyclk_dptx_phy_ch2_txd_clk" - dp phy clock for channel 2
- "phyclk_dptx_phy_ch1_txd_clk" - dp phy clock for channel 1
diff --git a/Documentation/devicetree/bindings/clock/samsung,exynos5410-clock.yaml b/Documentation/devicetree/bindings/clock/samsung,exynos5410-clock.yaml
index b737c9d35a1c..1d907dd8fbf1 100644
--- a/Documentation/devicetree/bindings/clock/samsung,exynos5410-clock.yaml
+++ b/Documentation/devicetree/bindings/clock/samsung,exynos5410-clock.yaml
@@ -14,7 +14,7 @@ maintainers:
description: |
Expected external clocks, defined in DTS as fixed-rate clocks with a matching
- name::
+ name:
- "fin_pll" - PLL input clock from XXTI
All available clocks are defined as preprocessor macros in
diff --git a/Documentation/devicetree/bindings/clock/samsung,exynos5433-clock.yaml b/Documentation/devicetree/bindings/clock/samsung,exynos5433-clock.yaml
index 3f9326e09f79..8a289f1e2ace 100644
--- a/Documentation/devicetree/bindings/clock/samsung,exynos5433-clock.yaml
+++ b/Documentation/devicetree/bindings/clock/samsung,exynos5433-clock.yaml
@@ -14,7 +14,7 @@ maintainers:
description: |
Expected external clocks, defined in DTS as fixed-rate clocks with a matching
- name::
+ name:
- "oscclk" - PLL input clock from XXTI
All available clocks are defined as preprocessor macros in
diff --git a/Documentation/devicetree/bindings/clock/samsung,exynos7-clock.yaml b/Documentation/devicetree/bindings/clock/samsung,exynos7-clock.yaml
index c137c6744ef9..a51cd4fafb41 100644
--- a/Documentation/devicetree/bindings/clock/samsung,exynos7-clock.yaml
+++ b/Documentation/devicetree/bindings/clock/samsung,exynos7-clock.yaml
@@ -14,7 +14,7 @@ maintainers:
description: |
Expected external clocks, defined in DTS as fixed-rate clocks with a matching
- name::
+ name:
- "fin_pll" - PLL input clock from XXTI
All available clocks are defined as preprocessor macros in
diff --git a/Documentation/devicetree/bindings/clock/samsung,exynos850-clock.yaml b/Documentation/devicetree/bindings/clock/samsung,exynos850-clock.yaml
index cdc5ded59fe5..68c2fd318765 100644
--- a/Documentation/devicetree/bindings/clock/samsung,exynos850-clock.yaml
+++ b/Documentation/devicetree/bindings/clock/samsung,exynos850-clock.yaml
@@ -17,7 +17,7 @@ description: |
Exynos850 clock controller is comprised of several CMU units, generating
clocks for different domains. Those CMU units are modeled as separate device
tree nodes, and might depend on each other. Root clocks in that clock tree are
- two external clocks:: OSCCLK (26 MHz) and RTCCLK (32768 Hz). Those external
+ two external clocks: OSCCLK (26 MHz) and RTCCLK (32768 Hz). Those external
clocks must be defined as fixed-rate clocks in dts.
CMU_TOP is a top-level CMU, where all base clocks are prepared using PLLs and
diff --git a/Documentation/devicetree/bindings/clock/samsung,exynosautov9-clock.yaml b/Documentation/devicetree/bindings/clock/samsung,exynosautov9-clock.yaml
index 32f39e543b36..e9d17d48b4f3 100644
--- a/Documentation/devicetree/bindings/clock/samsung,exynosautov9-clock.yaml
+++ b/Documentation/devicetree/bindings/clock/samsung,exynosautov9-clock.yaml
@@ -17,7 +17,7 @@ description: |
Exynos Auto v9 clock controller is comprised of several CMU units, generating
clocks for different domains. Those CMU units are modeled as separate device
tree nodes, and might depend on each other. Root clocks in that clock tree are
- two external clocks:: OSCCLK/XTCXO (26 MHz) and RTCCLK/XrtcXTI (32768 Hz).
+ two external clocks: OSCCLK/XTCXO (26 MHz) and RTCCLK/XrtcXTI (32768 Hz).
The external OSCCLK must be defined as fixed-rate clock in dts.
CMU_TOP is a top-level CMU, where all base clocks are prepared using PLLs and
diff --git a/Documentation/devicetree/bindings/clock/samsung,exynosautov920-clock.yaml b/Documentation/devicetree/bindings/clock/samsung,exynosautov920-clock.yaml
index 6b1fc61a2ff9..475db824d4d3 100644
--- a/Documentation/devicetree/bindings/clock/samsung,exynosautov920-clock.yaml
+++ b/Documentation/devicetree/bindings/clock/samsung,exynosautov920-clock.yaml
@@ -17,7 +17,7 @@ description: |
ExynosAuto v920 clock controller is comprised of several CMU units, generating
clocks for different domains. Those CMU units are modeled as separate device
tree nodes, and might depend on each other. Root clocks in that clock tree are
- two external clocks:: OSCCLK/XTCXO (38.4 MHz) and RTCCLK/XrtcXTI (32768 Hz).
+ two external clocks: OSCCLK/XTCXO (38.4 MHz) and RTCCLK/XrtcXTI (32768 Hz).
The external OSCCLK must be defined as fixed-rate clock in dts.
CMU_TOP is a top-level CMU, where all base clocks are prepared using PLLs and
diff --git a/Documentation/devicetree/bindings/clock/samsung,s5pv210-clock.yaml b/Documentation/devicetree/bindings/clock/samsung,s5pv210-clock.yaml
index 67a33665cf00..b1617d96d3fb 100644
--- a/Documentation/devicetree/bindings/clock/samsung,s5pv210-clock.yaml
+++ b/Documentation/devicetree/bindings/clock/samsung,s5pv210-clock.yaml
@@ -14,7 +14,7 @@ maintainers:
description: |
Expected external clocks, defined in DTS as fixed-rate clocks with a matching
- name::
+ name:
- "xxti" - external crystal oscillator connected to XXTI and XXTO pins of
the SoC,
- "xusbxti" - external crystal oscillator connected to XUSBXTI and XUSBXTO
--
2.53.0
^ permalink raw reply related
* [BUG] usbip: vhci-hcd: status sysfs read races with HCD teardown
From: Cen Zhang @ 2026-06-23 3:16 UTC (permalink / raw)
To: Valentina Manea, Shuah Khan
Cc: Hongren Zheng, Greg Kroah-Hartman, linux-usb, linux-kernel,
baijiaju1990
Hi,
I hit a KASAN use-after-free in usbip vhci-hcd when reading the vhci
status sysfs file while the vhci platform device is being rebound through
the driver core test-remove path.
VHCI exposes sysfs files under:
/sys/devices/platform/vhci_hcd.0/
The status callback can walk VHCI controller state, including the shared
SuperSpeed HCD. In the teardown path, the shared HCD can be removed and
put before the sysfs group is withdrawn, leaving a window where
status_show() can dereference freed HCD state.
Observed report:
BUG: KASAN: slab-use-after-free in _raw_spin_lock+0x30/0x40
Read of size 1 at addr ffff8880095f4478 by task cat/554
CPU: 0 UID: 0 PID: 554 Comm: cat Not tainted
7.1.0-rc2-00375-g917719c412c4 #3 PREEMPT(lazy)
Call Trace:
<TASK>
dump_stack_lvl+0x66/0xa0
print_report+0xce/0x630
? _raw_spin_lock+0x30/0x40
? srso_alias_return_thunk+0x5/0xfbef5
? __virt_addr_valid+0x188/0x320
? _raw_spin_lock+0x30/0x40
kasan_report+0xe0/0x110
? _raw_spin_lock+0x30/0x40
? _raw_spin_lock+0x30/0x40
__kasan_check_byte+0x36/0x50
lock_acquire+0x11f/0x300
? status_show+0x2cb/0x3d0
? srso_alias_return_thunk+0x5/0xfbef5
? lock_release+0xc8/0x290
? __asan_memcpy+0x3c/0x60
_raw_spin_lock+0x30/0x40
? status_show+0x320/0x3d0
status_show+0x320/0x3d0
? __pfx_status_show+0x10/0x10
? __pfx_status_show+0x10/0x10
? dev_attr_show+0x24/0x90
dev_attr_show+0x3b/0x90
sysfs_kf_seq_show+0x115/0x1a0
? __pfx_dev_attr_show+0x10/0x10
seq_read_iter+0x29d/0x790
vfs_read+0x406/0x590
? __pfx_vfs_read+0x10/0x10
ksys_read+0xd2/0x170
? __pfx_ksys_read+0x10/0x10
? srso_alias_return_thunk+0x5/0xfbef5
? srso_alias_return_thunk+0x5/0xfbef5
do_syscall_64+0x115/0x6a0
entry_SYSCALL_64_after_hwframe+0x77/0x7f
</TASK>
Allocated by task 545:
kasan_save_stack+0x33/0x60
kasan_save_track+0x14/0x30
__kasan_kmalloc+0x8f/0xa0
__kmalloc_noprof+0x28f/0x760
__usb_create_hcd+0x45/0x500
vhci_hcd_probe+0xd9/0x250
platform_probe+0x69/0xe0
really_probe+0x163/0x660
__driver_probe_device+0x106/0x240
device_driver_attach+0x7d/0x110
bind_store+0x95/0xe0
kernfs_fop_write_iter+0x1e0/0x280
vfs_write+0x469/0x810
ksys_write+0xd2/0x170
do_syscall_64+0x115/0x6a0
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 545:
kasan_save_stack+0x33/0x60
kasan_save_track+0x14/0x30
kasan_save_free_info+0x3b/0x60
__kasan_slab_free+0x43/0x70
kfree+0x315/0x540
vhci_hcd_remove+0x66/0xc0
really_probe+0x316/0x660
__driver_probe_device+0x106/0x240
device_driver_attach+0x7d/0x110
bind_store+0x95/0xe0
kernfs_fop_write_iter+0x1e0/0x280
vfs_write+0x469/0x810
ksys_write+0xd2/0x170
do_syscall_64+0x115/0x6a0
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Last potentially related work creation:
kasan_save_stack+0x33/0x60
kasan_record_aux_stack+0x8c/0xa0
__queue_work+0x661/0xa90
queue_work_on+0x5f/0xb0
unlink1+0x210/0x220
usb_hcd_unlink_urb+0xb8/0x120
usb_kill_urb.part.0+0x96/0x1c0
hub_quiesce+0xfa/0x160
hub_suspend+0x292/0x4f0
usb_suspend_both+0x170/0x4c0
usb_runtime_suspend+0x30/0x90
__rpm_callback+0x67/0x290
rpm_callback+0xab/0xc0
rpm_suspend+0x1c2/0x970
__pm_runtime_suspend+0x3d/0x1d0
usb_new_device+0x645/0x870
register_root_hub+0x146/0x320
usb_add_hcd+0x726/0xbd0
vhci_hcd_probe+0xf1/0x250
platform_probe+0x69/0xe0
really_probe+0x163/0x660
__driver_probe_device+0x106/0x240
device_driver_attach+0x7d/0x110
bind_store+0x95/0xe0
kernfs_fop_write_iter+0x1e0/0x280
vfs_write+0x469/0x810
ksys_write+0xd2/0x170
do_syscall_64+0x115/0x6a0
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Second to last potentially related work creation:
kasan_save_stack+0x33/0x60
kasan_record_aux_stack+0x8c/0xa0
__queue_work+0x661/0xa90
queue_work_on+0x5f/0xb0
usb_hcd_submit_urb+0x41c/0xf30
usb_start_wait_urb+0xd8/0x2d0
usb_control_msg+0x1c6/0x250
hub_suspend+0x37d/0x4f0
usb_suspend_both+0x170/0x4c0
usb_runtime_suspend+0x30/0x90
__rpm_callback+0x67/0x290
rpm_callback+0xab/0xc0
rpm_suspend+0x1c2/0x970
__pm_runtime_suspend+0x3d/0x1d0
usb_new_device+0x645/0x870
register_root_hub+0x146/0x320
usb_add_hcd+0x726/0xbd0
vhci_hcd_probe+0xf1/0x250
platform_probe+0x69/0xe0
really_probe+0x163/0x660
__driver_probe_device+0x106/0x240
device_driver_attach+0x7d/0x110
bind_store+0x95/0xe0
kernfs_fop_write_iter+0x1e0/0x280
vfs_write+0x469/0x810
ksys_write+0xd2/0x170
do_syscall_64+0x115/0x6a0
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff8880095f4000 which
belongs to the cache kmalloc-8k of size 8192.
The buggy address is located 1144 bytes inside of freed 8192-byte
region [ffff8880095f4000, ffff8880095f6000).
A simplified ordering is:
VHCI bind/test-remove path sysfs reader
vhci_hcd_probe() cat vhci_hcd.0/status
usb_add_hcd() for SS HCD
test remove runs
vhci_hcd_remove()
usb_remove_hcd()
usb_put_hcd() frees SS HCD status_show() walks SS state
Reproducer, run as root on a KASAN kernel with CONFIG_USBIP_VHCI_HCD
and CONFIG_DEBUG_TEST_DRIVER_REMOVE enabled:
set -e
modprobe vhci_hcd || true
status=/sys/devices/platform/vhci_hcd.0/status
bind=/sys/bus/platform/drivers/vhci_hcd/bind
unbind=/sys/bus/platform/drivers/vhci_hcd/unbind
dev=vhci_hcd.0
if [ -e "$status" ]; then
echo "$dev" > "$unbind" 2>/dev/null || true
fi
(
deadline=$((SECONDS + 30))
while [ ! -e "$status" ]; do
[ "$SECONDS" -lt "$deadline" ] || exit 1
sleep 0.1
done
for i in $(seq 1 50000); do
[ -e "$status" ] || break
cat "$status" >/dev/null 2>&1 || true
done
) &
reader=$!
sleep 0.2
echo "$dev" > "$bind"
wait "$reader"
This looks like the vhci sysfs group needs to be published only after all
state reachable from the callbacks is live, and removed before any of that
state is removed or put.
Thanks,
Cen
^ permalink raw reply
* RE: [PATCH 1/2] dt-bindings: clock: Drop incorrect usage of double '::'
From: Alim Akhtar @ 2026-06-22 11:42 UTC (permalink / raw)
To: 'Krzysztof Kozlowski', 'Bjorn Andersson',
'Konrad Dybcio', 'Rob Herring',
'Krzysztof Kozlowski', 'Conor Dooley',
'Peter Griffin', 'Michael Turquette',
'Stephen Boyd', 'Brian Masney',
'Sylwester Nawrocki', 'Chanwoo Choi',
'Sam Protsenko', 'Rob Clark',
'Dmitry Baryshkov', 'Abhinav Kumar',
'Jessica Zhang', 'Sean Paul',
'Marijn Suijten', 'David Airlie',
'Simona Vetter', 'Maarten Lankhorst',
'Maxime Ripard', 'Thomas Zimmermann',
'Inki Dae', 'Seung-Woo Kim',
'Kyungmin Park', 'Andi Shyti',
'Georgi Djakov', 'Lee Jones',
'Pavel Machek', 'Hans Verkuil',
'Mauro Carvalho Chehab', 'Ulf Hansson',
'Peter Rosin', 'Vinod Koul',
'Neil Armstrong', 'Linus Walleij',
'Geert Uytterhoeven', 'Magnus Damm',
'Sebastian Reichel', 'Javier Martinez Canillas',
'Liam Girdwood', 'Mark Brown',
'Greg Kroah-Hartman', 'Jiri Slaby',
'Srinivas Kandagatla',
'Bartlomiej Zolnierkiewicz', 'Rafael J. Wysocki',
'Daniel Lezcano', 'Zhang Rui',
'Lukasz Luba', 'Jonathan Marek',
'Taniya Das', 'Robert Marko',
'Christian Marangi', 'Stephan Gerhold',
'Adam Skladowski', 'Sireesh Kodali',
'Barnabas Czeman', 'Imran Shaik',
'Sricharan Ramabadhran', 'Anusha Rao',
'Luo Jie', 'Tomasz Figa', 'Chanho Park',
'Sunyeal Hong', 'Shin Son',
'Krishna Manikandan', 'Jacek Anaszewski',
'Jaehoon Chung', 'Marek Szyprowski',
'Alina Yu', 'Andy Gross',
'Niklas Söderlund', 'Wesley Cheng',
linux-arm-msm, devicetree, linux-kernel, linux-arm-kernel,
linux-samsung-soc, linux-clk, dri-devel, freedreno, linux-i2c,
linux-pm, linux-leds, linux-media, linux-mmc, linux-phy,
linux-gpio, linux-renesas-soc, linux-serial, linux-sound,
linux-usb, cpgs
In-Reply-To: <20260622101606.485961-3-krzysztof.kozlowski@oss.qualcomm.com>
> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
> Sent: Monday, June 22, 2026 3:46 PM
> To: Bjorn Andersson <andersson@kernel.org>; Konrad Dybcio
> <konradybcio@kernel.org>; Rob Herring <robh@kernel.org>; Krzysztof
> Kozlowski <krzk+dt@kernel.org>; Conor Dooley <conor+dt@kernel.org>;
> Peter Griffin <peter.griffin@linaro.org>; Alim Akhtar
> <alim.akhtar@samsung.com>; Michael Turquette
> <mturquette@baylibre.com>; Stephen Boyd <sboyd@kernel.org>; Brian
> Masney <bmasney@redhat.com>; Sylwester Nawrocki
[Snip]
> Documentation/devicetree/bindings/clock/qcom,videocc.yaml | 2 +-
> .../devicetree/bindings/clock/samsung,exynos5260-clock.yaml | 6 +++---
> .../devicetree/bindings/clock/samsung,exynos5410-clock.yaml | 2 +-
> .../devicetree/bindings/clock/samsung,exynos5433-clock.yaml | 2 +-
> .../devicetree/bindings/clock/samsung,exynos7-clock.yaml | 2 +-
> .../devicetree/bindings/clock/samsung,exynos850-clock.yaml | 2 +-
> .../bindings/clock/samsung,exynosautov9-clock.yaml | 2 +-
> .../bindings/clock/samsung,exynosautov920-clock.yaml | 2 +-
> .../devicetree/bindings/clock/samsung,s5pv210-clock.yaml | 2 +-
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
^ permalink raw reply
* RE: [PATCH 2/2] dt-bindings: Drop incorrect usage of double '::'
From: Alim Akhtar @ 2026-06-22 11:45 UTC (permalink / raw)
To: 'Krzysztof Kozlowski', 'Bjorn Andersson',
'Konrad Dybcio', 'Rob Herring',
'Krzysztof Kozlowski', 'Conor Dooley',
'Peter Griffin', 'Michael Turquette',
'Stephen Boyd', 'Brian Masney',
'Sylwester Nawrocki', 'Chanwoo Choi',
'Sam Protsenko', 'Rob Clark',
'Dmitry Baryshkov', 'Abhinav Kumar',
'Jessica Zhang', 'Sean Paul',
'Marijn Suijten', 'David Airlie',
'Simona Vetter', 'Maarten Lankhorst',
'Maxime Ripard', 'Thomas Zimmermann',
'Inki Dae', 'Seung-Woo Kim',
'Kyungmin Park', 'Andi Shyti',
'Georgi Djakov', 'Lee Jones',
'Pavel Machek', 'Hans Verkuil',
'Mauro Carvalho Chehab', 'Ulf Hansson',
'Peter Rosin', 'Vinod Koul',
'Neil Armstrong', 'Linus Walleij',
'Geert Uytterhoeven', 'Magnus Damm',
'Sebastian Reichel', 'Javier Martinez Canillas',
'Liam Girdwood', 'Mark Brown',
'Greg Kroah-Hartman', 'Jiri Slaby',
'Srinivas Kandagatla',
'Bartlomiej Zolnierkiewicz', 'Rafael J. Wysocki',
'Daniel Lezcano', 'Zhang Rui',
'Lukasz Luba', 'Jonathan Marek',
'Taniya Das', 'Robert Marko',
'Christian Marangi', 'Stephan Gerhold',
'Adam Skladowski', 'Sireesh Kodali',
'Barnabas Czeman', 'Imran Shaik',
'Sricharan Ramabadhran', 'Anusha Rao',
'Luo Jie', 'Tomasz Figa', 'Chanho Park',
'Sunyeal Hong', 'Shin Son',
'Krishna Manikandan', 'Jacek Anaszewski',
'Jaehoon Chung', 'Marek Szyprowski',
'Alina Yu', 'Andy Gross',
'Niklas Söderlund', 'Wesley Cheng',
linux-arm-msm, devicetree, linux-kernel, linux-arm-kernel,
linux-samsung-soc, linux-clk, dri-devel, freedreno, linux-i2c,
linux-pm, linux-leds, linux-media, linux-mmc, linux-phy,
linux-gpio, linux-renesas-soc, linux-serial, linux-sound,
linux-usb, cpgs
In-Reply-To: <20260622101606.485961-4-krzysztof.kozlowski@oss.qualcomm.com>
> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
> Sent: Monday, June 22, 2026 3:46 PM
> To: Bjorn Andersson <andersson@kernel.org>; Konrad Dybcio
> <konradybcio@kernel.org>; Rob Herring <robh@kernel.org>; Krzysztof
> Kozlowski <krzk+dt@kernel.org>; Conor Dooley <conor+dt@kernel.org>;
> Peter Griffin <peter.griffin@linaro.org>; Alim Akhtar
> <alim.akhtar@samsung.com>; Michael Turquette
> <mturquette@baylibre.com>; Stephen Boyd <sboyd@kernel.org>; Brian
> Masney <bmasney@redhat.com>; Sylwester Nawrocki
[Snip]
> soc@vger.kernel.org; linux-serial@vger.kernel.org; linux-
> sound@vger.kernel.org; linux-usb@vger.kernel.org
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
> Subject: [PATCH 2/2] dt-bindings: Drop incorrect usage of double '::'
>
> There is no use of double colon '::' in YAML. OTOH, the literal style block, e.g.
> using '|' treats all characters as content [1] therefore single use of ':' in
> descriptions is perfectly fine, whenever '|' is used.
>
> Cleanup existing code, so the confusing style won't be re-used in new
> contributions.
>
> Link: https://protect2.fireeye.com/v1/url?k=20b000b4-490b6806-20b18bfb-
> 905a08a8515a-b42887ea7482314e&q=1&e=9fffcc8f-6266-432d-a638-
> 208efe86c9d7&u=https%3A%2F%2Fyaml.org%2Fspec%2F1.2.2%2F%23literal-
> style [1]
> Signed-off-by: Krzysztof Kozlowski
> <krzysztof.kozlowski@oss.qualcomm.com>
>
For Samsung IPs related
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
^ permalink raw reply
* Re: [PATCH] usbip: tools: support SuperSpeed Plus devices
From: raoxu @ 2026-06-23 3:00 UTC (permalink / raw)
To: skhan; +Cc: i, linux-kernel, linux-usb, raoxu, shuah, valentina.manea.m
In-Reply-To: <d2c461a4-9271-43b5-9ba4-8c3c9c63c134@linuxfoundation.org>
Hi Shuah,
Thanks for reviewing.
On Mon, Jun 22, 2026 at 01:20:16PM -0600, Shuah Khan wrote:
> > + { USB_SPEED_SUPER_PLUS, "10000", "SuperSpeed Plus" },
> > + { USB_SPEED_SUPER_PLUS, "20000", "SuperSpeed Plus" },
>
> These are duplicate strings? Shouldn't they
> be unique?
The sysfs strings are unique: "10000" and "20000". They map to the
same USB_SPEED_SUPER_PLUS enum because enum usb_device_speed does not
distinguish the SuperSpeed Plus link rates.
> > + case USB_SPEED_SUPER_PLUS:
> > if (vhci_driver->idev[i].hub != HUB_SPEED_SUPER)
>
> Won't this continue when hub == USB_SPEED_SUPER_PLUS?
> Doesn't look right to me.
idev[i].hub is enum hub_speed, not enum usb_device_speed. enum
hub_speed identifies the two VHCI root-hub groups:
HUB_SPEED_HIGH
HUB_SPEED_SUPER
There is no HUB_SPEED_SUPER_PLUS value or separate SuperSpeed Plus
root-hub group. Both USB_SPEED_SUPER and USB_SPEED_SUPER_PLUS devices
use the existing USB 3.x VHCI root hub, represented by
HUB_SPEED_SUPER.
Therefore, when speed is USB_SPEED_SUPER_PLUS, a port with
idev[i].hub == HUB_SPEED_SUPER is the expected match and the code does
not continue.
Thanks,
Xu Rao
^ permalink raw reply
* [BUG] usb: gadget: u_serial: ttyGS open races with configfs function removal
From: Cen Zhang @ 2026-06-23 2:43 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-usb; +Cc: linux-kernel, baijiaju1990
Hi,
I hit a KASAN use-after-free in the USB gadget serial function when a
ttyGS device is opened while the corresponding configfs gser function
instance is being removed.
The race is between a userspace open of /dev/ttyGS0 and configfs removal
of functions/gser.usb0. gserial_free_line() can free struct gs_port
while the tty device/cdev path can still route a first open to the
embedded tty_port.
A simplified ordering is:
configfs removal racing opener
rmdir functions/gser.usb0 open("/dev/ttyGS0")
gser_free_inst()
gserial_free_line()
gserial_free_port()
kfree(struct gs_port) tty_open()
tty_init_dev()
write through freed tty_port
Observed report:
BUG: KASAN: slab-use-after-free in tty_init_dev.part.0+0xd8/0x2a0
The buggy address belongs to the object at ffff888101011000 which
belongs to the cache kmalloc-2k of size 2048.
The buggy address is located 296 bytes inside of freed 2048-byte region
[ffff888101011000, ffff888101011800).
Write of size 8
Call Trace:
<TASK>
dump_stack_lvl+0x66/0xa0
print_report+0xce/0x630
? fixup_red_left+0x9/0x30
? tty_init_dev.part.0+0xd8/0x2a0
kasan_report+0xe0/0x110
? tty_init_dev.part.0+0xd8/0x2a0
tty_init_dev.part.0+0xd8/0x2a0
tty_open+0x702/0xa40
? 0xffffffffc0000095
? __pfx_tty_open+0x10/0x10
? __pfx_tty_open+0x10/0x10
? chrdev_open+0x143/0x360
chrdev_open+0x157/0x360
? __pfx_chrdev_open+0x10/0x10
? do_dentry_open+0x610/0x7f0
? __pfx_chrdev_open+0x10/0x10
do_dentry_open+0x233/0x7f0
vfs_open+0x5a/0x1b0
path_openat+0x66d/0x1540
? srso_alias_return_thunk+0x5/0xfbef5
? 0xffffffffc0000095
? __pfx_path_openat+0x10/0x10
? srso_alias_return_thunk+0x5/0xfbef5
? do_file_open+0x165/0x2b0
do_file_open+0x186/0x2b0
? __pfx_do_file_open+0x10/0x10
? do_raw_spin_unlock+0x9a/0x100
? srso_alias_return_thunk+0x5/0xfbef5
? _raw_spin_unlock+0x23/0x40
? do_raw_spin_unlock+0x9a/0x100
do_sys_openat2+0xce/0x150
? __pfx_do_sys_openat2+0x10/0x10
? __x64_sys_openat+0x99/0x140
__x64_sys_openat+0xd0/0x140
? __pfx___x64_sys_openat+0x10/0x10
do_syscall_64+0x115/0x6a0
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Allocated by task 475:
kasan_save_stack+0x33/0x60
kasan_save_track+0x14/0x30
__kasan_kmalloc+0x8f/0xa0
gserial_alloc_line_no_console+0x7e/0x4d0
gser_alloc_inst+0x58/0xa0
try_get_usb_function_instance+0xae/0xf0
usb_get_function_instance+0x12/0x50
function_make+0x155/0x290
configfs_mkdir+0x2aa/0x680
vfs_mkdir+0x150/0x390
filename_mkdirat+0x2ef/0x350
__x64_sys_mkdir+0x47/0x60
do_syscall_64+0x115/0x6a0
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 549:
kasan_save_stack+0x33/0x60
kasan_save_track+0x14/0x30
kasan_save_free_info+0x3b/0x60
__kasan_slab_free+0x43/0x70
kfree+0x2f9/0x530
gserial_free_port+0xe1/0x1f0
gserial_free_line+0xa0/0x150
gser_free_inst+0x25/0x30
usb_put_function_instance+0x4e/0x60
config_item_cleanup+0x8f/0xf0
configfs_rmdir+0x39c/0x4f0
vfs_rmdir+0x18d/0x380
filename_rmdir+0x2d2/0x360
__x64_sys_rmdir+0x34/0x50
do_syscall_64+0x115/0x6a0
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Reproducer, run as root on a KASAN kernel:
modprobe libcomposite || true
modprobe usb_f_serial || true
mount -t configfs none /sys/kernel/config 2>/dev/null || true
G=/sys/kernel/config/usb_gadget/gser-race
F=$G/functions/gser.usb0
rmdir "$F" 2>/dev/null || true
rmdir "$G" 2>/dev/null || true
mkdir "$G"
mkdir "$F"
port=$(cat "$F/port_num")
dev=/dev/ttyGS$port
cat > /tmp/ttygs_open_worker.c <<'EOF'
#include <fcntl.h>
#include <unistd.h>
#include <time.h>
int main(int argc, char **argv)
{
const char *path = argv[1];
time_t end = time(NULL) + 12;
while (time(NULL) < end) {
int fd = open(path, O_RDWR | O_NONBLOCK | O_NOCTTY);
if (fd >= 0)
close(fd);
usleep(500);
}
return 0;
}
EOF
gcc -O2 -o /tmp/ttygs_open_worker /tmp/ttygs_open_worker.c
/tmp/ttygs_open_worker "$dev" &
sleep 1
rmdir "$F"
wait
Thanks,
Cen
^ permalink raw reply
* [PATCH v3] usb: serial: option: add multiple VID/PID
From: yangsizhe @ 2026-06-23 2:41 UTC (permalink / raw)
To: johan, gregkh, linux-usb, linux-kernel, yangsizhe; +Cc: yangsizhe
Add the PID and VID to facilitate the binding of our company's module
Real name:MeiG Smart Technology Co., Ltd
Signed-off-by: yangsizhe <18392868223@163.com>
---
Changes from v2:
1. Adjust reserved interface mask, avoid conflicts with the RNDIS driver.
Changes from v1:
1. Add Real name into commit changelog description for device identification.
---
drivers/usb/serial/option.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index a34e79cfd5b6..580e2a621d18 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -2458,6 +2458,24 @@ static const struct usb_device_id option_ids[] = {
{ USB_DEVICE_AND_INTERFACE_INFO(0x2dee, 0x4d64, 0xff, 0xff, 0x30) }, /* MeiG SRM813Q (Diag) */
{ USB_DEVICE_AND_INTERFACE_INFO(0x2dee, 0x4d64, 0xff, 0xff, 0x40) }, /* MeiG SRM813Q (AT) */
{ USB_DEVICE_AND_INTERFACE_INFO(0x2dee, 0x4d64, 0xff, 0xff, 0x60) }, /* MeiG SRM813Q (NMEA) */
+ { USB_DEVICE(0x2dee, 0x4d23), /* MeiG SLM868x*/
+ .driver_info = RSVD(4) | RSVD(5) | RDVD(6) },
+ { USB_DEVICE(0x2dee, 0x4d62), /* MeiG SLM820x*/
+ .driver_info = RSVD(4) },
+ { USB_DEVICE(0x2dee, 0x4d30), /* MeiG SRM813Q*/
+ .driver_info = RSVD(0) | RSVD(1) },
+ { USB_DEVICE(0x2dee, 0x4d50), /* MeiG SRM811x*/
+ .driver_info = RSVD(0) | RSVD(1) | RSVD(6) },
+ { USB_DEVICE(0x2dee, 0x4d51), /* MeiG SRM821x*/
+ .driver_info = RSVD(0) | RSVD(1) | RSVD(6) },
+ { USB_DEVICE(0x2dee, 0x4d52), /* MeiG SRM810x*/
+ .driver_info = RSVD(0) | RSVD(1) | RSVD(6) },
+ { USB_DEVICE(0x2dee, 0x4d57), /* MeiG SLM770A*/
+ .driver_info = RSVD(0) | RSVD(1) },
+ { USB_DEVICE(0x2dee, 0x4d58), /* MeiG SLM828A*/
+ .driver_info = RSVD(0) | RSVD(1) },
+ { USB_DEVICE(0x05c6, 0xf601), /* MeiG SLM750x*/
+ .driver_info = RSVD(5) },
{ USB_DEVICE_INTERFACE_CLASS(0x2df3, 0x9d03, 0xff) }, /* LongSung M5710 */
{ USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1404, 0xff) }, /* GosunCn GM500 RNDIS */
--
2.17.1
^ permalink raw reply related
* [PATCH] usb: gadget: f_tcm: Cancel delayed set_alt work on teardown
From: Cen Zhang @ 2026-06-23 1:52 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiasheng Jiang, Kees Cook, Mike Christie,
Martin K . Petersen, Christophe JAILLET, Thinh Nguyen
Cc: linux-usb, linux-kernel, baijiaju1990, zzzccc427
tcm_set_alt() defers BOT/UAS endpoint setup to a system workqueue and
returns USB_GADGET_DELAYED_STATUS. The queued work keeps the function
state alive only by a raw struct f_uas pointer, but configfs unlink can
unbind and free that function before the work runs.
The buggy scenario involves two paths, with each column showing the order
within that path:
USB control request path: configfs unlink path:
1. SET_CONFIGURATION or 1. Userspace removes the function
SET_INTERFACE reaches symlink while the gadget is bound.
tcm_set_alt().
2. tcm_set_alt() queues delayed 2. config_usb_cfg_unlink() forces
set_alt work and returns gadget unregister.
USB_GADGET_DELAYED_STATUS.
3. tcm_delayed_set_alt() later 3. tcm_unbind() releases descriptors
dereferences struct f_uas. and tcm_free() frees struct f_uas.
Validation reproduced this kernel report:
BUG: KASAN: slab-use-after-free in tcm_delayed_set_alt+0x6c/0xef0
Call Trace:
<TASK>
dump_stack_lvl+0x66/0xa0
print_report+0xce/0x630
? tcm_delayed_set_alt+0x6c/0xef0
? srso_alias_return_thunk+0x5/0xfbef5
? __virt_addr_valid+0x188/0x320
? tcm_delayed_set_alt+0x6c/0xef0
kasan_report+0xe0/0x110
? tcm_delayed_set_alt+0x6c/0xef0
tcm_delayed_set_alt+0x6c/0xef0
? __pfx_tcm_delayed_set_alt+0x10/0x10
? process_one_work+0x4cb/0xb90
? rcu_is_watching+0x20/0x50
? tcm_delayed_set_alt+0x9/0xef0
process_one_work+0x4d7/0xb90
? __pfx_process_one_work+0x10/0x10
? srso_alias_return_thunk+0x5/0xfbef5
? __list_add_valid_or_report+0x37/0xf0
? __pfx_tcm_delayed_set_alt+0x10/0x10
? srso_alias_return_thunk+0x5/0xfbef5
worker_thread+0x2d8/0x570
? __pfx_worker_thread+0x10/0x10
kthread+0x1ad/0x1f0
? __pfx_kthread+0x10/0x10
ret_from_fork+0x3c9/0x540
? __pfx_ret_from_fork+0x10/0x10
? srso_alias_return_thunk+0x5/0xfbef5
? __switch_to+0x2e9/0x730
? __pfx_kthread+0x10/0x10
ret_from_fork_asm+0x1a/0x30
</TASK>
Allocated by task 544:
kasan_save_stack+0x33/0x60
kasan_save_track+0x14/0x30
__kasan_kmalloc+0x8f/0xa0
tcm_alloc+0x68/0x180
usb_get_function+0x36/0x60
config_usb_cfg_link+0x125/0x1b0
configfs_symlink+0x322/0x890
vfs_symlink+0xc2/0x270
filename_symlinkat+0x295/0x2f0
__x64_sys_symlinkat+0x62/0x90
do_syscall_64+0x115/0x6a0
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 661:
kasan_save_stack+0x33/0x60
kasan_save_track+0x14/0x30
kasan_save_free_info+0x3b/0x60
__kasan_slab_free+0x43/0x70
kfree+0x2f9/0x530
config_usb_cfg_unlink+0x173/0x1e0
configfs_unlink+0x1fa/0x340
vfs_unlink+0x15c/0x510
filename_unlinkat+0x2ba/0x450
__x64_sys_unlinkat+0x63/0x90
do_syscall_64+0x115/0x6a0
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Make the delayed set_alt work item owned by struct f_uas instead of an
anonymous heap allocation. This gives teardown paths a stable handle for
the exact work item: disable cancels pending work without sleeping, and
unbind/free synchronously cancel it before descriptors or struct f_uas are
released.
Fixes: c52661d60f63 ("usb-gadget: Initial merge of target module for UASP + BOT")
Assisted-by: Codex:gpt-5.5
Signed-off-by: Cen Zhang <zzzccc427@gmail.com>
---
drivers/usb/gadget/function/f_tcm.c | 32 ++++++++++-------------------
drivers/usb/gadget/function/tcm.h | 2 ++
2 files changed, 13 insertions(+), 21 deletions(-)
diff --git a/drivers/usb/gadget/function/f_tcm.c b/drivers/usb/gadget/function/f_tcm.c
index 34d9f49e9987..4096f94586fe 100644
--- a/drivers/usb/gadget/function/f_tcm.c
+++ b/drivers/usb/gadget/function/f_tcm.c
@@ -2363,20 +2363,10 @@ static int tcm_bind(struct usb_configuration *c, struct usb_function *f)
return -ENOTSUPP;
}
-struct guas_setup_wq {
- struct work_struct work;
- struct f_uas *fu;
- unsigned int alt;
-};
-
static void tcm_delayed_set_alt(struct work_struct *wq)
{
- struct guas_setup_wq *work = container_of(wq, struct guas_setup_wq,
- work);
- struct f_uas *fu = work->fu;
- int alt = work->alt;
-
- kfree(work);
+ struct f_uas *fu = container_of(wq, struct f_uas, delayed_set_alt);
+ int alt = fu->delayed_alt;
if (fu->flags & USBG_IS_BOT)
bot_cleanup_old_alt(fu);
@@ -2413,15 +2403,8 @@ static int tcm_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
return -EOPNOTSUPP;
if ((alt == USB_G_ALT_INT_BBB) || (alt == USB_G_ALT_INT_UAS)) {
- struct guas_setup_wq *work;
-
- work = kmalloc_obj(*work, GFP_ATOMIC);
- if (!work)
- return -ENOMEM;
- INIT_WORK(&work->work, tcm_delayed_set_alt);
- work->fu = fu;
- work->alt = alt;
- schedule_work(&work->work);
+ fu->delayed_alt = alt;
+ schedule_work(&fu->delayed_set_alt);
return USB_GADGET_DELAYED_STATUS;
}
return -EOPNOTSUPP;
@@ -2431,6 +2414,8 @@ static void tcm_disable(struct usb_function *f)
{
struct f_uas *fu = to_f_uas(f);
+ cancel_work(&fu->delayed_set_alt);
+
if (fu->flags & USBG_IS_UAS)
uasp_cleanup_old_alt(fu);
else if (fu->flags & USBG_IS_BOT)
@@ -2583,11 +2568,15 @@ static void tcm_free(struct usb_function *f)
{
struct f_uas *tcm = to_f_uas(f);
+ cancel_work_sync(&tcm->delayed_set_alt);
kfree(tcm);
}
static void tcm_unbind(struct usb_configuration *c, struct usb_function *f)
{
+ struct f_uas *tcm = to_f_uas(f);
+
+ cancel_work_sync(&tcm->delayed_set_alt);
usb_free_all_descriptors(f);
}
@@ -2621,6 +2610,7 @@ static struct usb_function *tcm_alloc(struct usb_function_instance *fi)
fu->function.free_func = tcm_free;
fu->tpg = tpg_instances[i].tpg;
+ INIT_WORK(&fu->delayed_set_alt, tcm_delayed_set_alt);
hash_init(fu->stream_hash);
mutex_unlock(&tpg_instances_lock);
diff --git a/drivers/usb/gadget/function/tcm.h b/drivers/usb/gadget/function/tcm.h
index 009974d81d66..b07bf4aa7d88 100644
--- a/drivers/usb/gadget/function/tcm.h
+++ b/drivers/usb/gadget/function/tcm.h
@@ -123,6 +123,8 @@ struct f_uas {
struct usbg_tpg *tpg;
struct usb_function function;
u16 iface;
+ struct work_struct delayed_set_alt;
+ unsigned int delayed_alt;
u32 flags;
#define USBG_ENABLED (1 << 0)
--
2.43.0
^ permalink raw reply related
* ucsi_acpi: USBC000:00 repeatedly fails to re-enable notifications on ASUS Vivobook S 15 M5506WA
From: Aditya Upadhyay @ 2026-06-23 0:32 UTC (permalink / raw)
To: linux-usb
Hardware: ASUS Vivobook S 15 M5506WA_M5506WA (baseboard: M5506WA)
BIOS: M5506WA.316
Kernel: 7.0.12-201.fc44.x86_64
ACPI SSDT: AMD CPMUCSI v02 (INTL 20230331)
Both USB-C ports are enumerated at boot (port0, port1 visible under
/sys/class/typec/). However, the second port (port1) does not charge
when a PD charger is plugged in.
Additionally, ucsi_acpi repeatedly fails to re-enable notifications
throughout the session, likely after suspend/resume cycles:
[Sun Jun 21 17:22:25 2026] ucsi_acpi USBC000:00:
ucsi_handle_connector_change: GET_CONNECTOR_STATUS failed (-110)
[Sun Jun 21 17:22:49 2026] ucsi_acpi USBC000:00: failed to re-enable
notifications (-110)
[Sun Jun 21 18:23:22 2026] ucsi_acpi USBC000:00: failed to re-enable
notifications (-110)
(repeats throughout uptime)
The workaround is to reload the module:
sudo modprobe -r ucsi_acpi && sudo modprobe ucsi_acpi
After reload, both ports work correctly and notifications are restored
until the next suspend/resume.
No relevant BIOS updates are available from ASUS for this model.
^ permalink raw reply
* RE: [PATCH v2 2/2] USB: serial: ftdi_sio: make explicit latency_timer sysfs write authoritative
From: Chinna Mopurigari Naveen Kumar Reddy (FTDI-SG) @ 2026-06-23 0:20 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Johan Hovold, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, Arun Pappan (FTDI-SG)
In-Reply-To: <2026062200-tamer-gallows-b8ad@gregkh>
Hi Greg,
On Mon, Jun 22, 2026 at 04:xx:xxPM +0000, Greg Kroah-Hartman wrote:
> When drivers work properly, they are quiet. Make this a debugging
> message at the most please.
Will do, thanks. I'll change it to dev_dbg() in v3.
I'll hold the respin for a day or so to collect any further review
comments (including on patch 1/2) and address them together.
Thanks,
Naveen
-----Original Message-----
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sent: Monday, 22 June 2026 6:19 pm
To: Chinna Mopurigari Naveen Kumar Reddy (FTDI-SG) <naveen.reddy@ftdichip.com>
Cc: Johan Hovold <johan@kernel.org>; linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org; Arun Pappan (FTDI-SG) <arun.pappan@ftdichip.com>
Subject: Re: [PATCH v2 2/2] USB: serial: ftdi_sio: make explicit latency_timer sysfs write authoritative
On Mon, Jun 22, 2026 at 05:43:40PM +0800, Chinna Mopurigari Naveen Kumar Reddy wrote:
> write_latency_timer() clamps the value programmed into the FT chip's
> per-channel latency_timer register to 1 whenever ASYNC_LOW_LATENCY is
> set in priv->flags. ASYNC_LOW_LATENCY is set by userspace via
> TIOCSSERIAL, used by setserial(8), libftdi and certain tcsetattr
> paths. The interaction with the existing sysfs latency_timer
> attribute is surprising: once any of those tools has set the flag, a
> later write of "16" (or any other value) to
> /sys/bus/usb-serial/devices/ttyUSBx/latency_timer is silently clamped
> to 1 and never reaches the chip.
>
> The store path is the most explicit way userspace can ask for a
> particular latency_timer value; treat it as authoritative. On an
> explicit sysfs write, clear ASYNC_LOW_LATENCY before calling
> write_latency_timer() so the requested value is what the chip register
> actually receives. Emit a dev_info() so the override is visible.
>
> Reads continue to honour ASYNC_LOW_LATENCY (returning "1") so any
> userspace that previously inspected the attribute to confirm
> low-latency mode keeps working until it does its own explicit write.
>
> Signed-off-by: Chinna Mopurigari Naveen Kumar Reddy
> <naveen.reddy@ftdichip.com>
> ---
> drivers/usb/serial/ftdi_sio.c | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/drivers/usb/serial/ftdi_sio.c
> b/drivers/usb/serial/ftdi_sio.c index 7aaa7fc1be71..e7f13eca7ae6
> 100644
> --- a/drivers/usb/serial/ftdi_sio.c
> +++ b/drivers/usb/serial/ftdi_sio.c
> @@ -1683,6 +1683,23 @@ static ssize_t latency_timer_store(struct device *dev,
> if (kstrtou8(valbuf, 10, &v))
> return -EINVAL;
>
> + /*
> + * An explicit sysfs write wins over the legacy ASYNC_LOW_LATENCY
> + * tty-flag override. Without this, if any userspace tool
> + * (setserial(8), libftdi, certain tcsetattr paths) had set
> + * ASYNC_LOW_LATENCY via TIOCSSERIAL, write_latency_timer() would
> + * silently clamp the chip register to 1 regardless of what was
> + * written to sysfs. Clearing the flag here makes sysfs the
> + * authoritative source so the next chip-side write uses exactly
> + * the value the caller asked for.
> + */
> + if (priv->flags & ASYNC_LOW_LATENCY) {
> + dev_info(&port->dev,
> + "explicit latency_timer=%u clears ASYNC_LOW_LATENCY flag\n",
> + v);
When drivers work properly, they are quiet. Make this a debugging message at the most please.
thanks,
greg k-h
^ permalink raw reply
* [PATCH v3] usb: typec: displayport: Reject DP Alt Mode VDO with no pin assignment for its capability
From: madhu.m @ 2026-06-23 0:32 UTC (permalink / raw)
To: gregkh; +Cc: heikki.krogerus, akuchynski, linux-usb, linux-kernel, Madhu M
In-Reply-To: <20260619163109.3529666-1-madhu.m@intel.com>
From: Madhu M <madhu.m@intel.com>
Some docks/Type-C dongles expose a malformed DP Capabilities VDO: they
claim a DFP_D (source) or UFP_D (sink) capability but leave the
corresponding pin assignment field empty. Such a device can never have
Alt Mode configured. Currently the driver still proceeds, which is
misleading and offers no diagnostic.
Per VESA DPAM v2.1a Section 5.4.1 (Table 5-6):
Case 1 (receptacle): A DP Source device receptacle (DFP_D) declares its
lane routing in the DP Source Pin field (Bits 15:8); a DP Sink device
receptacle (UFP_D) declares its lanes in the DP Sink Pin field
(Bits 23:16).
Case 2 (direct-attach plug): A DP Sink device plug (UFP_D) declares its
lane routing in the DP Source Pin field (Bits 15:8), and a DP Source
device plug (DFP_D) declares its lanes in the DP Sink Pin field
(Bits 23:16).
In either case the field holds the supported pin assignment values
(e.g. C/D/E); 00000000b means no pin assignment is supported for that
capability.
Reject such a DP Alt Mode VDO in dp_altmode_probe(): if the claimed
capability has no matching pin assignments, fail probe with -ENODEV,
releasing the SOP' plug reference on the error path.
Signed-off-by: Madhu M <madhu.m@intel.com>
Reviewed-by: Andrei Kuchynski <akuchynski@chromium.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
---
Changes in v3:
- No functional change. Restore the version changelog below the --- line.
Note: v1 was an internal review (with Heikki) and was never posted to the
list, so v2 was effectively the first public submission.
Changes in v2 (vs internal v1):
- Drop the explicit "if (alt->vdo & DP_CAP_RECEPTACLE)" guard and the
nested block. Use the receptacle-aware DP_CAP_PIN_ASSIGN_DFP_D()/
DP_CAP_PIN_ASSIGN_UFP_D() macros instead of the raw
DP_CAP_DFP_D_PIN_ASSIGN()/DP_CAP_UFP_D_PIN_ASSIGN() ones. They already
apply the Bit 6 (Receptacle Indication) swap, so a single check now
covers both receptacles and direct-attach plugs.
- Return -ENODEV instead of -EOPNOTSUPP, matching the existing
pin-configuration rejection path right above.
- Drop the dev_err() diagnostic line (raw VDO + "DFP_D"/"UFP_D" string).
- Hoist "cap" to a function-scope u32 at the top of dp_altmode_probe()
(was a local u8 inside the receptacle block).
- Reword subject: "usb: typec: altmodes/displayport: validate dp pin
assignments for USB-C receptacles" -> "usb: typec: displayport: Reject
DP Alt Mode VDO with no pin assignment for its capability".
- Rewrite commit body: describe the VESA Table 5-6 pin-field routing for
both receptacles and direct-attach plugs (including the 00000000b
"not supported" encoding).
drivers/usb/typec/altmodes/displayport.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/usb/typec/altmodes/displayport.c b/drivers/usb/typec/altmodes/displayport.c
index 263a89c5f324..2a553cfcf61d 100644
--- a/drivers/usb/typec/altmodes/displayport.c
+++ b/drivers/usb/typec/altmodes/displayport.c
@@ -764,6 +764,7 @@ int dp_altmode_probe(struct typec_altmode *alt)
struct typec_altmode *plug = typec_altmode_get_plug(alt, TYPEC_PLUG_SOP_P);
struct fwnode_handle *fwnode;
struct dp_altmode *dp;
+ u32 cap = DP_CAP_CAPABILITY(alt->vdo);
/* Port can only be DFP_U. */
if (typec_altmode_get_data_role(alt) != TYPEC_HOST)
@@ -778,6 +779,18 @@ int dp_altmode_probe(struct typec_altmode *alt)
return -ENODEV;
}
+ /*
+ * Make sure the DisplayPort VDO is valid (VESA DPAM v2.1a, Section
+ * 5.4.1, Table 5-6, DP Capabilities VDO). A device exposing DP on a
+ * USB-C receptacle must advertise at least one pin assignment for the
+ * capability it claims, otherwise Alt Mode can never be configured.
+ */
+ if ((cap == DP_CAP_DFP_D && !DP_CAP_PIN_ASSIGN_DFP_D(alt->vdo)) ||
+ (cap == DP_CAP_UFP_D && !DP_CAP_PIN_ASSIGN_UFP_D(alt->vdo))) {
+ typec_altmode_put_plug(plug);
+ return -ENODEV;
+ }
+
dp = devm_kzalloc(&alt->dev, sizeof(*dp), GFP_KERNEL);
if (!dp) {
typec_altmode_put_plug(plug);
--
2.34.1
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox