[PATCH 11/18] pcmcia: do not use io_req_t when calling pcmcia_request_io()

Dominik Brodowski linux at dominikbrodowski.net
Sat Aug 14 04:26:53 EDT 2010


Hey,

On Sat, Aug 14, 2010 at 08:59:11AM +0900, Komuro wrote:
> >@@ -248,9 +248,8 @@ static int fmvj18x_probe(struct pcmcia_device *link)
> >     lp->base = NULL;
> > 
> >     /* The io structure describes IO port mapping */
> >-    link->io.NumPorts1 = 32;
> >-    link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
> >-    link->io.IOAddrLines = 5;
> >+    link->resource[0]->end = 32;
> >+    link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
> > 
> 
> 
> Do you have any reason to move "link->io_lines = 5" from fmvj18x_probe
> to fmvj18x_config?

Yes -- I want to have it close to pcmcia_request_io(), especially as I wish
to introduce an "autoconfig" feature for the next kernel (2.6.37). A
preliminary patch for that can already be found in the "pcmcia-test" branch,
accessible e.g. via gitweb:

http://git.kernel.org/?p=linux/kernel/git/brodo/pcmcia-2.6.git;a=commitdiff;h=1fefe76a0a620ffc54c4084f4c04dd4d2ac05392

After this patch, a driver may have all the fields filled out automatically
by the PCMCIA core, but can then override things -- e.g. by setting
link->io_lines = 5 . But this override must happen between the setting of
the values (within pcmcia_loop_config(), obviously) and the use of the
values (in pcmcia_request_io()). That's the reason for the move.

Best,
	Dominik



More information about the linux-pcmcia mailing list