Re: parport_pc tries to load parport_serial automatically

2001-07-04 Thread Tim Waugh

On Wed, Jul 04, 2001 at 01:38:13PM +0100, Alan Cox wrote:

> Can hotplug handle this from a PCI id table ?

There is a PCI id table in parport_serial, yes (if that's what you're
asking).

Tim.
*/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: parport_pc tries to load parport_serial automatically

2001-07-04 Thread Alan Cox

> -#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  <[EMAIL PROTECTED]>
> +
> + * 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 ?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: parport_pc tries to load parport_serial automatically

2001-07-04 Thread Tim Waugh

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  <[EMAIL PROTECTED]>

* 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 (_pc_pci_driver);
 
-#ifdef CONFIG_PARPORT_SERIAL_MODULE
-   if (!ret)
-   request_module ("parport_serial");
-#endif
-
return ret;
 }
 
--- linux/drivers/parport/ChangeLog.origWed 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  <[EMAIL PROTECTED]>
+
+   * 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.
+
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: parport_pc tries to load parport_serial automatically

2001-07-04 Thread Tim Waugh

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  [EMAIL PROTECTED]

* 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.origWed 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  [EMAIL PROTECTED]
+
+   * 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.
+
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: parport_pc tries to load parport_serial automatically

2001-07-04 Thread Tim Waugh

On Wed, Jul 04, 2001 at 01:38:13PM +0100, Alan Cox wrote:

 Can hotplug handle this from a PCI id table ?

There is a PCI id table in parport_serial, yes (if that's what you're
asking).

Tim.
*/
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: parport_pc tries to load parport_serial automatically

2001-07-04 Thread Alan Cox

 -#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  [EMAIL PROTECTED]
 +
 + * 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 ?

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: parport_pc tries to load parport_serial automatically

2001-06-27 Thread Marcelo Tosatti



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 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: parport_pc tries to load parport_serial automatically

2001-06-27 Thread Marcelo Tosatti



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 

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: parport_pc tries to load parport_serial automatically

2001-06-26 Thread Tim Waugh

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

 PGP signature


Re: parport_pc tries to load parport_serial automatically

2001-06-26 Thread Philip Blundell

>- 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.



 PGP signature


Re: parport_pc tries to load parport_serial automatically

2001-06-26 Thread Tim Waugh

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

 PGP signature


Re: parport_pc tries to load parport_serial automatically

2001-06-26 Thread Marcelo Tosatti



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.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: parport_pc tries to load parport_serial automatically

2001-06-26 Thread Simon Huggins

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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: parport_pc tries to load parport_serial automatically

2001-06-26 Thread Simon Huggins

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 /**
[EMAIL PROTECTED]   */  flaws" - Kryten /***
Black Cat Networks /  /
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: parport_pc tries to load parport_serial automatically

2001-06-26 Thread Tim Waugh

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,...})?

- 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.

- parport_serial could be made to initialise successfully even if it
  doesn't see any devices that it can drive.

What do people think?

Tim.
*/

 PGP signature


parport_pc tries to load parport_serial automatically

2001-06-26 Thread Marcelo Tosatti


Hi, 


parport_pc is now trying to load parport_serial.o at init_module() time.
~
If the initialization of parport_serial fails, we obviously get an error
message, which is really annoying:

0x378: FIFO is 16 bytes
0x378: writeIntrThreshold is 16
0x378: readIntrThreshold is 16
parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE,COMPAT,ECP]
parport0: irq 7 detected
insmod: /lib/modules/2.4.5-5cl/kernel/drivers/parport/parport_serial.o: init_module: 
No such device
insmod: Hint: insmod errors can be caused by incorrect module parameters, including 
invalid IO or IRQ parameters

Why it tries to load parport_serial ? 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: parport_pc tries to load parport_serial automatically

2001-06-26 Thread Tim Waugh

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,...})?

- 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.

- parport_serial could be made to initialise successfully even if it
  doesn't see any devices that it can drive.

What do people think?

Tim.
*/

 PGP signature


Re: parport_pc tries to load parport_serial automatically

2001-06-26 Thread Simon Huggins

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 /**
[EMAIL PROTECTED]   */  flaws - Kryten /***
Black Cat Networks /  /
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: parport_pc tries to load parport_serial automatically

2001-06-26 Thread Simon Huggins

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
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: parport_pc tries to load parport_serial automatically

2001-06-26 Thread Marcelo Tosatti



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.


-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: parport_pc tries to load parport_serial automatically

2001-06-26 Thread Tim Waugh

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

 PGP signature


Re: parport_pc tries to load parport_serial automatically

2001-06-26 Thread Philip Blundell

- 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.



 PGP signature


Re: parport_pc tries to load parport_serial automatically

2001-06-26 Thread Tim Waugh

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

 PGP signature