Questions about ioport-assignments

Dominik Brodowski linux at dominikbrodowski.net
Fri Apr 16 14:44:33 EDT 2010


On Fri, Apr 16, 2010 at 10:21:35PM +0900, Komuro wrote:
> Hi,
> 
> > Wolfram wrote:
> > 
> > >>- Is it just a buggy card if it works at 0x300 but not 0xc300
> > >>  (or is it maybe a problem with Linux assigning the io area)?
> > >>- Why is IOAddrLines forced to 16 (and thus alignment to 0x10000), but only
> > >>  if BasePort1 is 0?
> > 
> 
> In this case, 
> start = 0xc000, 
> align_data->mask = 0x3ff, 
> align_data->offset = 0x300
> then ret becomes 0xc300;
> 
> but ret should be 0x300.

That's not pcmcia_common_align()s fault -- but this line in alloc_io_space:

	align = (*base) ? (lines ? 1<<lines : 0) : 1;

Should we try replacing it with

	align = lines ? 1 << lines : 0;

unconditionally?

Best,
	Dominik



More information about the linux-pcmcia mailing list