From patchwork Mon Mar 6 17:27:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 65023 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1992136wrd; Mon, 6 Mar 2023 10:07:08 -0800 (PST) X-Google-Smtp-Source: AK7set/HCuEbhQaH3tlHwQDCtNv5FkoyOK1by8FODagXJTLcFNGtmFiwVYhZdNPSyLff2xtSwbF2 X-Received: by 2002:a05:6a20:a00d:b0:bf:58d1:ce92 with SMTP id p13-20020a056a20a00d00b000bf58d1ce92mr11800243pzj.17.1678126027965; Mon, 06 Mar 2023 10:07:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678126027; cv=none; d=google.com; s=arc-20160816; b=DNvsokunvFsrsZWvMbQPIR4C8EkDIvDrZ51twP+RfBluVV8UBnfyc55QyOub/31VwN KWH0fO7ygPw1h9VrlfJeqyViovTXphQ5A/82nWcw3+SSDRu4zMr8cSvUX+ufg5i1Fnl1 /XqDqLlNAonB6JvTLTnL0px4/p0g/kOiAHtHNWIReOsLaa4SpIOzRlUh4Il5ueXRBj39 yw4f8AF0ytZHdnUc3GHfN0Zg+aFziBGGmVyY6KXIJTlIaZaQWl+a/KsBmz/HkoLQHwt6 yBME81OU5My2UKL0CVWqhe7LMLOKtfhBlCyZ0etf4A631OUDf994LfWG41jjK7dcnRrk vPxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=SLjJhfx9TSmsXcKqWz41uztohQuSfa5OlIGd5AVBdMg=; b=013Hh7kW7PBy6gombBaw8e31R8uFm/Nb5r/YkchbhzpHs61z+jGJWxYikN6AvFb7CN 3PwjbKB3aJI+YN5TKIEdneXPh9elCDmdVDQYPUEzS9sCLOhX769My2DD+eBqr9LXLtIj lkIF7PLUOMRo1R7M7oLKXILs0oho3cWztnWCJ2ySa+59fe4wRcgCwZlkca3TCKDLTOra pEDAI5UxCoyDE/R5pOuzi5iJha0i0XqVbHpl0sTNGIe3goKCD+4UPPWvBnYL2+0a7BGU 4ue9KpUfqEI1ckoapCsmglaUxcLFMHhATLVsqZXUU3z6rdL8SVkjkyPCKQuGVoR7TJFM Z3+w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 16-20020a630b10000000b004fab9a4430csi9340529pgl.177.2023.03.06.10.06.55; Mon, 06 Mar 2023 10:07:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230460AbjCFR4P (ORCPT + 99 others); Mon, 6 Mar 2023 12:56:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230476AbjCFRzs (ORCPT ); Mon, 6 Mar 2023 12:55:48 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6B3616907C; Mon, 6 Mar 2023 09:55:17 -0800 (PST) Received: from gsql.ggedos.sk (off-20.infotel.telecom.sk [212.5.213.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by hosting.gsystem.sk (Postfix) with ESMTPSA id 4CD087A047E; Mon, 6 Mar 2023 18:28:28 +0100 (CET) From: Ondrej Zary To: Damien Le Moal Cc: Christoph Hellwig , Sergey Shtylyov , Jens Axboe , Tim Waugh , linux-block@vger.kernel.org, linux-parport@lists.infradead.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 02/18] pata_parport: probe all units automatically Date: Mon, 6 Mar 2023 18:27:36 +0100 Message-Id: <20230306172752.7727-3-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230306172752.7727-1-linux@zary.sk> References: <20230306172752.7727-1-linux@zary.sk> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759642678029227197?= X-GMAIL-MSGID: =?utf-8?q?1759642678029227197?= Only unit 0 is probed after registering a protocol driver or attaching a new parport. This causes bpck and bpck6 devices to be not detected automatically. Probe all units just like in manual device creation (using sysfs). Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/pata_parport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/ata/pata_parport/pata_parport.c b/drivers/ata/pata_parport/pata_parport.c index 294a266a0dda..49e99c9465fd 100644 --- a/drivers/ata/pata_parport/pata_parport.c +++ b/drivers/ata/pata_parport/pata_parport.c @@ -530,7 +530,7 @@ int pata_parport_register_driver(struct pi_protocol *pr) if (probe) { /* probe all parports using this protocol */ idr_for_each_entry(&parport_list, parport, port_num) - pi_init_one(parport, pr, -1, 0, -1); + pi_init_one(parport, pr, -1, -1, -1); } mutex_unlock(&pi_mutex); @@ -665,7 +665,7 @@ static void pata_parport_attach(struct parport *port) if (probe) { /* probe this port using all protocols */ idr_for_each_entry(&protocols, pr, pr_num) - pi_init_one(port, pr, -1, 0, -1); + pi_init_one(port, pr, -1, -1, -1); } mutex_unlock(&pi_mutex); }