]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
comedi: ni_atmio: Add sanity checks for I/O base address
authorIan Abbott <abbotti@mev.co.uk>
Fri, 30 Jan 2026 16:47:54 +0000 (16:47 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Apr 2026 13:49:39 +0000 (15:49 +0200)
commit68fc1eebe9525bd6c2334d1394e4c46692c09806
tree9c805e8d74e7699cbe0c6a6f44df3c82f6d38ade
parentf0995260a89e5a59cc9e24749c50ec20ec907dbc
comedi: ni_atmio: Add sanity checks for I/O base address

The "ni_atmio" driver uses an admin-supplied configuration option
(`it->options[0]`) to configure the I/O port base address of an AT E
Series board.  Or, if the option value is zero, it can search ISA PNP
devices to look for a compatible board.  If the base address is
configured manually, it currently allows any base address to be
configured but the hardware only supports base addresses (configured by
a configuration utility and stored in nonvolatile memory) in the range
0x20 to 0xFFE0 on 32-byte boundaries.

Add a sanity check to ensure the device is not configured at an
unsupported base address.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://patch.msgid.link/20260130170416.49994-30-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/comedi/drivers/ni_atmio.c