linux/drivers/comedi
Ian Abbott 2081f7ba69 comedi: dmm32at: serialize use of paged registers
commit e03b29b55f upstream.

Some of the hardware registers of the DMM-32-AT board are multiplexed,
using the least significant two bits of the Miscellaneous Control
register to select the function of registers at offsets 12 to 15:

 00 => 8254 timer/counter registers are accessible
 01 => 8255 digital I/O registers are accessible
 10 => Reserved
 11 => Calibration registers are accessible

The interrupt service routine (`dmm32at_isr()`) clobbers the bottom two
bits of the register with value 00, which would interfere with access to
the 8255 registers by the `dm32at_8255_io()` function (used for Comedi
instruction handling on the digital I/O subdevice).

Make use of the generic Comedi device spin-lock `dev->spinlock` (which
is otherwise unused by this driver) to serialize access to the
miscellaneous control register and paged registers.

Fixes: 3c501880ac ("Staging: comedi: add dmm32at driver")
Cc: stable@vger.kernel.org
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://patch.msgid.link/20260112162835.91688-1-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-02-06 16:41:53 +01:00
..
drivers comedi: dmm32at: serialize use of paged registers 2026-02-06 16:41:53 +01:00
kcomedilib staging: comedi: move out of staging directory 2021-04-15 09:26:25 +02:00
comedi.h staging: comedi: move out of staging directory 2021-04-15 09:26:25 +02:00
comedi_buf.c comedi: fix divide-by-zero in comedi_buf_munge() 2025-10-29 14:03:12 +01:00
comedi_fops.c comedi: check device's attached status in compat ioctls 2026-01-19 13:09:22 +01:00
comedi_internal.h comedi: fix race between polling and detaching 2025-08-28 16:24:26 +02:00
comedi_pci.c staging: comedi: move out of staging directory 2021-04-15 09:26:25 +02:00
comedi_pci.h staging: comedi: move out of staging directory 2021-04-15 09:26:25 +02:00
comedi_pcmcia.c staging: comedi: move out of staging directory 2021-04-15 09:26:25 +02:00
comedi_pcmcia.h staging: comedi: move out of staging directory 2021-04-15 09:26:25 +02:00
comedi_usb.c staging: comedi: move out of staging directory 2021-04-15 09:26:25 +02:00
comedi_usb.h staging: comedi: move out of staging directory 2021-04-15 09:26:25 +02:00
comedidev.h staging: comedi: move out of staging directory 2021-04-15 09:26:25 +02:00
comedilib.h staging: comedi: move out of staging directory 2021-04-15 09:26:25 +02:00
drivers.c comedi: Make insn_rw_emulate_bits() do insn->n samples 2025-08-28 16:24:35 +02:00
Kconfig staging: comedi: move out of staging directory 2021-04-15 09:26:25 +02:00
Makefile staging: comedi: move out of staging directory 2021-04-15 09:26:25 +02:00
proc.c staging: comedi: move out of staging directory 2021-04-15 09:26:25 +02:00
range.c staging: comedi: move out of staging directory 2021-04-15 09:26:25 +02:00
TODO staging: comedi: move out of staging directory 2021-04-15 09:26:25 +02:00