Commit e03b29b
comedi: dmm32at: serialize use of paged registers
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: 3c50188 ("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>1 parent 06d5a7a commit e03b29b
1 file changed
Lines changed: 30 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
| 333 | + | |
333 | 334 | | |
334 | 335 | | |
335 | 336 | | |
| |||
342 | 343 | | |
343 | 344 | | |
344 | 345 | | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
345 | 349 | | |
346 | 350 | | |
347 | 351 | | |
| |||
354 | 358 | | |
355 | 359 | | |
356 | 360 | | |
| 361 | + | |
| 362 | + | |
357 | 363 | | |
358 | 364 | | |
359 | 365 | | |
| |||
363 | 369 | | |
364 | 370 | | |
365 | 371 | | |
| 372 | + | |
366 | 373 | | |
367 | 374 | | |
368 | 375 | | |
369 | 376 | | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
370 | 380 | | |
371 | 381 | | |
372 | 382 | | |
| 383 | + | |
| 384 | + | |
373 | 385 | | |
374 | 386 | | |
375 | 387 | | |
| |||
429 | 441 | | |
430 | 442 | | |
431 | 443 | | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
432 | 447 | | |
433 | 448 | | |
| 449 | + | |
| 450 | + | |
434 | 451 | | |
435 | 452 | | |
436 | 453 | | |
| |||
481 | 498 | | |
482 | 499 | | |
483 | 500 | | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
484 | 507 | | |
485 | 508 | | |
486 | 509 | | |
487 | 510 | | |
488 | 511 | | |
489 | | - | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
490 | 515 | | |
491 | | - | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
492 | 520 | | |
493 | 521 | | |
494 | 522 | | |
| |||
0 commit comments