From patchwork Wed Feb 15 19:45:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57690 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp383847wrn; Wed, 15 Feb 2023 11:47:10 -0800 (PST) X-Google-Smtp-Source: AK7set+oG313Bo1N77WIW0j3ifLZeFtfGoq8iV+TDK7Ya16eOotOlB4z1qBPgi2TIKlxeTVZFA3b X-Received: by 2002:a05:6a00:2884:b0:5a8:d438:c72 with SMTP id ch4-20020a056a00288400b005a8d4380c72mr566266pfb.5.1676490430676; Wed, 15 Feb 2023 11:47:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676490430; cv=none; d=google.com; s=arc-20160816; b=jDNm8rS5rxweYlTktqRGBHB46HFaMVGbJ1xoN3jpnTf7mCu2z3uSTDRJeXUjy9NrYC XYoW4pV8xgbM3MEZjqKRnFFYv43Mm0B2UE1D1WRYwZb08dNdfBrpukDH7NVd9GgnN2zc v4GNVG+oBPI+F3r8RjPjEEw7gFdGbAY3ORWnFYnMID2PhMQSsho2Kq29/MpDkx4CSp5r xZVBgNBr7XujlNE80KgkBKW0MxUbgWdagUkYXuV4fhY3ff8i5zjm9HSo3X7acKthvk5k C5lhYpSJs/UmWXSsR9g8FuOoMSqeCgSkpGOzaNnE6+N0lKBxAepKWBKGGcJATzhE1hit 5ovQ== 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=kRiDqyVYAQ8H4eh1cAVCq8bgBhdu++B/LxbJiZhyjJ8=; b=cWHDBkAPeAkDJyWde9r7VIqfb8iwUPJh0zUOwSsgFDsWo69o59rLAjgVvHR9e1Syw9 DErItVWGhrFc0LFcd+hFIeS8uCzeAmlLG366iyjay714BQ+BvoDQhz6j+2Y0GyBKV5hM ZbdarQfG3k/X0vRnbSZe/jF/btgghprtiWGs8FpEhVgbjJeD0HZFDmCBFBeK0dBVmxuB Fi4fmUAfbfivUdowXubgUAoTlR74y0v2it2tphORL8jgs2mKzXznfs48WqR0F1y+08lH c1maA1zt3UUpidca+WrH0cI+EEjfCOXnBXmYvw6JFyxK1K6jwV85SjowUbSiikCNLqqY 6P4g== 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 y5-20020aa79e05000000b005a8d85904e1si5944496pfq.361.2023.02.15.11.46.58; Wed, 15 Feb 2023 11:47:10 -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 S229788AbjBOTqX (ORCPT + 99 others); Wed, 15 Feb 2023 14:46:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229623AbjBOTqL (ORCPT ); Wed, 15 Feb 2023 14:46:11 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id ECB5E410A0; Wed, 15 Feb 2023 11:46:04 -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 CDA817A04EF; Wed, 15 Feb 2023 20:46:03 +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: Wed, 15 Feb 2023 20:45:38 +0100 Message-Id: <20230215194554.25632-3-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230215194554.25632-1-linux@zary.sk> References: <20230215194554.25632-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?1757927629801595122?= X-GMAIL-MSGID: =?utf-8?q?1757927629801595122?= 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). Signed-off-by: Ondrej Zary Reviewed-by: Sergey Shtylyov --- 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); }