Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1203049rwb; Wed, 16 Nov 2022 13:48:23 -0800 (PST) X-Google-Smtp-Source: AA0mqf5UK9giOW6id4ySHuMZGBVOSS6503pFbk9ujVOY0UmnzbDsNZAO9VDa05xth/UifxqcdZ0h X-Received: by 2002:a05:6a00:1c84:b0:569:92fa:cbbc with SMTP id y4-20020a056a001c8400b0056992facbbcmr25449242pfw.77.1668635303596; Wed, 16 Nov 2022 13:48:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668635303; cv=none; d=google.com; s=arc-20160816; b=MhZip+orhsrlLlV7fDa2iv5sb+a5XCNXQftuQSTEe35IL6pRBLX75mBzyXz1XSyQaY Ekh+43xAdxgep4ETOGB6HoqpgW95zz79OOHca1EwUhTSEiXm2LnUjKc/EE4hw7F3pWZV 5OzGFXKu9ABpq66di3ZKrQYsPMu/4lFXeY0riUSlm3Mkv1tKpyGmDl0oiWKuosI+Vacj LnCHe0NuP0JhYkgOcWzCQCy2SIid+ysBfOXGoZk9tHo9JYXfR87X3ksksw5yx3jSqJM8 K4WVujw60ZEsVi9yp/aVX6+uEqjyx7kj0Hi+vC4juuMdstMfH3pSebYxwyEqk6UFkeq1 87vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=iQbCXP1ezmadEqzd8F1XJCf8GzjyXw7QCS+Fn5xmITc=; b=B3N0EsthSyg0/uRwv+FrDs7X2ignnh+uZzTA6W6RUeNVQJR5WAjMJUnpovjL+PzNI6 5z8rBX3Rk9/6oK/BG1W5o4OM256s3zmJPFGOJ9F7iCaOiv7eq+1DElXIlRE7YR02q4fJ xz1Aes/UCq5+7UmesaBoVFX82A/F5WFXbAv9DYvCawpwEdNetjP9fp9lkfbeKYa2I0Rj janKjOiHJPiprKwy4WmFnZg0gNrsiHQoNx8MAlhwpffZNBNIgfxXNY9rY2lZtGOrYJwr G9tAi0NtETVnc9O3nhStUDgRlU+e691/3mOzosPpSoYDHcPD1eapkIU7IfULwjs/r1BE mwrA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h14-20020a170902f54e00b00186ef861484si18066091plf.500.2022.11.16.13.48.12; Wed, 16 Nov 2022 13:48:23 -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 S234224AbiKPVgO (ORCPT + 90 others); Wed, 16 Nov 2022 16:36:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234191AbiKPVgH (ORCPT ); Wed, 16 Nov 2022 16:36:07 -0500 Received: from angie.orcam.me.uk (angie.orcam.me.uk [IPv6:2001:4190:8020::34]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5DECFF5B1 for ; Wed, 16 Nov 2022 13:36:06 -0800 (PST) Received: by angie.orcam.me.uk (Postfix, from userid 500) id B96BA92009C; Wed, 16 Nov 2022 22:36:05 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id B268892009B; Wed, 16 Nov 2022 21:36:05 +0000 (GMT) Date: Wed, 16 Nov 2022 21:36:05 +0000 (GMT) From: "Maciej W. Rozycki" To: Sudip Mukherjee cc: linux-kernel@vger.kernel.org Subject: [PATCH 4/6] parport_pc: Add a mode mask field for PCI devices In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE 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 Add a mode mask field for PCI devices and use `__parport_pc_probe_port' in place of `parport_pc_probe_port' to apply it. Signed-off-by: Maciej W. Rozycki --- drivers/parport/parport_pc.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) linux-parport-pc-pci-mode-mask.diff Index: linux-macro/drivers/parport/parport_pc.c =================================================================== --- linux-macro.orig/drivers/parport/parport_pc.c +++ linux-macro/drivers/parport/parport_pc.c @@ -2659,6 +2659,9 @@ static struct parport_pc_pci { /* -1 if not there, >6 for offset-method (max BAR is 6) */ } addr[4]; + /* Bit field of parport modes to exclude. */ + unsigned int mode_mask; + /* If set, this is called immediately after pci_enable_device. * If it returns non-zero, no probing will take place and the * ports will not be used. */ @@ -2862,9 +2865,10 @@ static int parport_pc_pci_probe(struct p id->vendor, id->device, io_lo, io_hi, irq); } data->ports[count] = - parport_pc_probe_port(io_lo, io_hi, irq, - PARPORT_DMA_NONE, &dev->dev, - IRQF_SHARED); + __parport_pc_probe_port(io_lo, io_hi, irq, + PARPORT_DMA_NONE, &dev->dev, + IRQF_SHARED, + cards[i].mode_mask, 0); if (data->ports[count]) count++; }