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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38B10C433F5 for ; Tue, 19 Oct 2021 11:15:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 224AD6128B for ; Tue, 19 Oct 2021 11:15:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235344AbhJSLSB (ORCPT ); Tue, 19 Oct 2021 07:18:01 -0400 Received: from mail.thorsis.com ([92.198.35.195]:58065 "EHLO mail.thorsis.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230097AbhJSLSB (ORCPT ); Tue, 19 Oct 2021 07:18:01 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.thorsis.com (Postfix) with ESMTP id 654791C9D for ; Tue, 19 Oct 2021 13:15:47 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.thorsis.com Received: from mail.thorsis.com ([127.0.0.1]) by localhost (mail.thorsis.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QgBjFMxf6Gkp for ; Tue, 19 Oct 2021 13:15:47 +0200 (CEST) Received: by mail.thorsis.com (Postfix, from userid 109) id 31907F34; Tue, 19 Oct 2021 13:15:47 +0200 (CEST) Date: Tue, 19 Oct 2021 13:15:37 +0200 From: Alexander Dahl To: Sergey Shtylyov Cc: linux-usb@vger.kernel.org, Alan Stern , Greg Kroah-Hartman , Vladimir Zapolskiy , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 11/22] usb: host: ohci-at91: deny IRQ0 Message-ID: Mail-Followup-To: Sergey Shtylyov , linux-usb@vger.kernel.org, Alan Stern , Greg Kroah-Hartman , Vladimir Zapolskiy , linux-arm-kernel@lists.infradead.org References: <20211018183930.8448-1-s.shtylyov@omp.ru> <20211018183930.8448-12-s.shtylyov@omp.ru> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211018183930.8448-12-s.shtylyov@omp.ru> Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Hello Sergey, Am Mon, Oct 18, 2021 at 09:39:19PM +0300 schrieb Sergey Shtylyov: > If platform_get_irq() returns IRQ0 (considered invalid according to Linus) > the driver blithely passes it to usb_add_hcd() that treats IRQ0 as no IRQ > at all. Deny IRQ0 right away, returning -EINVAL from the probe() method... > > Fixes: 60bbfc84b6d9 ("USB OHCI controller support for PNX4008") > Signed-off-by: Sergey Shtylyov > --- > drivers/usb/host/ohci-nxp.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/usb/host/ohci-nxp.c b/drivers/usb/host/ohci-nxp.c > index 85878e8ad331..afb9c2fc85c3 100644 > --- a/drivers/usb/host/ohci-nxp.c > +++ b/drivers/usb/host/ohci-nxp.c > @@ -215,6 +215,10 @@ static int ohci_hcd_nxp_probe(struct platform_device *pdev) > ret = -ENXIO; > goto fail_resource; > } > + if (!irq) { > + ret = -EINVAL; > + goto fail_resource; > + } > > ohci_nxp_start_hc(); > platform_set_drvdata(pdev, hcd); Subject refers to at91 while content is about nxp. Greets Alex 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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB6F1C433EF for ; Tue, 19 Oct 2021 11:17:10 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 8DC4560EFF for ; Tue, 19 Oct 2021 11:17:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8DC4560EFF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=thorsis.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2A3GW2PGKsJM/fLC0oD31mVw7bBpbl/ZmpMqPvIlBqY=; b=nux9iWmZZkeseQ TDmvmn07SuVpzMsmWOREON1ofOn2v1aqQMvTA+Wjw98iyqFjOnORy0mo6aq9P4d0tjLXsrda49eaC c8tjfG9LRBWOI0/nQlkJyKExWr2CIBDg982/iiUU4WynU7K30gCBFgr9TV63tIjkNZzVy9j4ZPm3V c7u8gU0MGqH7K+WFqBLItCHV8npWedrKOri7bsYrHkOsOJuOKYkcqnh4SYjTCfa/ZfaW6hQjKUska A76KPrKPToAF6HYMgss+/GAG4em+WDv2JoQX+RvDBncxGgKN35S9vwhUs3Tw4Hc2nooIt66pqH/vp lfBgekUA7rBkkzLKixxg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mcn61-000vq4-CU; Tue, 19 Oct 2021 11:15:53 +0000 Received: from mail.thorsis.com ([92.198.35.195]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mcn5x-000voI-CP for linux-arm-kernel@lists.infradead.org; Tue, 19 Oct 2021 11:15:51 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.thorsis.com (Postfix) with ESMTP id C7C11E7F for ; Tue, 19 Oct 2021 13:15:44 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.thorsis.com Received: from mail.thorsis.com ([127.0.0.1]) by localhost (mail.thorsis.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WrMO0OSw1DlE for ; Tue, 19 Oct 2021 13:15:44 +0200 (CEST) Received: by mail.thorsis.com (Postfix, from userid 109) id A67FBF34; Tue, 19 Oct 2021 13:15:44 +0200 (CEST) Date: Tue, 19 Oct 2021 13:15:37 +0200 From: Alexander Dahl To: Sergey Shtylyov Cc: linux-usb@vger.kernel.org, Alan Stern , Greg Kroah-Hartman , Vladimir Zapolskiy , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 11/22] usb: host: ohci-at91: deny IRQ0 Message-ID: Mail-Followup-To: Sergey Shtylyov , linux-usb@vger.kernel.org, Alan Stern , Greg Kroah-Hartman , Vladimir Zapolskiy , linux-arm-kernel@lists.infradead.org References: <20211018183930.8448-1-s.shtylyov@omp.ru> <20211018183930.8448-12-s.shtylyov@omp.ru> Content-Disposition: inline In-Reply-To: <20211018183930.8448-12-s.shtylyov@omp.ru> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211019_041549_621846_82DCFD8A X-CRM114-Status: GOOD ( 20.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 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 Hello Sergey, Am Mon, Oct 18, 2021 at 09:39:19PM +0300 schrieb Sergey Shtylyov: > If platform_get_irq() returns IRQ0 (considered invalid according to Linus) > the driver blithely passes it to usb_add_hcd() that treats IRQ0 as no IRQ > at all. Deny IRQ0 right away, returning -EINVAL from the probe() method... > > Fixes: 60bbfc84b6d9 ("USB OHCI controller support for PNX4008") > Signed-off-by: Sergey Shtylyov > --- > drivers/usb/host/ohci-nxp.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/usb/host/ohci-nxp.c b/drivers/usb/host/ohci-nxp.c > index 85878e8ad331..afb9c2fc85c3 100644 > --- a/drivers/usb/host/ohci-nxp.c > +++ b/drivers/usb/host/ohci-nxp.c > @@ -215,6 +215,10 @@ static int ohci_hcd_nxp_probe(struct platform_device *pdev) > ret = -ENXIO; > goto fail_resource; > } > + if (!irq) { > + ret = -EINVAL; > + goto fail_resource; > + } > > ohci_nxp_start_hc(); > platform_set_drvdata(pdev, hcd); Subject refers to at91 while content is about nxp. Greets Alex _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel