* Problem: one driver and 4 instances with different parameters
@ 2007-09-19 6:54 Andrey Kamchatnikov
2007-09-19 7:40 ` Nobin Mathew
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Andrey Kamchatnikov @ 2007-09-19 6:54 UTC (permalink / raw)
To: linux-kernel
Hi,
Could someone to make clear next question:
I have one driver, but I need to run 4 instances of it (I run insmod with
different parameters) .
But when I try to install the second driver I've got an error, that driver
with this name exists.
How can I istall them? I don't want to use 4 different driver's sources.
Thank you,
Andrey
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Problem: one driver and 4 instances with different parameters
2007-09-19 6:54 Problem: one driver and 4 instances with different parameters Andrey Kamchatnikov
@ 2007-09-19 7:40 ` Nobin Mathew
2007-09-19 8:26 ` Andi Kleen
2007-09-19 8:52 ` Andreas Herrmann
2 siblings, 0 replies; 5+ messages in thread
From: Nobin Mathew @ 2007-09-19 7:40 UTC (permalink / raw)
To: Andrey Kamchatnikov; +Cc: linux-kernel
I think you need to modify your driver. So that you need to do only
single insmod. and handle the 4 instances internally.
On 9/19/07, Andrey Kamchatnikov <andrey.kamchatnikov@tec-venture.de> wrote:
> Hi,
>
> Could someone to make clear next question:
>
> I have one driver, but I need to run 4 instances of it (I run insmod with
> different parameters) .
>
> But when I try to install the second driver I've got an error, that driver
> with this name exists.
>
> How can I istall them? I don't want to use 4 different driver's sources.
>
> Thank you,
>
> Andrey
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Problem: one driver and 4 instances with different parameters
2007-09-19 6:54 Problem: one driver and 4 instances with different parameters Andrey Kamchatnikov
2007-09-19 7:40 ` Nobin Mathew
@ 2007-09-19 8:26 ` Andi Kleen
2007-09-19 15:56 ` Randy Dunlap
2007-09-19 8:52 ` Andreas Herrmann
2 siblings, 1 reply; 5+ messages in thread
From: Andi Kleen @ 2007-09-19 8:26 UTC (permalink / raw)
To: Andrey Kamchatnikov; +Cc: linux-kernel
"Andrey Kamchatnikov" <andrey.kamchatnikov@tec-venture.de> writes:
> I have one driver, but I need to run 4 instances of it (I run insmod
> with different parameters) .
>
> But when I try to install the second driver I've got an error, that
> driver with this name exists.
The standard trick to do that is to copy the module binary to four different
names (the module name is not encoded in the binary)
But it would be better to just fix the driver to allow this
with a single instance with some other run time configuration
mechanism and not use module parameters (which
are generally somewhat deprecated anyways)
-Andi
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Problem: one driver and 4 instances with different parameters
2007-09-19 8:26 ` Andi Kleen
@ 2007-09-19 15:56 ` Randy Dunlap
0 siblings, 0 replies; 5+ messages in thread
From: Randy Dunlap @ 2007-09-19 15:56 UTC (permalink / raw)
To: Andi Kleen; +Cc: Andrey Kamchatnikov, linux-kernel
On 19 Sep 2007 10:26:54 +0200 Andi Kleen wrote:
> "Andrey Kamchatnikov" <andrey.kamchatnikov@tec-venture.de> writes:
>
> > I have one driver, but I need to run 4 instances of it (I run insmod
> > with different parameters) .
> >
> > But when I try to install the second driver I've got an error, that
> > driver with this name exists.
>
> The standard trick to do that is to copy the module binary to four different
> names (the module name is not encoded in the binary)
>
> But it would be better to just fix the driver to allow this
> with a single instance with some other run time configuration
> mechanism and not use module parameters (which
> are generally somewhat deprecated anyways)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Eh? Do you mean for IO,mem,irq type settings? If so, then yes, ok.
Otherwise please explain what you mean...
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Problem: one driver and 4 instances with different parameters
2007-09-19 6:54 Problem: one driver and 4 instances with different parameters Andrey Kamchatnikov
2007-09-19 7:40 ` Nobin Mathew
2007-09-19 8:26 ` Andi Kleen
@ 2007-09-19 8:52 ` Andreas Herrmann
2 siblings, 0 replies; 5+ messages in thread
From: Andreas Herrmann @ 2007-09-19 8:52 UTC (permalink / raw)
To: Andrey Kamchatnikov; +Cc: linux-kernel
On Wed, Sep 19, 2007 at 08:54:58AM +0200, Andrey Kamchatnikov wrote:
> I have one driver, but I need to run 4 instances of it (I run insmod with different
> parameters) .
>
> But when I try to install the second driver I've got an error, that driver with this name
> exists.
It might work using modprobe's "--name"-option:
# modprobe -o foo driver
# modprobe -o bar driver
Regards,
Andreas
--
Operating | AMD Saxony Limited Liability Company & Co. KG,
System | Wilschdorfer Landstr. 101, 01109 Dresden, Germany
Research | Register Court Dresden: HRA 4896, General Partner authorized
Center | to represent: AMD Saxony LLC (Wilmington, Delaware, US)
(OSRC) | General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-09-19 15:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-19 6:54 Problem: one driver and 4 instances with different parameters Andrey Kamchatnikov
2007-09-19 7:40 ` Nobin Mathew
2007-09-19 8:26 ` Andi Kleen
2007-09-19 15:56 ` Randy Dunlap
2007-09-19 8:52 ` Andreas Herrmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox