From patchwork Sat Feb 18 22:01:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 59032 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp569520wrn; Sat, 18 Feb 2023 14:04:05 -0800 (PST) X-Google-Smtp-Source: AK7set/xg87/mXBh7djJzbit8UC5gZKc7gmgShoyCQK3rLqsrPd3QrePrtA8pucaxDVNldhOQr6D X-Received: by 2002:a05:6a20:3944:b0:c7:320a:60b6 with SMTP id r4-20020a056a20394400b000c7320a60b6mr9731661pzg.26.1676757845347; Sat, 18 Feb 2023 14:04:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676757845; cv=none; d=google.com; s=arc-20160816; b=ZihHqZJHxxbNWqrMbYzmX24ocljdLf+mBCfgBClyTZOZqet4kv1eESbEM5WPv7ms16 vvJRbg1zgWhLigDShzV60LZg0etxYZnFqMRRh/oM1F/qZxYbCIPx6NLNXXEaMn0v+/jh VbzQhTiz2pghU4csoiLS2phyzrUHzvWs+4NRHS/u+SVzITgIil4BmArcIvuKCXDwkGaY R3QmGOfQEY7tpSrQLrGXly5LMiTlliW1yoaMkPr7seu9azJSiNhLzIoCBJkNNe3iic33 oS5i7fit2G2ren4vMvJwgMFbUWdJxjQvY+groLCYOwtfilqn2Xy6p21CfgUqEUL2uCZ6 1r9g== 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=sTFdeenBmZF3QDx1M+2m2TX8+5SwXUGgYqTFxsiQ1L3WGukuEhytOFwM364ch7LK+g ZkbKZVBc7qlYtZV4cCFAMahtbw3G39MFvF+tF4g9d+Ccgpwb4fFN7mngYOIPfP8WNBpy 1aPu6qNZb+JRaaRRLD9RQ0pREQfvvdGWlerdrJO1OLR74S4BBt+ljyOxkFGzoJHJuocS pa0Z1vbq4v+EF1JmiYqkKmM1sSZwqSZE5qmuZ8AxU4HWlSWXphsPRL9pO5Ydr9sHMCvY 47AnRR6PPYCQw9csIWr1oE/Ymr2O6JQUVvst99k/4e034ynh/w5lMJBzJpx8Cxq8GGZv k2lQ== 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 t8-20020a654b88000000b004fb86793704si9154753pgq.764.2023.02.18.14.03.51; Sat, 18 Feb 2023 14:04:05 -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 S229731AbjBRWCJ (ORCPT + 99 others); Sat, 18 Feb 2023 17:02:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229523AbjBRWCH (ORCPT ); Sat, 18 Feb 2023 17:02:07 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6E08B1285E; Sat, 18 Feb 2023 14:02: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 693037A0507; Sat, 18 Feb 2023 23:02:02 +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: Sat, 18 Feb 2023 23:01:22 +0100 Message-Id: <20230218220138.5692-3-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230218220138.5692-1-linux@zary.sk> References: <20230218220138.5692-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?1758208034145203264?= X-GMAIL-MSGID: =?utf-8?q?1758208034145203264?= 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); }