Re: FOUND: Boot-time Hang on Parallel Port in 2.1.90-pre[23]

David C Niemi (niemi@tux.org)
Thu, 19 Mar 1998 00:26:38 -0500 (EST)


I was a bit skeptical, as I don't see how turning the parallel port back on
in the BIOS could solve it per this theory, but the following patch DOES
work for me. Adam Richter also quickly came up with a very similar
diagnosis, which reached me as I was testing the patch.

The test was on the real 2.1.90, which of course did have the same problem
prior to this patch.

Thanks!

On Wed, 18 Mar 1998, Tim Waugh wrote:
> On Wed, 18 Mar 1998, David C Niemi wrote:
> > The problem is associated with saying yes to all three module support
> > options, and turning on the new Parallel Port with PC Hardware, Parallel
> > Printer support with IEEE 1284 readback, on a machine *with the parallel
> > port turned off in the BIOS*. Perhaps this is unsolvable, but the older
> > Parallel Port/Printer code did not have this problem. I'm not sure what
> > the new module support has to do with anything, but I seemed to need it set
> > to Yes/Yes/Yes to reproduce the problem.
>
> Aha. The problem is most likely that parport_enumerate will attempt to
> request_module("parport_lowlevel") regardless of whether any lowlevel
> drivers are configured as modules.
>
> Please try out this patch. It also eliminates a nasty potential infinite
> recursion when the probe is configured as a module.
>
> Tim.
> */
>
> --- linux/drivers/misc/parport_share.c~ Wed Mar 18 21:12:29 1998
> +++ linux/drivers/misc/parport_share.c Wed Mar 18 21:13:46 1998
> @@ -38,6 +38,7 @@
>
> static struct parport *portlist = NULL, *portlist_tail = NULL;
> static int portcount = 0;
> +static int requesting_probe = 0;
>
> void (*parport_probe_hook)(struct parport *port) = NULL;
>
> @@ -46,9 +47,16 @@
> {
> #ifdef CONFIG_KMOD
> if (portlist == NULL) {
> +#ifdef CONFIG_PARPORT_LOWLEVEL_MODULE
> request_module("parport_lowlevel");
> +#endif /* CONFIG_PARPORT_LOWLEVEL_MODULE */
> #ifdef CONFIG_PNP_PARPORT_MODULE
> - request_module("parport_probe");
> + if (!requesting_probe)
> + {
> + requesting_probe++;
> + request_module("parport_probe");
> + requesting_probe--;
> + }
> #endif /* CONFIG_PNP_PARPORT_MODULE */
> }
> #endif /* CONFIG_KMOD */
>

--- David C Niemi --- niemi@tux.org --- Reston, Virginia, USA ---
"Well the lush separation unfolds you - and the products of wealth
push you along on the bow wave of their spiritless undying selves."

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu