[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <487D2AEE.8030309@garzik.org>
Date: Tue, 15 Jul 2008 18:55:42 -0400
From: Jeff Garzik <jeff@...zik.org>
To: Dave Jones <davej@...hat.com>
CC: Andrew Morton <akpm@...ux-foundation.org>, netdev@...r.kernel.org
Subject: Re: [PATCH 1/2] 8139too: Make PIO/MMIO a modparam
Dave Jones wrote:
> On Tue, Jul 15, 2008 at 06:18:30PM -0400, Jeff Garzik wrote:
>
> > > Make PIO/MMIO a runtime thing via a module parameter.
> > > This is needed to support devices that only work with PIO
> > > without penalising devices that work fine with MMIO in
> > > distro kernels.
> > >
> > > Signed-off-by: Dave Jones <davej@...hat.com>
> >
> > Looks great overall.
> >
> > Minor nits:
> >
> > * need module param text description
>
> oops. will fix.
>
> > * [optional] if code not too ugly, change mod param description based on
> > CONFIG_8139TOO_PIO to indicate the currently compiled default
>
> Not sure of a non-icky way to do this other than ifdefs.
> The best I could come up with is.
>
> #ifdef CONFIG_8139TOO_PIO
> MODULE_PARM_DESC(use_io, "PIO/MMIO switch. 0=MMIO 1=PIO default=PIO");
> #else
> MODULE_PARM_DESC(use_io, "PIO/MMIO switch. 0=MMIO 1=PIO default=MMIO");
> #endif
>
> palatable?
best you can do AFAIK, so yes
> > * [optional] would prefer CONFIG_8139TOO_PIO be handled at compile time,
> > by changing the initialized value
>
> This bit should be taken care of in rtl8139_init_module() at the bottom..
>
> + /* enable PIO instead of MMIO, if CONFIG_8139TOO_PIO is selected */
> +#ifdef CONFIG_8139TOO_PIO
> + use_io = 1;
> +#endif
Right, I was saying I prefer simply to set the initialized value
appropriately, and avoid the extra code dollup during module load.
> > * [extra project] would be highly useful for MMIO to fall back to PIO,
> > and vice versa, should any resource be unavailable. Sometimes, mainly
> > with MMIO and broken/weird BIOSen, only the PIO PCI BARs will be filled
> > in with useful info.
>
> Sounds do-able. I'll add it to my rainy-day project list.
Thanks :) A few users out in the wild will definitely thank you.
Jeff
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists