* Re: parport_pc tries to load parport_serial automatically
2001-06-26 9:23 ` Tim Waugh
@ 2001-06-26 12:55 ` Simon Huggins
2001-06-26 12:56 ` Simon Huggins
2001-06-26 13:37 ` Keith Owens
2001-06-26 13:30 ` Marcelo Tosatti
2001-06-26 17:59 ` Philip Blundell
2 siblings, 2 replies; 15+ messages in thread
From: Simon Huggins @ 2001-06-26 12:55 UTC (permalink / raw)
To: lkml
Hi lkml,
On Tue, Jun 26, 2001 at 10:23:03AM +0100, Tim Waugh wrote:
> > If the initialization of parport_serial fails, we obviously get an
> > error message, which is really annoying:
> [This is different to the issue that is fixed in the -ac tree about
> parport_serial getting probed for even when disabled in config.]
> The idea was that people who have multi-IO cards but don't know what
> modules are can have things Just Work: parport_serial gets loaded
> automagically and detects their cards for them. But yes, the flip
> side is that people who _don't_ have multi-IO cards are going to get
> that error.
> - change parport_pc so that it doesn't request parport_serial at
> init. In this case, how will parport_serial get loaded at all?
> Perhaps with some recommended /etc/modules.conf lines (perhaps
> parport_lowlevel{1,2,3,...})?
Can't people who have such things just put:
pre-install insmod parport-serial
post-rm rmmod parport-serial
in modules.conf?
> - people who get the error and don't like it can put 'alias
> parport_serial off' in /etc/modules.conf. Not especially pleasant,
> I guess.
That's the opposite of the above I suppose.
> - parport_serial could be made to initialise successfully even if it
> doesn't see any devices that it can drive.
That sounds icky IMHO.
Simon.
--
UK based domain, email and web hosting ***/ "An excellent suggestion /*
http://www.blackcatnetworks.co.uk/ **/ sir, with only two minor /**
sales@blackcatnetworks.co.uk */ flaws...." - Kryten /***
Black Cat Networks / /****
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: parport_pc tries to load parport_serial automatically
2001-06-26 12:55 ` Simon Huggins
@ 2001-06-26 12:56 ` Simon Huggins
2001-06-26 13:37 ` Keith Owens
1 sibling, 0 replies; 15+ messages in thread
From: Simon Huggins @ 2001-06-26 12:56 UTC (permalink / raw)
To: lkml
Hi lkml,
On Tue, Jun 26, 2001 at 02:55:31PM +0200, Simon Huggins wrote:
> post-rm rmmod parport-serial
post-remove rmmod parport-serial
even.
Simon.
--
* "Oops, yes, we now return you to your regularly scheduled kgcc *
| wars." -- Malcolm Beattie |
* *
Brought to you by the letter D and the number 17
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: parport_pc tries to load parport_serial automatically
2001-06-26 12:55 ` Simon Huggins
2001-06-26 12:56 ` Simon Huggins
@ 2001-06-26 13:37 ` Keith Owens
2001-06-26 13:53 ` Tim Waugh
1 sibling, 1 reply; 15+ messages in thread
From: Keith Owens @ 2001-06-26 13:37 UTC (permalink / raw)
To: Simon Huggins; +Cc: lkml
On Tue, 26 Jun 2001 14:55:31 +0200,
Simon Huggins <huggie@earth.li> wrote:
>Can't people who have such things just put:
>pre-install insmod parport-serial
>post-rm rmmod parport-serial
>in modules.conf?
"below parport_pc parport-serial" is even cleaner. One line, modprobe
does everything else.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: parport_pc tries to load parport_serial automatically
2001-06-26 13:37 ` Keith Owens
@ 2001-06-26 13:53 ` Tim Waugh
2001-06-26 14:34 ` Keith Owens
0 siblings, 1 reply; 15+ messages in thread
From: Tim Waugh @ 2001-06-26 13:53 UTC (permalink / raw)
To: Keith Owens; +Cc: Simon Huggins, lkml
[-- Attachment #1: Type: text/plain, Size: 266 bytes --]
On Tue, Jun 26, 2001 at 11:37:19PM +1000, Keith Owens wrote:
> "below parport_pc parport-serial" is even cleaner. One line, modprobe
> does everything else.
Would this have any different effect than the current situation if
parport_serial fails to load?
Tim.
*/
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: parport_pc tries to load parport_serial automatically
2001-06-26 13:53 ` Tim Waugh
@ 2001-06-26 14:34 ` Keith Owens
0 siblings, 0 replies; 15+ messages in thread
From: Keith Owens @ 2001-06-26 14:34 UTC (permalink / raw)
To: Tim Waugh; +Cc: Simon Huggins, lkml
On Tue, 26 Jun 2001 14:53:55 +0100,
Tim Waugh <twaugh@redhat.com> wrote:
>On Tue, Jun 26, 2001 at 11:37:19PM +1000, Keith Owens wrote:
>
>> "below parport_pc parport-serial" is even cleaner. One line, modprobe
>> does everything else.
>
>Would this have any different effect than the current situation if
>parport_serial fails to load?
It behaves the same as an inter-module dependency, if parport-serial
fails then parport_pc will not be loaded. If I remember correctly,
this was suggested in the context that people who want both should put
something in modules.conf, IOW this is what the user asked for.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: parport_pc tries to load parport_serial automatically
2001-06-26 9:23 ` Tim Waugh
2001-06-26 12:55 ` Simon Huggins
@ 2001-06-26 13:30 ` Marcelo Tosatti
2001-06-26 15:21 ` Tim Waugh
2001-06-26 17:59 ` Philip Blundell
2 siblings, 1 reply; 15+ messages in thread
From: Marcelo Tosatti @ 2001-06-26 13:30 UTC (permalink / raw)
To: Tim Waugh; +Cc: lkml
On Tue, 26 Jun 2001, Tim Waugh wrote:
> On Tue, Jun 26, 2001 at 03:17:32AM -0300, Marcelo Tosatti wrote:
>
> > If the initialization of parport_serial fails, we obviously get an
> > error message, which is really annoying:
>
> [This is different to the issue that is fixed in the -ac tree about
> parport_serial getting probed for even when disabled in config.]
>
> The idea was that people who have multi-IO cards but don't know what
> modules are can have things Just Work: parport_serial gets loaded
> automagically and detects their cards for them. But yes, the flip
> side is that people who _don't_ have multi-IO cards are going to get
> that error.
>
> There are three ways out, I think:
>
> - change parport_pc so that it doesn't request parport_serial at
> init. In this case, how will parport_serial get loaded at all?
> Perhaps with some recommended /etc/modules.conf lines (perhaps
> parport_lowlevel{1,2,3,...})?
I think this is sane. This is how it works for parport_pc.
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: parport_pc tries to load parport_serial automatically
2001-06-26 13:30 ` Marcelo Tosatti
@ 2001-06-26 15:21 ` Tim Waugh
2001-06-27 10:32 ` Marcelo Tosatti
0 siblings, 1 reply; 15+ messages in thread
From: Tim Waugh @ 2001-06-26 15:21 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: lkml
[-- Attachment #1: Type: text/plain, Size: 519 bytes --]
On Tue, Jun 26, 2001 at 10:30:41AM -0300, Marcelo Tosatti wrote:
> > - change parport_pc so that it doesn't request parport_serial at
> > init. In this case, how will parport_serial get loaded at all?
> > Perhaps with some recommended /etc/modules.conf lines (perhaps
> > parport_lowlevel{1,2,3,...})?
>
> I think this is sane. This is how it works for parport_pc.
Right. Actually, setting an alias of parport_lowlevel to
parport_serial would cause the right things to happen I think.
Tim.
*/
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: parport_pc tries to load parport_serial automatically
2001-06-26 15:21 ` Tim Waugh
@ 2001-06-27 10:32 ` Marcelo Tosatti
2001-07-04 12:36 ` Tim Waugh
0 siblings, 1 reply; 15+ messages in thread
From: Marcelo Tosatti @ 2001-06-27 10:32 UTC (permalink / raw)
To: Tim Waugh; +Cc: lkml
On Tue, 26 Jun 2001, Tim Waugh wrote:
> On Tue, Jun 26, 2001 at 10:30:41AM -0300, Marcelo Tosatti wrote:
>
> > > - change parport_pc so that it doesn't request parport_serial at
> > > init. In this case, how will parport_serial get loaded at all?
> > > Perhaps with some recommended /etc/modules.conf lines (perhaps
> > > parport_lowlevel{1,2,3,...})?
> >
> > I think this is sane. This is how it works for parport_pc.
>
> Right. Actually, setting an alias of parport_lowlevel to
> parport_serial would cause the right things to happen I think.
So,
Could you remove the request_module() from parport_pc ?
Thanks Tim
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: parport_pc tries to load parport_serial automatically
2001-06-27 10:32 ` Marcelo Tosatti
@ 2001-07-04 12:36 ` Tim Waugh
2001-07-04 12:38 ` Alan Cox
0 siblings, 1 reply; 15+ messages in thread
From: Tim Waugh @ 2001-07-04 12:36 UTC (permalink / raw)
To: Alan Cox; +Cc: lkml
On Wed, Jun 27, 2001 at 07:32:42AM -0300, Marcelo Tosatti wrote:
> Could you remove the request_module() from parport_pc ?
Yes.
Here is a patch against 2.4.5-ac24.
Tim.
*/
2001-07-04 Tim Waugh <twaugh@redhat.com>
* drivers/parport/parport_pc.c: Don't load parport_serial.
* drivers/parport/ChangeLog: Updated.
--- linux/drivers/parport/parport_pc.c.orig Wed Jul 4 13:30:01 2001
+++ linux/drivers/parport/parport_pc.c Wed Jul 4 13:30:26 2001
@@ -2931,11 +2931,6 @@
if (ret && registered_parport)
pci_unregister_driver (&parport_pc_pci_driver);
-#ifdef CONFIG_PARPORT_SERIAL_MODULE
- if (!ret)
- request_module ("parport_serial");
-#endif
-
return ret;
}
--- linux/drivers/parport/ChangeLog.orig Wed Jul 4 13:30:32 2001
+++ linux/drivers/parport/ChangeLog Wed Jul 4 13:32:01 2001
@@ -0,0 +1,6 @@
+2001-07-04 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c (init_module): Don't try to load parport_serial.
+ This means that the user needs to load it (or a hardware detection
+ program on their behalf) if necessary.
+
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: parport_pc tries to load parport_serial automatically
2001-07-04 12:36 ` Tim Waugh
@ 2001-07-04 12:38 ` Alan Cox
2001-07-04 12:38 ` Tim Waugh
0 siblings, 1 reply; 15+ messages in thread
From: Alan Cox @ 2001-07-04 12:38 UTC (permalink / raw)
To: Tim Waugh; +Cc: Alan Cox, lkml
> -#ifdef CONFIG_PARPORT_SERIAL_MODULE
> - if (!ret)
> - request_module ("parport_serial");
> -#endif
> -
> return ret;
> }
>
> --- linux/drivers/parport/ChangeLog.orig Wed Jul 4 13:30:32 2001
> +++ linux/drivers/parport/ChangeLog Wed Jul 4 13:32:01 2001
> @@ -0,0 +1,6 @@
> +2001-07-04 Tim Waugh <twaugh@redhat.com>
> +
> + * parport_pc.c (init_module): Don't try to load parport_serial.
> + This means that the user needs to load it (or a hardware detection
> + program on their behalf) if necessary.
> +
Can hotplug handle this from a PCI id table ?
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: parport_pc tries to load parport_serial automatically
2001-06-26 9:23 ` Tim Waugh
2001-06-26 12:55 ` Simon Huggins
2001-06-26 13:30 ` Marcelo Tosatti
@ 2001-06-26 17:59 ` Philip Blundell
2001-06-26 19:50 ` Tim Waugh
2 siblings, 1 reply; 15+ messages in thread
From: Philip Blundell @ 2001-06-26 17:59 UTC (permalink / raw)
To: Tim Waugh; +Cc: Marcelo Tosatti, lkml
[-- Attachment #1: Type: text/plain, Size: 997 bytes --]
>- change parport_pc so that it doesn't request parport_serial at
> init. In this case, how will parport_serial get loaded at all?
> Perhaps with some recommended /etc/modules.conf lines (perhaps
> parport_lowlevel{1,2,3,...})?
This would be a bit bad, because it would require people to guess whether they
might have a card that parport_serial can drive and/or try loading the module
to see what happens.
I guess one option would be for parport_pc to somehow "know" what cards are
really multi-I/O ones, and only load parport_serial when it will be able to
find something to do. Doesn't seem all that appealing though.
>- parport_serial could be made to initialise successfully even if it
> doesn't see any devices that it can drive.
If you do that then the code will effectively be there all the time, even when
it's not needed. You might as well just compile it in to parport_pc. To be
honest, there isn't all that much of it so maybe this wouldn't be such a bad
idea.
p.
[-- Attachment #2: Type: application/pgp-signature, Size: 237 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: parport_pc tries to load parport_serial automatically
2001-06-26 17:59 ` Philip Blundell
@ 2001-06-26 19:50 ` Tim Waugh
0 siblings, 0 replies; 15+ messages in thread
From: Tim Waugh @ 2001-06-26 19:50 UTC (permalink / raw)
To: Philip Blundell; +Cc: Marcelo Tosatti, lkml
[-- Attachment #1: Type: text/plain, Size: 1043 bytes --]
On Tue, Jun 26, 2001 at 06:59:11PM +0100, Philip Blundell wrote:
> This would be a bit bad, because it would require people to guess
> whether they might have a card that parport_serial can drive and/or
> try loading the module to see what happens.
Not necessarily. The module has a PCI device table, so a user-space
utility can figure it out and adjust /etc/modules.conf accordingly.
> I guess one option would be for parport_pc to somehow "know" what cards are
> really multi-I/O ones, and only load parport_serial when it will be able to
> find something to do. Doesn't seem all that appealing though.
Replace parport_pc's "knowledge" with parport_serial's PCI device
table and a user-space utility, and that's kind of what I had in
mind.
> If you do that then the code will effectively be there all the time,
> even when it's not needed. You might as well just compile it in to
> parport_pc. To be honest, there isn't all that much of it so maybe
> this wouldn't be such a bad idea.
Perhaps.
Tim.
*/
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread