Skip to contentSkip to conversation

USB: serial: digi_acceleport: do not log stopping of urbs as errors

PATCH New Johan Hovold 1 participant 1 message Jun 29

Subsystems (2)
lore
Share & tools
lore

Johan Hovold

author maintainer
#0 lore raw

PATCH 1/1 USB: serial: digi_acceleport: do not log stopping of urbs as errors

Stopping an urb is not an error and should not be logged as such.

Demote the dev_err() in the read bulk completion handler to dev_dbg() when an urb is being unlinked on disconnect.

Note that this will become more of an issue when the urbs are stopped every time a port is closed.

This issue was flagged by Sashiko when reviewing the upcoming change.

---

This is a preparatory patch for the port registration fix:

	https://lore.kernel.org/lkml/[email protected]/

Johan

 drivers/usb/serial/digi_acceleport.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
drivers/usb/serial/digi_acceleport.c +11 -1
index dea039163661..fbb3609ac014 100644
@@ -1355,7 +1355,17 @@ static void digi_read_bulk_callback(struct urb *urb)
 	}
 
 	/* do not resubmit urb if it has any status error */
-	if (status) {
+	switch (status) {
+	case 0:
+		break;
+	case -ENOENT:
+	case -ECONNRESET:
+	case -ESHUTDOWN:
+		dev_dbg(&port->dev,
+			"%s: nonzero read bulk status: status=%d, port=%d\n",
+			__func__, status, priv->dp_port_num);
+		return;
+	default:
 		dev_err(&port->dev,
 			"%s: nonzero read bulk status: status=%d, port=%d\n",
 			__func__, status, priv->dp_port_num);
Signature · 1 line
2.53.0