From patchwork Sun Jan 8 21:56:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 40588 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1866138wrt; Sun, 8 Jan 2023 14:00:26 -0800 (PST) X-Google-Smtp-Source: AMrXdXv11zDw5Kvddk8fE6uFCEMFgcPGBFbxmSR2dLmwc1BxKB/ANqEDhkGzVgw35BpqULC2vAAK X-Received: by 2002:a05:6402:124a:b0:47f:b4f3:6db9 with SMTP id l10-20020a056402124a00b0047fb4f36db9mr66524928edw.13.1673215226464; Sun, 08 Jan 2023 14:00:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673215226; cv=none; d=google.com; s=arc-20160816; b=QDv4CNdhsDzSy9bFSiaHuKIIY+1gbqW+Gs1/l+yUaZ6RwMpb40pccYp64H53rTM4eG iYzd28FAu8e2YDce7mlEQY1nDEbhMwm+8Z7V5d1WBKl4IhhuTA7eh71OHmbJifzQnl4B 7hizDXKKaZVMMrrB6NPrvNrM60DFUCIOGmM+SQUycb1t+TT7bBuH+azrGskJkxSPfyJK wWxfr0MdZbrE4Xl3uqNo2he6nP7cmFhVZ0jE17948vQZVRE2AdNEGU3YXZmG898lU5K/ MjK8Kjdq5oDhkrJXhhZtWdFuOXuKkKDWyUmBNwrkEv+NBdqpL4PYmMJoB5Gns32iKLf+ YSCQ== 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 :dkim-signature; bh=HQpX0128CCnGU+qDUpUU498cMch/d898rzRC4KudPfQ=; b=wGR/sfLELsy6wRtI/jWjNcjszXElrqcvJ8cn4WTvJSAuWnIEKHJvrLLQfArM9GNtKs L1UnIYA0m0cRMR2Nsh+pfahe+KYHSQKDW5cd9hrUVeqUvzIiXypg9/FciEPZWMEgTEd3 T/DKIIKEqb2adL6P4bzcOU2qHKr+j1b8vf28qCUc7kvg9ICyra8gLeHxuHPXNtN6jy6N 8HOduzEjqjh4Xf9xWD/lY0kBo+jsljXqTO1lRbJxDjJ1HCIqKKVQis4rElJS/dpeB+ZY XD6kA7n5BnUd1rqX7OnsKJNq0s33OoJdSoCOYUGSHsjTYKYv1gU4Slt9GGPW2ON253Jw WsTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=PIIvrKEL; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w22-20020aa7dcd6000000b004837719c1cfsi7097067edu.220.2023.01.08.14.00.03; Sun, 08 Jan 2023 14:00:26 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=PIIvrKEL; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236320AbjAHV5T (ORCPT + 99 others); Sun, 8 Jan 2023 16:57:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236235AbjAHV5K (ORCPT ); Sun, 8 Jan 2023 16:57:10 -0500 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C8877677 for ; Sun, 8 Jan 2023 13:57:09 -0800 (PST) Received: by mail-wm1-x32c.google.com with SMTP id l26so4989946wme.5 for ; Sun, 08 Jan 2023 13:57:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HQpX0128CCnGU+qDUpUU498cMch/d898rzRC4KudPfQ=; b=PIIvrKELxWqdkL8YTQTCAmMKZlufIQIy90RYM0Fadeh7r5M5U6Vggmr9RqD2ZMSJAd daQEfhW+p8U4SxDxaAOys5lorDDbNvvDtYke1ae3fxSqj3OqLs1y/KA2hmsZ33Zo948N JzUA3GJDETwenqI4uix3TGMwo6Cmwji9TCGZunCQFGzI60+uQT5nAJ90ttL1bs8ksoxx TCXRyuuICQGl6yo1CM+psMJc7vQ8nzVjynbilBuLcZGnpIgYGIqWyrteYUypDpTSXfTL 66KpSKt170HsCPMXGKpxfxSwt3aqX2CDF4126UPW1RAPe8YNsfAES90miOlJsXi30VMm igBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HQpX0128CCnGU+qDUpUU498cMch/d898rzRC4KudPfQ=; b=xwPka45U/zr0aTxO2r/LgfYO3puP7ibc5ZFYf99dBzv1oTS8x+ydWO3tmESb94viSz NNVg9nO6U4jB8J8j8v8PQ1a27XiUbNnGEMhlN+snIXUzvYHqSprxWVXkj3pLGlWkfeb1 HTZ0bEAQ8ymBgASzytn+fsm/EyeKE31n/DQXj49tRRXdripGfc9+lkENndI/axCzWbeu NaSsW6l9kHpNVa9D1QeYDUpUM0vRjF+jZAIBCG9omKeby/TDfTf5mCbdoIPGUSvP1Wbv hwNVbgneZZLqArVgKpMhe4tt0WCzNmyVMFcE/Aq0wSWKpvU6cRlgO7HOZEl4m15nsQ7p lqXA== X-Gm-Message-State: AFqh2kq7brwA1A14xofZoGd67lDQnjDP/sABFvOLQLiD7eaSWkLXwNpn evJlmuv9fFKwzJCuD3q57qE= X-Received: by 2002:a05:600c:254:b0:3d2:2c86:d2b2 with SMTP id 20-20020a05600c025400b003d22c86d2b2mr55039647wmj.24.1673215027907; Sun, 08 Jan 2023 13:57:07 -0800 (PST) Received: from localhost.localdomain ([2a10:d582:3bb:0:63f8:f640:f53e:dd47]) by smtp.gmail.com with ESMTPSA id h15-20020a05600c314f00b003d99469ece1sm14654071wmo.24.2023.01.08.13.57.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Jan 2023 13:57:07 -0800 (PST) From: Sudip Mukherjee To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, "Maciej W. Rozycki" , Sudip Mukherjee Subject: [PATCH 4/7] parport_pc: Add a mode mask field for PCI devices Date: Sun, 8 Jan 2023 21:56:53 +0000 Message-Id: <20230108215656.6433-4-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230108215656.6433-1-sudipm.mukherjee@gmail.com> References: <20230108215656.6433-1-sudipm.mukherjee@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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?1754493329234774383?= X-GMAIL-MSGID: =?utf-8?q?1754493329234774383?= From: "Maciej W. Rozycki" 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 Signed-off-by: Sudip Mukherjee --- drivers/parport/parport_pc.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c index ad49fd356c7b..2928f36e05ff 100644 --- a/drivers/parport/parport_pc.c +++ b/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 pci_dev *dev, 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++; }