Discussion:
same driver for 2 same ISA based hardware
(too old to reply)
dsrking
2010-09-28 14:21:17 UTC
Permalink
Hi

I have two same hardware. is it possible to load a same driver for
these two devices and use at same time?

I am using kmdf driver model for amcc5933 sample and my device is ISA
device.

Is there any change in driver code to load a same driver to 2
hardware?

Regards,
D.
Don Burn
2010-09-28 14:36:33 UTC
Permalink
The same image of the driver will be used for both devices. Your
EvtAddDevice callback will be called once for each device.


Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Post by dsrking
Hi
I have two same hardware. is it possible to load a same driver for
these two devices and use at same time?
I am using kmdf driver model for amcc5933 sample and my device is ISA
device.
Is there any change in driver code to load a same driver to 2
hardware?
Regards,
D.
dsrking
2010-09-28 15:00:32 UTC
Permalink
thanks doron,

So i need to indicate the both devices ID in a single .inf file or it
should be in two different .inf file?

Regards,
D
Don Burn
2010-09-28 15:12:00 UTC
Permalink
You need to have both in the same INF file.


Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Post by dsrking
thanks doron,
So i need to indicate the both devices ID in a single .inf file or it
should be in two different .inf file?
Regards,
D
dsrking
2010-09-28 15:19:40 UTC
Permalink
thanks doron,

i will check it and let u know.

Regards,
D.
Ali
2010-09-29 16:34:12 UTC
Permalink
Post by dsrking
thanks doron,
i will check it and let u know.
Regards,
D.
Calls must be asynchronous! and firmware of ISA gadget shouldn't do
any locking mechanism. Let the host do the preemption.

ali
Tim Roberts
2010-10-01 05:43:44 UTC
Permalink
Post by Ali
Post by dsrking
i will check it and let u know.
Calls must be asynchronous! and firmware of ISA gadget shouldn't do
any locking mechanism. Let the host do the preemption.
What on earth are you talking about? Your post doesn't have anything to do
with the topic in this thread.
--
Tim Roberts, ***@probo.com
Providenza & Boekelheide, Inc.
dsrking
2010-10-08 05:40:04 UTC
Permalink
Hi Doron,

Finally, i tested my non pnp driver and i got some observations below,

1. When i gave Memory address in .inf file ( MemConfig ), the driver
loading shows 'there is no enough space" error message but the same
memory address is hardcodded in my driver (amcc5933 sample),the driver
gets loaded and am able to read and write in the registers. So i can't
load the same driver (.sys) for 2 deivces (but memory address is
different).

2. So I loaded the driver for my 2 similar devices by loading 2
different .inf file. It is loaded and device manager shows 2 devices.
But the problem is, i can access the last loaded driver only through
my application. I am not able to access the first driver what i am
loading.

my procedure is correct or am doing something wrong?

Thanks in Advance.

Regards,
D.
dsrking
2010-10-08 05:40:13 UTC
Permalink
Hi Doron,

Finally, i tested my non pnp driver and i got some observations below,

1. When i gave Memory address in .inf file ( MemConfig ), the driver
loading shows 'there is no enough space" error message but the same
memory address is hardcodded in my driver (amcc5933 sample),the driver
gets loaded and am able to read and write in the registers. So i can't
load the same driver (.sys) for 2 deivces (but memory address is
different).

2. So I loaded the driver for my 2 similar devices by loading 2
different .inf file. It is loaded and device manager shows 2 devices.
But the problem is, i can access the last loaded driver only through
my application. I am not able to access the first driver what i am
loading.

my procedure is correct or am doing something wrong?

Thanks in Advance.

Regards,
D.
dsrking
2010-10-08 05:40:20 UTC
Permalink
Hi Doron,

Finally, i tested my non pnp driver and i got some observations below,

1. When i gave Memory address in .inf file ( MemConfig ), the driver
loading shows 'there is no enough space" error message but the same
memory address is hardcodded in my driver (amcc5933 sample),the driver
gets loaded and am able to read and write in the registers. So i can't
load the same driver (.sys) for 2 deivces (but memory address is
different).

2. So I loaded the driver for my 2 similar devices by loading 2
different .inf file. It is loaded and device manager shows 2 devices.
But the problem is, i can access the last loaded driver only through
my application. I am not able to access the first driver what i am
loading.

my procedure is correct or am doing something wrong?

Thanks in Advance.

Regards,
D.
dsrking
2010-10-08 05:40:30 UTC
Permalink
Hi Doron,

Finally, i tested my non pnp driver and i got some observations below,

1. When i gave Memory address in .inf file ( MemConfig ), the driver
loading shows 'there is no enough space" error message but the same
memory address is hardcodded in my driver (amcc5933 sample),the driver
gets loaded and am able to read and write in the registers. So i can't
load the same driver (.sys) for 2 deivces (but memory address is
different).

2. So I loaded the driver for my 2 similar devices by loading 2
different .inf file. It is loaded and device manager shows 2 devices.
But the problem is, i can access the last loaded driver only through
my application. I am not able to access the first driver what i am
loading.

my procedure is correct or am doing something wrong?

Thanks in Advance.

Regards,
D.
Don Burn
2010-10-08 21:06:38 UTC
Permalink
You should never hardcode the address in the driver. On problem 1, I
suspect you are putting in the INF for more memory than the card has,
and hitting the next card's address space.

For problem 2, how are you naming your devices? There are two of them
and they need separate names, and separate symbolic links for each.


Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Post by dsrking
Hi Doron,
Finally, i tested my non pnp driver and i got some observations below,
1. When i gave Memory address in .inf file ( MemConfig ), the driver
loading shows 'there is no enough space" error message but the same
memory address is hardcodded in my driver (amcc5933 sample),the driver
gets loaded and am able to read and write in the registers. So i can't
load the same driver (.sys) for 2 deivces (but memory address is
different).
2. So I loaded the driver for my 2 similar devices by loading 2
different .inf file. It is loaded and device manager shows 2 devices.
But the problem is, i can access the last loaded driver only through
my application. I am not able to access the first driver what i am
loading.
my procedure is correct or am doing something wrong?
Thanks in Advance.
Regards,
D.
senthil raj
2010-10-08 06:55:08 UTC
Permalink
Hi ,

This thread is continuous one of below thread,

http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/9ca100f606f19ba5/06ccb8307569eb68?lnk=raot#06ccb8307569eb68

Finally, i tested my non pnp driver and i got some observations below,

1. When i gave Memory address in .inf file ( MemConfig ), the driver
loading shows 'there is no enough space" error message but the same
memory address is hardcodded in my driver (amcc5933 sample),the driver
gets loaded and am able to read and write in the registers. So i can't
load the same driver (.sys) for 2 deivces (but memory address is
different).

2. So I loaded the driver for my 2 similar devices by loading 2
different .inf file. It is loaded and device manager shows 2 devices.
But the problem is, i can access the last loaded driver only through
my application. I am not able to access the first driver what i am
loading.

my procedure is correct or am doing something wrong?

Thanks in Advance.

Regards,
D.
dsrking
2010-10-08 05:54:14 UTC
Permalink
Hi,

This thread is continuous of below thread,

http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/9ca100f606f19ba5

Finally, i tested my non pnp driver and i got some observations below,

1. When i gave Memory address in .inf file ( MemConfig ), the driver
loading shows 'there is no enough space" error message but the same
memory address is hardcodded in my driver (amcc5933 sample),the driver
gets loaded and am able to read and write in the registers. So i can't
load the same driver (.sys) for 2 deivces (but memory address is
different).

2. So I loaded the driver for my 2 similar devices by loading 2
different .inf file. It is loaded and device manager shows 2 devices.
But the problem is, i can access the last loaded driver only through
my application. I am not able to access the first driver what i am
loading.

my procedure is correct or am doing something wrong?

Thanks in Advance.

Regards,
D.
Tim Roberts
2010-10-10 00:21:28 UTC
Permalink
Post by dsrking
2. So I loaded the driver for my 2 similar devices by loading 2
different .inf file. It is loaded and device manager shows 2 devices.
But the problem is, i can access the last loaded driver only through
my application. I am not able to access the first driver what i am
loading.
HOW are you "accessing" the driver through your application? If you, for
example, are creating a single symbolic link, then only one driver can own
a symbolic link.

If you need multiple drivers accessible from user mode, then you either
need to use a device interface, or use sequentially numbered symbolic link
names based on the number of instances. For example,
\DosDevices\MyDevice0, \DosDevices\MyDevice1, etc.
--
Tim Roberts, ***@probo.com
Providenza & Boekelheide, Inc.
dsrking
2010-10-14 08:46:56 UTC
Permalink
Hi to all,

Sorry for a late reply.

First of all i want to check with case 1. i.e., same .inf and .sys
file for 2 similar hardware with 2 different address.

I took the amcc5933 sample code from wdk. From this i have following
doubts,

1. in .inf file, where we need to declare it is a 2 interface of same
driver?
2. what are all the changes in driver code to load as 2 interfaces?

Thanks,
D.
dsrking
2010-10-14 09:42:11 UTC
Permalink
Hi,

i changed my .inf file to like below,

%S5933DK1.DRVDESC%= S5933DK1_Inst, *WCO5933
%S5933DK2.DRVDESC%= S5933DK2_Inst,
*ABC ; MY ADDED ENTRY

and copied everything from S5933DK1_Inst and rename to S5933DK2_Inst.

for install,

devcon install amcc5933.inf "*WCO5933"
devcon install amcc5933.inf "*ABC"

This installs 2 driver in device manager and i am able to see 2 times
add device routine called in debug view.

Note: i didn't use any memory/Io resources for this driver. it looks
like template driver.

Again i am checking with memory resouces and get back to u.

Thanks,
D.

Loading...