diff options
author | Maciej W. Rozycki <macro@orcam.me.uk> | 2023-01-08 22:56:54 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-01-20 13:12:00 +0100 |
commit | 5f88cf276e880df7b6e9abc301eef214aa74bf53 (patch) | |
tree | 080d141b939c35a12122529151e7a135d235114b /drivers/parport | |
parent | parport_pc: Add a mode mask field for PCI devices (diff) | |
download | linux-5f88cf276e880df7b6e9abc301eef214aa74bf53.tar.xz linux-5f88cf276e880df7b6e9abc301eef214aa74bf53.zip |
parport_pc: Add an ECR mask field for PCI devices
Add a bitmask field specifying writable ECR bits for PCI devices and
apply it via `__parport_pc_probe_port'.
Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Link: https://lore.kernel.org/r/20230108215656.6433-5-sudipm.mukherjee@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/parport')
-rw-r--r-- | drivers/parport/parport_pc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c index 2928f36e05ff..d7e64f6dfe90 100644 --- a/drivers/parport/parport_pc.c +++ b/drivers/parport/parport_pc.c @@ -2662,6 +2662,10 @@ static struct parport_pc_pci { /* Bit field of parport modes to exclude. */ unsigned int mode_mask; + /* If non-zero, sets the bitmask of writable ECR bits. In that + * case additionally bit 0 will be forcibly set on writes. */ + unsigned char ecr_writable; + /* 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. */ @@ -2868,7 +2872,8 @@ static int parport_pc_pci_probe(struct pci_dev *dev, __parport_pc_probe_port(io_lo, io_hi, irq, PARPORT_DMA_NONE, &dev->dev, IRQF_SHARED, - cards[i].mode_mask, 0); + cards[i].mode_mask, + cards[i].ecr_writable); if (data->ports[count]) count++; } |