* [PATCH] USB: serial: digi_acceleport: fix oob port dev_printk()
@ 2026-06-29 12:40 Johan Hovold
0 siblings, 0 replies; only message in thread
From: Johan Hovold @ 2026-06-29 12:40 UTC (permalink / raw)
To: linux-usb; +Cc: Greg Kroah-Hartman, linux-kernel, Johan Hovold
The OOB port is not registered with driver core and does not have a
name.
Use the USB interface with dev_printk() that may involve the OOB port to
avoid log entries with no driver and a "NULL" device name.
Fixes: f9dfbebb8b39 ("USB: serial: digi_acceleport.c: remove dbg() usage")
Fixes: 194343d9364e ("USB: remove use of err() in drivers/usb/serial")
Signed-off-by: Johan Hovold <johan@kernel.org>
---
This one applies on top of the port registration series and the
preparatory patch just posted:
https://lore.kernel.org/lkml/20260629123733.97892-1-johan@kernel.org/
https://lore.kernel.org/lkml/20260610132232.356139-1-johan@kernel.org/
Johan
drivers/usb/serial/digi_acceleport.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c
index efaafaf728f8..e6d14f7d106d 100644
--- a/drivers/usb/serial/digi_acceleport.c
+++ b/drivers/usb/serial/digi_acceleport.c
@@ -949,7 +949,6 @@ static void digi_write_bulk_callback(struct urb *urb)
/* handle oob callback */
if (priv->dp_port_num == serial_priv->ds_oob_port_num) {
- dev_dbg(&port->dev, "digi_write_bulk_callback: oob callback\n");
spin_lock_irqsave(&priv->dp_port_lock, flags);
priv->dp_write_urb_in_use = 0;
wake_up_interruptible(&priv->write_wait);
@@ -1279,7 +1278,8 @@ static void digi_port_remove(struct usb_serial_port *port)
static void digi_read_bulk_callback(struct urb *urb)
{
struct usb_serial_port *port = urb->context;
- struct digi_serial *serial_priv = usb_get_serial_data(port->serial);
+ struct usb_serial *serial = port->serial;
+ struct digi_serial *serial_priv = usb_get_serial_data(serial);
struct digi_port *priv = usb_get_serial_port_data(port);
int status = urb->status;
int ret;
@@ -1291,12 +1291,12 @@ static void digi_read_bulk_callback(struct urb *urb)
case -ENOENT:
case -ECONNRESET:
case -ESHUTDOWN:
- dev_dbg(&port->dev,
+ dev_err(&serial->interface->dev,
"%s: nonzero read bulk status: status=%d, port=%d\n",
__func__, status, priv->dp_port_num);
return;
default:
- dev_err(&port->dev,
+ dev_err(&serial->interface->dev,
"%s: nonzero read bulk status: status=%d, port=%d\n",
__func__, status, priv->dp_port_num);
return;
@@ -1314,7 +1314,7 @@ static void digi_read_bulk_callback(struct urb *urb)
/* continue read */
ret = usb_submit_urb(urb, GFP_ATOMIC);
if (ret != 0 && ret != -EPERM) {
- dev_err(&port->dev,
+ dev_err(&serial->interface->dev,
"%s: failed resubmitting urb, ret=%d, port=%d\n",
__func__, ret, priv->dp_port_num);
}
@@ -1438,7 +1438,8 @@ static int digi_read_oob_callback(struct urb *urb)
status = buf[i + 2];
val = buf[i + 3];
- dev_dbg(&port->dev, "digi_read_oob_callback: opcode=%d, line=%d, status=%d, val=%d\n",
+ dev_dbg(&serial->interface->dev,
+ "digi_read_oob_callback: opcode=%d, line=%d, status=%d, val=%d\n",
opcode, line, status, val);
if (status != 0 || line >= serial->type->num_ports)
--
2.53.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-29 12:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-29 12:40 [PATCH] USB: serial: digi_acceleport: fix oob port dev_printk() Johan Hovold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox