]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mcb: mcb-pci: detect IO mapped devices before requesting resources
authorSanjuán García, Jorge <Jorge.SanjuanGarcia@duagon.com>
Thu, 23 May 2024 10:35:03 +0000 (10:35 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Jun 2024 15:48:57 +0000 (17:48 +0200)
commita774c5d1f9c4ad43411ee4010d8eb8e60b8e60a0
tree5d3def77269d303e8d135debe68abcd1c5eb7183
parent10724d5d477f8baadeaa183e288d6bd872bcade2
mcb: mcb-pci: detect IO mapped devices before requesting resources

If the memory region is requested with devm_request_mem_region()
for an IO mapped device it will return an error and mcb-pci will
incorrectly report it with EBUSY code.

Make sure we identify if the reosure is IO mapped and fail early
with a correct ENOTSUPP code.

Reviewed-by: Jose Javier Rodriguez Barbarin <JoseJavier.Rodriguez@duagon.com>
Signed-off-by: Jorge Sanjuan Garcia <jorge.sanjuangarcia@duagon.com>
Link: https://lore.kernel.org/r/20240523103430.423340-1-jorge.sanjuangarcia@duagon.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mcb/mcb-pci.c