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

Tim Waugh (tim@cyberelk.demon.co.uk)
Wed, 18 Mar 1998 21:15:53 +0000 (GMT)


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 */

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