lkml.org 
[lkml]   [2022]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 4/6] parport_pc: Add a mode mask field for PCI devices
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 <macro@orcam.me.uk>
---
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++;
}
\
 
 \ /
  Last update: 2022-11-16 22:37    [W:0.049 / U:0.736 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site