Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9713ab28 authored by Dominik Brodowski's avatar Dominik Brodowski
Browse files

pcmcia: do not use ioports < 0x100 on x86



On x86 systems using ACPI _CRS information -- now the default for
post-2008 systems -- the PCI root bus no longer pretends to be
offering the root ioport_resource. To avoid accidentally hitting
some platform / system device, use only I/O ports >= 0x100 for
PCMCIA devices on x86.

Reported-by: default avatarKomuro <komurojun-mbn@nifty.com>
CC: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: default avatarDominik Brodowski <linux@dominikbrodowski.net>
parent 5cbb2b94
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -810,6 +810,13 @@ static int adjust_io(struct pcmcia_socket *s, unsigned int action, unsigned long
	unsigned long size = end - start + 1;
	int ret = 0;

#if defined(CONFIG_X86)
	/* on x86, avoid anything < 0x100 for it is often used for
	 * legacy platform devices */
	if (start < 0x100)
		start = 0x100;
#endif

	if (end < start)
		return -EINVAL;