From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE556C433E7 for ; Wed, 14 Oct 2020 15:21:02 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7CD9222201 for ; Wed, 14 Oct 2020 15:21:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="utVImz+m"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="B6rdNxcz"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="3nHhxyYv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7CD9222201 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:Subject:To:From:Date: Message-Id:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:List-Owner; bh=u/Hlun2Sto0JDCIan67j/LrISE7bay/Nxi0doPcpYN8=; b=utVImz+mKdLDzfYc8d95wpkzE z3OUKyVZ+1htK20tcPC3AWfhESqR2C20I/JIXARgLXAmIsOlWTbjJcwGu4igzpBdvNzQ8NBXXwq33 S6Z3E2jglOKEpfzjYpKPOTVcMK3jF2uGlTPqIKb52FHlSrRdZZbOdRRC9iM7txDQhEfgn+EIptIoM vEdGw9ff2Kue8Xj8bW+uOP0mIM89ALBd2GkeyfBTZxMI69rxMcOqmKuIA0mPs4uuANBunC0F3v9Tq 0dPXR4/hr6TzgwVJy3DhFDZADN1PWP67ktSNsAH//XB1mv2r4s8RHzWO+9HEkiU/EFuu7Az+pkM37 oW4w7nY+A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSiYn-0005AP-Vz; Wed, 14 Oct 2020 15:19:26 +0000 Received: from galois.linutronix.de ([193.142.43.55]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSiYI-0004ym-3x for linux-arm-kernel@lists.infradead.org; Wed, 14 Oct 2020 15:19:02 +0000 Message-Id: <20201014145727.607191004@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1602688732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: references:references; bh=Pe8CFmf0/CnRVhPeaGPKSnnUTmz8AJUU7taQJPbdbP8=; b=B6rdNxczcOWWrcVbmjviVpJXMXqZ84hT2H0rQpIRoceWWrTcdA9FTUOaS7Fgw2L8fOdBdy HbzzKYWq9V9msbsFIlokMHqCeUwUqtRMpTRWHwAcLqZZXvSqIgbUkJXvocA/0LR+CjU/B6 IRLn5B25hI6G7a81TURqxOWEIykDwHsXr0VEmlT//sz5ZprWnWexzaGB6ko6NdL96oRFVQ +oExsQl/zMOtFkuZm2sj/8zelpvpkI/FS84sVW0h9kPI1zbDpua5qg7kw53q+PoEM8qAVk QDWwnsdTTlNv0RMzHiN3Qp5v0N41mRmSf5MdVz/xFd9xU2BGBPWsfDn0Ax2+rA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1602688732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: references:references; bh=Pe8CFmf0/CnRVhPeaGPKSnnUTmz8AJUU7taQJPbdbP8=; b=3nHhxyYvsMB0O08Xcs0F+wU3UaP3H2JXQDPF1e8+qyTK47yO7ho0Y1DtTJSapPBVeQTtaW +ujbHldthT8mgxDQ== Date: Wed, 14 Oct 2020 16:52:20 +0200 From: Thomas Gleixner To: LKML Subject: [patch 05/12] usb: xhci: Remove in_interrupt() checks References: <20201014145215.518912759@linutronix.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201014_111854_312235_A16657A7 X-CRM114-Status: GOOD ( 13.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Felipe Balbi , Thomas Winischhofer , Mathias Nyman , Peter Zijlstra , Greg Kroah-Hartman , Sebastian Andrzej Siewior , linux-usb@vger.kernel.org, Johan Hovold , Krzysztof Kozlowski , Valentina Manea , linux-samsung-soc@vger.kernel.org, Kukjin Kim , Alan Stern , Duncan Sands , "Ahmed S. Darwish" , linux-omap@vger.kernel.org, Shuah Khan , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Ahmed S. Darwish 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 Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Cc: Mathias Nyman Cc: Greg Kroah-Hartman 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; _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel