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 4D27DC433EF for ; Wed, 27 Oct 2021 06:08:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2772F60E8C for ; Wed, 27 Oct 2021 06:08:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235204AbhJ0GLI (ORCPT ); Wed, 27 Oct 2021 02:11:08 -0400 Received: from mx07-00178001.pphosted.com ([185.132.182.106]:47692 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234586AbhJ0GLH (ORCPT ); Wed, 27 Oct 2021 02:11:07 -0400 Received: from pps.filterd (m0241204.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19R1DTYw010020; Wed, 27 Oct 2021 08:08:35 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=selector1; bh=ucUdg+5qX5Of2zm9fkXdquQw9OVjEAuBITEA62EmTY4=; b=MefwfM1vNeOQDobAWX9kNEF3umIBmQEfq+sjlXAoB2NbOSigP7aN7R64PoTLVgvufXys 6QUiJAB77L255VTVDnD238e+lvlRDhAvhRzo91j7JuJkZFTxsJy6IOmXnWeyjdUouY/m peGnZCC3j7VpWpFAuDZfjJUV+ZIT2ipLx42IoVHaeNuHzNjyMv0NJ2by7DKz8rC3juUh Lw0SM/0gKk6TPLq+SOlvVFPbnAfyNObR/8NpX5P8eukIqBrBg9zyD2Q0L+smXp+ZMr/r tVrpOXChj/w7kghUgLK7ZsyqNq50YaBI0uXGzJGM5t707w5d8JEle5UZTLETD0nbasPY 2A== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 3bxvwws9jk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 27 Oct 2021 08:08:35 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 9C49310002A; Wed, 27 Oct 2021 08:08:34 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag2node2.st.com [10.75.127.5]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 94B98217B95; Wed, 27 Oct 2021 08:08:34 +0200 (CEST) Received: from lmecxl0573.lme.st.com (10.75.127.50) by SFHDAG2NODE2.st.com (10.75.127.5) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 27 Oct 2021 08:08:33 +0200 Subject: Re: [PATCH v2 17/22] usb: host: ohci-st: deny IRQ0 To: Sergey Shtylyov , , Alan Stern , Greg Kroah-Hartman CC: References: <20211026173943.6829-1-s.shtylyov@omp.ru> <20211026173943.6829-18-s.shtylyov@omp.ru> From: Patrice CHOTARD Message-ID: Date: Wed, 27 Oct 2021 08:08:33 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20211026173943.6829-18-s.shtylyov@omp.ru> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.75.127.50] X-ClientProxiedBy: SFHDAG2NODE1.st.com (10.75.127.4) To SFHDAG2NODE2.st.com (10.75.127.5) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-27_01,2021-10-26_01,2020-04-07_01 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Hi Sergey On 10/26/21 7:39 PM, Sergey Shtylyov wrote: > 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: d115837259ad ("usb: host: ohci-st: Add OHCI driver support for ST STB devices") > Signed-off-by: Sergey Shtylyov > Acked-by: Alan Stern > --- > Changes in version 2: > - added Alan's ACK. > > drivers/usb/host/ohci-st.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/usb/host/ohci-st.c b/drivers/usb/host/ohci-st.c > index ac796ccd93ef..b9200071ce6c 100644 > --- a/drivers/usb/host/ohci-st.c > +++ b/drivers/usb/host/ohci-st.c > @@ -140,6 +140,8 @@ static int st_ohci_platform_probe(struct platform_device *dev) > irq = platform_get_irq(dev, 0); > if (irq < 0) > return irq; > + if (!irq) > + return -EINVAL; > > res_mem = platform_get_resource(dev, IORESOURCE_MEM, 0); > if (!res_mem) { > Reviewed-by: Patrice Chotard Thanks Patrice 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 33FB3C433F5 for ; Wed, 27 Oct 2021 06:09:56 +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 F2C9E610A5 for ; Wed, 27 Oct 2021 06:09:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org F2C9E610A5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=foss.st.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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:CC:To:Subject:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=7MQpKuGiBFKvBwWE5IARQUlbzneAkMm2pCw4cletung=; b=eD0Iy6+dNU8A0tHcG5VEWdB/pE uimkICnpyXzT3AMOEOCTMqIqSmevuiNN24x/r4jml0JFuysObtHn8N0EARgvBaMijBKQ+6WvaCHg4 0GECO4IRsFvJDtOgWWevvW8xK2xlmkzDBhcS3GUJvQGwrTF2uKFZ6qIwY53ORB4/sgyM1LFqyRY3a g+DVuusAVEEHCg4S3jmEDCXVKssS4RZjpUCkUtVdzM4cDyrvaf5KratQyQuf5810fUN6PP7HvxNiL qM3vD/A7JK6LY+zr0dapqNhvj7QEbENMZHrNRx0a+lLofE8xYGBUbmIJQwx/3/nn6CgM1WJu2ApeO A5RfYdXw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mfc77-003ybI-BN; Wed, 27 Oct 2021 06:08:41 +0000 Received: from mx07-00178001.pphosted.com ([185.132.182.106]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mfc73-003ya9-4y for linux-arm-kernel@lists.infradead.org; Wed, 27 Oct 2021 06:08:38 +0000 Received: from pps.filterd (m0241204.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19R1DTYw010020; Wed, 27 Oct 2021 08:08:35 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=selector1; bh=ucUdg+5qX5Of2zm9fkXdquQw9OVjEAuBITEA62EmTY4=; b=MefwfM1vNeOQDobAWX9kNEF3umIBmQEfq+sjlXAoB2NbOSigP7aN7R64PoTLVgvufXys 6QUiJAB77L255VTVDnD238e+lvlRDhAvhRzo91j7JuJkZFTxsJy6IOmXnWeyjdUouY/m peGnZCC3j7VpWpFAuDZfjJUV+ZIT2ipLx42IoVHaeNuHzNjyMv0NJ2by7DKz8rC3juUh Lw0SM/0gKk6TPLq+SOlvVFPbnAfyNObR/8NpX5P8eukIqBrBg9zyD2Q0L+smXp+ZMr/r tVrpOXChj/w7kghUgLK7ZsyqNq50YaBI0uXGzJGM5t707w5d8JEle5UZTLETD0nbasPY 2A== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 3bxvwws9jk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 27 Oct 2021 08:08:35 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 9C49310002A; Wed, 27 Oct 2021 08:08:34 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag2node2.st.com [10.75.127.5]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 94B98217B95; Wed, 27 Oct 2021 08:08:34 +0200 (CEST) Received: from lmecxl0573.lme.st.com (10.75.127.50) by SFHDAG2NODE2.st.com (10.75.127.5) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 27 Oct 2021 08:08:33 +0200 Subject: Re: [PATCH v2 17/22] usb: host: ohci-st: deny IRQ0 To: Sergey Shtylyov , , Alan Stern , Greg Kroah-Hartman CC: References: <20211026173943.6829-1-s.shtylyov@omp.ru> <20211026173943.6829-18-s.shtylyov@omp.ru> From: Patrice CHOTARD Message-ID: Date: Wed, 27 Oct 2021 08:08:33 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20211026173943.6829-18-s.shtylyov@omp.ru> Content-Language: en-US X-Originating-IP: [10.75.127.50] X-ClientProxiedBy: SFHDAG2NODE1.st.com (10.75.127.4) To SFHDAG2NODE2.st.com (10.75.127.5) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-27_01,2021-10-26_01,2020-04-07_01 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211026_230837_547173_65FD2573 X-CRM114-Status: GOOD ( 22.45 ) 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: , 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 Hi Sergey On 10/26/21 7:39 PM, Sergey Shtylyov wrote: > 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: d115837259ad ("usb: host: ohci-st: Add OHCI driver support for ST STB devices") > Signed-off-by: Sergey Shtylyov > Acked-by: Alan Stern > --- > Changes in version 2: > - added Alan's ACK. > > drivers/usb/host/ohci-st.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/usb/host/ohci-st.c b/drivers/usb/host/ohci-st.c > index ac796ccd93ef..b9200071ce6c 100644 > --- a/drivers/usb/host/ohci-st.c > +++ b/drivers/usb/host/ohci-st.c > @@ -140,6 +140,8 @@ static int st_ohci_platform_probe(struct platform_device *dev) > irq = platform_get_irq(dev, 0); > if (irq < 0) > return irq; > + if (!irq) > + return -EINVAL; > > res_mem = platform_get_resource(dev, IORESOURCE_MEM, 0); > if (!res_mem) { > Reviewed-by: Patrice Chotard Thanks Patrice _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel