From patchwork Tue Feb 14 22:59:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57254 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3244916wrn; Tue, 14 Feb 2023 15:01:12 -0800 (PST) X-Google-Smtp-Source: AK7set+TpPcxtdM0wRXb4ZEUGgRbDxiFUIdMRIEIRY23A6kdBMseJRuSF4496510fnedx/yo4qEJ X-Received: by 2002:a50:cc93:0:b0:4ac:b69a:2f0b with SMTP id q19-20020a50cc93000000b004acb69a2f0bmr4252474edi.33.1676415672292; Tue, 14 Feb 2023 15:01:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676415672; cv=none; d=google.com; s=arc-20160816; b=HxIdgdfiAqcwY1uLkBn5j9bU/w9oDBfauAqDgpRCDApLcSibZCkLy2S/WHJWNOpJ27 +b28uXHOoG88N+FJHUldcId6df5go4CV2ibJXlYlQ1RlZ0RHVB783hB0VlTKqr30QS2J Ub/gzdPkAJhw9kH6ob5vy+mZjNhDZBv36yyoev2AaApVgW/t5ID1VuZq4sZxZ8seK5i0 ESDS+ZiXWXfaXeNPYQoSRRTP7jpNBWjgTAFjRaEgeah5KtCjQ2R0DAw72C9xKNp7A12y KOWU7KSaPOGCLGyjtyd/pgYBn5lpW4cvymlGGcsWou2QTfc3NV2mi8VPQrud51jcVIef QD+g== 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=lR5qI9d9hK/ll8rEwUvXJ2FXfuD9CnZJxpfFOznxrb1cJuCT0oEitw5Dq1MNgxdm53 fzKPZIWnxJ7t1L1QW6AOhkv6oF+cpFBqvhZUWu7ZzrAjmmSjn55wICqHFTXBzSB30n69 AWqVJHNJZkchJdBM/SLCF3VmK0NB4pz8gqsS7j51/w/aVnqmLS+2HRv3ORc2P1CERUhG BlSovK2d9UaGjjaert17qN6LvX6B/jBgwTnIqN2WOXw8jLXg4RDFXTiuvqGa4YEcppFU oqnCV3wT3TWVVPcH8K3vTsVfixogAE7G0uTjaRpHh7CAZXN2qEWLoFbqRaEK1bj5+DgT oO/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 w6-20020aa7da46000000b004acc6686feasi8110712eds.325.2023.02.14.15.00.48; Tue, 14 Feb 2023 15:01:12 -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 S232429AbjBNXAa (ORCPT + 99 others); Tue, 14 Feb 2023 18:00:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231220AbjBNXAY (ORCPT ); Tue, 14 Feb 2023 18:00:24 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C22F029173; Tue, 14 Feb 2023 15:00:21 -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 13F397A0533; Wed, 15 Feb 2023 00:00:19 +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: Tue, 14 Feb 2023 23:59:54 +0100 Message-Id: <20230214230010.20318-3-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230214230010.20318-1-linux@zary.sk> References: <20230214230010.20318-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?1757849239690374920?= X-GMAIL-MSGID: =?utf-8?q?1757849239690374920?= 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 --- 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); }