From: Thomas Gleixner <tglx@linutronix.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
"Ahmed S. Darwish" <a.darwish@linutronix.de>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Mathias Nyman <mathias.nyman@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org,
Thomas Winischhofer <thomas@winischhofer.net>,
Johan Hovold <johan@kernel.org>,
Valentina Manea <valentina.manea.m@gmail.com>,
Shuah Khan <shuah@kernel.org>,
Alan Stern <stern@rowland.harvard.edu>,
linux-omap@vger.kernel.org, Kukjin Kim <kgene@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org,
Felipe Balbi <balbi@kernel.org>,
Duncan Sands <duncan.sands@free.fr>
Subject: [patch V2 05/13] usb: xhci: Remove in_interrupt() checks
Date: Mon, 19 Oct 2020 12:06:34 +0200 [thread overview]
Message-ID: <20201019101110.148631116@linutronix.de> (raw)
In-Reply-To: 20201019100629.419020859@linutronix.de
From: Ahmed S. Darwish <a.darwish@linutronix.de>
The usage of in_interrupt() in drivers is phased out for various reasons.
xhci_set_hc_event_deq() has an !in_interrupt() check which is pointless
because the function is only invoked from xhci_mem_init() which is clearly
task context as it does GFP_KERNEL allocations. Remove it.
xhci_urb_enqueue() prints a debug message if an URB is submitted after the
underlying hardware was suspended. But that warning is only issued when
in_interrupt() is true, which makes no sense. Simply return -ESHUTDOWN and
be done with it.
Signed-off-by: Ahmed S. Darwish <a.darwish@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Mathias Nyman <mathias.nyman@intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org
---
drivers/usb/host/xhci-mem.c | 2 +-
drivers/usb/host/xhci.c | 6 ++----
2 files changed, 3 insertions(+), 5 deletions(-)
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -2110,7 +2110,7 @@ static void xhci_set_hc_event_deq(struct
deq = xhci_trb_virt_to_dma(xhci->event_ring->deq_seg,
xhci->event_ring->dequeue);
- if (deq == 0 && !in_interrupt())
+ if (!deq)
xhci_warn(xhci, "WARN something wrong with SW event ring "
"dequeue ptr.\n");
/* Update HC event ring dequeue pointer */
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -1473,11 +1473,9 @@ static int xhci_urb_enqueue(struct usb_h
ep_index = xhci_get_endpoint_index(&urb->ep->desc);
ep_state = &xhci->devs[slot_id]->eps[ep_index].ep_state;
- if (!HCD_HW_ACCESSIBLE(hcd)) {
- if (!in_interrupt())
- xhci_dbg(xhci, "urb submitted during PCI suspend\n");
+ if (!HCD_HW_ACCESSIBLE(hcd))
return -ESHUTDOWN;
- }
+
if (xhci->devs[slot_id]->flags & VDEV_PORT_ERROR) {
xhci_dbg(xhci, "Can't queue urb, port error, link inactive\n");
return -ENODEV;
next prev parent reply other threads:[~2020-10-19 10:19 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-19 10:06 [patch V2 00/13] USB: Cleanup in_interupt/in_irq/in_atomic() usage Thomas Gleixner
2020-10-19 10:06 ` [patch V2 01/13] USB: sisusbvga: Make console support depend on BROKEN Thomas Gleixner
2020-10-19 10:06 ` [patch V2 02/13] USB: serial: keyspan_pda: Replace in_interrupt() usage Thomas Gleixner
2020-10-25 16:56 ` Johan Hovold
2020-10-26 12:47 ` Sebastian Andrzej Siewior
2020-10-27 8:16 ` Johan Hovold
2020-10-19 10:06 ` [patch V2 03/13] USB: serial: keyspan_pda: Consolidate room query Thomas Gleixner
2020-10-25 17:05 ` Johan Hovold
2020-10-19 10:06 ` [patch V2 04/13] USB: serial: digi_acceleport: Remove in_interrupt() usage Thomas Gleixner
2020-10-25 17:16 ` Johan Hovold
2020-10-26 14:03 ` [PATCH v3 04/13 ] " Sebastian Andrzej Siewior
2020-10-27 8:26 ` Johan Hovold
2020-10-19 10:06 ` Thomas Gleixner [this message]
2020-10-19 10:06 ` [patch V2 06/13] usb: host: isp1362: Replace " Thomas Gleixner
2020-10-28 11:27 ` Greg Kroah-Hartman
2020-10-19 10:06 ` [patch V2 07/13] usbip: Remove in_interrupt() check Thomas Gleixner
2020-10-19 10:06 ` [patch V2 08/13] usb: hosts: Remove in_interrupt() from comments Thomas Gleixner
2020-10-19 16:28 ` Alan Stern
2020-10-19 10:06 ` [patch V2 09/13] USB: host: ehci-pmcmsp: Cleanup usb_hcd_msp_remove() Thomas Gleixner
2020-10-19 16:28 ` Alan Stern
2020-10-19 10:06 ` [patch V2 10/13] usb: gadget: pxa27x_udc: Replace in_interrupt() usage in comments Thomas Gleixner
2020-10-19 10:06 ` [patch V2 11/13] usb: gadget: udc: Remove in_interrupt()/in_irq() from comments Thomas Gleixner
2020-10-19 16:28 ` Alan Stern
2020-10-19 10:06 ` [patch V2 12/13] usb: core: Replace in_interrupt() in comments Thomas Gleixner
2020-10-19 16:28 ` Alan Stern
2020-10-19 10:06 ` [patch V2 13/13] usb: atm: Replace in_interrupt() usage in comment Thomas Gleixner
2020-10-19 10:28 ` Duncan Sands
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201019101110.148631116@linutronix.de \
--to=tglx@linutronix.de \
--cc=a.darwish@linutronix.de \
--cc=balbi@kernel.org \
--cc=bigeasy@linutronix.de \
--cc=duncan.sands@free.fr \
--cc=gregkh@linuxfoundation.org \
--cc=johan@kernel.org \
--cc=kgene@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=peterz@infradead.org \
--cc=shuah@kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=thomas@winischhofer.net \
--cc=valentina.manea.m@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).