* [PATCHv2 1/2] ttusbir: NOIO during resume
@ 2022-05-12 13:41 Oliver Neukum
2022-05-12 13:41 ` [PATCHv2 2/2] ttusbir: avoid unnecessary usb_unlink_urb() Oliver Neukum
0 siblings, 1 reply; 2+ messages in thread
From: Oliver Neukum @ 2022-05-12 13:41 UTC (permalink / raw)
To: linux-media, mchehab, sean; +Cc: Oliver Neukum
During resume we must assume tat devices are
not ready for block IO. Use GFP_NOIO.
v2: Resending due to typo in CC
Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
drivers/media/rc/ttusbir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/rc/ttusbir.c b/drivers/media/rc/ttusbir.c
index 629787d53ee1..a8009dc958be 100644
--- a/drivers/media/rc/ttusbir.c
+++ b/drivers/media/rc/ttusbir.c
@@ -402,7 +402,7 @@ static int ttusbir_resume(struct usb_interface *intf)
led_classdev_resume(&tt->led);
for (i = 0; i < NUM_URBS; i++) {
- rc = usb_submit_urb(tt->urb[i], GFP_KERNEL);
+ rc = usb_submit_urb(tt->urb[i], GFP_NOIO);
if (rc) {
dev_warn(tt->dev, "failed to submit urb: %d\n", rc);
break;
--
2.35.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCHv2 2/2] ttusbir: avoid unnecessary usb_unlink_urb()
2022-05-12 13:41 [PATCHv2 1/2] ttusbir: NOIO during resume Oliver Neukum
@ 2022-05-12 13:41 ` Oliver Neukum
0 siblings, 0 replies; 2+ messages in thread
From: Oliver Neukum @ 2022-05-12 13:41 UTC (permalink / raw)
To: linux-media, mchehab, sean; +Cc: Oliver Neukum
While the completion handler is running,
usb_unlink_urb(9 on yourself is a NOP. Remove it.
v2: Resending due to typo in CC
Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
drivers/media/rc/ttusbir.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/media/rc/ttusbir.c b/drivers/media/rc/ttusbir.c
index a8009dc958be..560a26f3965c 100644
--- a/drivers/media/rc/ttusbir.c
+++ b/drivers/media/rc/ttusbir.c
@@ -90,7 +90,6 @@ static void ttusbir_bulk_complete(struct urb *urb)
case -ECONNRESET:
case -ENOENT:
case -ESHUTDOWN:
- usb_unlink_urb(urb);
return;
case -EPIPE:
default:
@@ -166,7 +165,6 @@ static void ttusbir_urb_complete(struct urb *urb)
case -ECONNRESET:
case -ENOENT:
case -ESHUTDOWN:
- usb_unlink_urb(urb);
return;
case -EPIPE:
default:
--
2.35.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-12 13:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-12 13:41 [PATCHv2 1/2] ttusbir: NOIO during resume Oliver Neukum
2022-05-12 13:41 ` [PATCHv2 2/2] ttusbir: avoid unnecessary usb_unlink_urb() Oliver Neukum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).