Skip to contentSkip to conversation

patch "UAS: no use logging any details in case of ENODEV" added to usb-linus

PATCH [email protected] 1 participant 1 message Apr 16, 2020

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

UAS: no use logging any details in case of ENODEV

to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.

If you have any questions about this process, please let me know.

From 5963dec98dc52d52476390485f07a29c30c6a582 Mon Sep 17 00:00:00 2001
From: Oliver Neukum <[email protected]>
Date: Wed, 15 Apr 2020 16:17:49 +0200
Subject: UAS: no use logging any details in case of ENODEV

Once a device is gone, the internal state does not matter anymore. There is no need to spam the logs.

Cc stable <[email protected]>
Fixes 326349f824619 ("uas: add dead request list")
---
 drivers/usb/storage/uas.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/usb/storage/uas.c +3 -0
index 3670fda02c34..08503e3507bf 100644
@@ -190,6 +190,9 @@ static void uas_log_cmd_state(struct scsi_cmnd *cmnd, const char *prefix,
 	struct uas_cmd_info *ci = (void *)&cmnd->SCp;
 	struct uas_cmd_info *cmdinfo = (void *)&cmnd->SCp;
 
+	if (status == -ENODEV) /* too late */
+		return;
+
 	scmd_printk(KERN_INFO, cmnd,
 		    "%s %d uas-tag %d inflight:%s%s%s%s%s%s%s%s%s%s%s%s ",
 		    prefix, status, cmdinfo->uas_tag,
Signature · 1 line
2.26.1