From patchwork Sun Mar 21 18:57:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Shtylyov X-Patchwork-Id: 1456312 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-ide-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4F3Rk340s3z9sW4 for ; Mon, 22 Mar 2021 05:58:51 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230101AbhCUS6M (ORCPT ); Sun, 21 Mar 2021 14:58:12 -0400 Received: from mxout03.lancloud.ru ([45.84.86.113]:44030 "EHLO mxout03.lancloud.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230053AbhCUS5y (ORCPT ); Sun, 21 Mar 2021 14:57:54 -0400 Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout03.lancloud.ru ADEE8205F701 Received: from LanCloud Received: from LanCloud Received: from LanCloud Subject: [PATCH 3/4] pata_ftide010: deny IRQ0 From: Sergey Shtylyov To: Jens Axboe , References: <2e552c36-84a5-a642-a8f0-1395f77a1a6a@omprussia.ru> Organization: Open Mobile Platform, LLC Message-ID: Date: Sun, 21 Mar 2021 21:57:51 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <2e552c36-84a5-a642-a8f0-1395f77a1a6a@omprussia.ru> Content-Language: en-US X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT02.lancloud.ru (fd00:f066::142) To LFEX1908.lancloud.ru (fd00:f066::208) Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org If platform_get_irq() returns IRQ0 (considered invalid according to Linus) the driver blithely passes it to ata_host_activate() that treats IRQ0 as a sign that libata should use polling and thus complains about non-NULL IRQ handler passed to it. Deny IRQ0 right away, returning -EINVAL from the probe() method... Fixes: be4e456ed3a5 ("ata: Add driver for Faraday Technology FTIDE010") Signed-off-by: Sergey Shtylyov --- drivers/ata/pata_ftide010.c | 2 ++ 1 file changed, 2 insertions(+) Index: linux-block/drivers/ata/pata_ftide010.c =================================================================== --- linux-block.orig/drivers/ata/pata_ftide010.c +++ linux-block/drivers/ata/pata_ftide010.c @@ -469,6 +469,8 @@ static int pata_ftide010_probe(struct pl irq = platform_get_irq(pdev, 0); if (irq < 0) return irq; + if (!irq) + return -EINVAL; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!res)