There are good reasons for wanting to know information about your board location.
For instance, there is a weakness in the consecutive numbered naming strategy.
For example, say you have a system with two of your boards installed and you declare them as dev0 and dev1.
Well if on a subsequent reboot the h/w for dev0 fails in a way that you don’t detect it any longer, you will end up calling the h/w for the device that is still working dev0. Now this can have some serious consequences (for instance say this was a disk controller or network card). Now there is a potential that your drive letters get remapped or your network card gets a different IP address (really bad stuff).
What you can do is use the bus and device information (if you have a PCI card) to build your device names. Unfortunately there is no Windows mechanism (to my knowledge) to determine the actual physical slot corresponding to your bus and slot numbers. This information is known by the BIOS or motherboard manufacturer. I don’t believe it is passed to the HAL. You could of course empirically determine the bus/device to physical slot for a particular model of h/w, but you’ll be in the business of having to do this for every model platform you plan to support.
Duane.
-----Original Message-----
From: Ashok Kumar [mailto:xxxxx@rassit.com]
Sent: Thursday, March 13, 2003 11:30 PM
To: NT Developers Interest List
Subject: [ntdev] Re: Finding Physical Slot Number in NT4
Thank u guys for all the help
hey Gary i’ll convince my pointy haired Boss(as u say it) somehow that this
cannot be done
----- Original Message -----
From: “Gary G. Little”
Newsgroups: ntdev
To: “NT Developers Interest List”
Sent: Friday, March 14, 2003 1:44 AM
Subject: [ntdev] Re: Finding Physical Slot Number in NT4
> I ask again … Why does the DRIVER care? I can see the service or
> application layers carring, but not the driver. The driver is a valve
> controlling the flow of data to and from a piece of hardware.
>
> The absolute best way is to have a protocol that includes an INQURY
command
> where each attached device identifies itself when queried by services or
> applications above the driver, aka SCSI or SDLC or HDLC or a dozen other
> protocols.
>
> Barring that, and your pointy haired boss probably won’t understand nor
like
> it, you could always pop the cover, install one board and say “Ok this is
> the left one connected to Widget342”, then install the other board and say
> “this is the right one connected to Widget15482”. Of course if your PCI
> boards are installed in a vertical riser, as in a DELL Optiplex, then you
> can say this is the upper one and this is the lower one. That’s cheaper
than
> blinking lights.
>
> –
> Gary G. Little
> Have Computer, Will Travel …
> 909-698-3191
> 909-551-2105
> http://www.wd-3.com
>
> “Ashok Kumar” wrote in message news:xxxxx@ntdev…
> >
> > Hey gary…i have created a unique symbol name for each device…
> > Ok…let me brief you about the setup…
> > I have 2 PCI cards in my system. The PCI cards each have a data cable
> > connected to them, which is connected to other devices…
> > When i send some data through an application to one of the PCI cards,
how
> do
> > i know on which of the 2 data cables i receive data so that i can
connect
> > the appropriate data cable to the other end…
> > I shouldnt be making trial and errors and then select the appropriate
> > cable…
> > thats the reason i want to identify the physical slot numbers on the
> > motherboard and connect the appropriate cable…
> > Now i think it would be clear to you what i exactly want
> >
> > Now as far as the device objects, extension and interrupts are
concerned,
> i
> > have done exactly as u have said…
> >
> > Ashok
> >
> >
> > ----- Original Message -----
> > From: “Gary G. Little”
> > Newsgroups: ntdev
> > To: “NT Developers Interest List”
> > Sent: Thursday, March 13, 2003 12:01 PM
> > Subject: [ntdev] Re: Finding Physical Slot Number in NT4
> >
> >
> > > I think I’ll stand behind my first response.
> > >
> > > I’ve seen motherboards wired such that smaller numbers ascended from
the
> > > power supply outboard … others numbered the other way. Overall it
> should
> > > not matter on a PCI bus which slot you physically occupy. I asume you
> > create
> > > a unique symbolic name for each device, and that an application will
> open
> > > each unique device name to get to the external whatsits. If the
whatsits
> > are
> > > the same thing, why should the driver care? I can see the APPLICATION
> > caring
> > > to make sure that data desginated for whatsit01 does not go to
whatsit02
> > …
> > > but why does the DRIVER care? If the application says aend this to
> > whatsit01
> > > it better send it to whatsit01. If the application gets an intgerrupt
on
> > > whatsit02 it should store the data some how in a buffer or queue in
> > > whatsit02 and when an application asks for the data the driver gives
it
> > the
> > > proper data.
> > >
> > > Oh … you should create a device object and extension for each
device,
> > and
> > > each device should have it’s own interrupt, as well as send/receive
> queues
> > > or buffers.
> > >
> > > I’ve done precisely what you are describing, from NT4 through WDM and
> XP,
> > > supporting 4 identical fibre channel cards … and never needed the
slot
> > > number.
> > >
> > > –
> > > Gary G. Little
> > > Have Computer, Will Travel …
> > > 909-698-3191
> > > 909-551-2105
> > > http://www.wd-3.com
> > >
> > > “Ashok Kumar” wrote in message
> news:xxxxx@ntdev…
> > > >
> > > > For this very reason i want to know the physical slot.
> > > > I have 2 similar cards connected externally to 2 seperate devices
> > > > then how do i identify to which iam reading/writing.
> > > > I donot have any LED indication on the cards.
> > > > Any suggestions on HowTo achieve this???
> > > >
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: “Justin Schoenwald”
> > > > To: “NT Developers Interest List”
> > > > Sent: Wednesday, March 12, 2003 11:37 PM
> > > > Subject: [ntdev] Re: Finding Physical Slot Number in NT4
> > > >
> > > >
> > > > > Gary wrote:
> > > > >
> > > > > >> Why bother? You really really don’t even need the slot
> information
> > > > > since IRP_MN_START_DEVICE >> gives you the BARS for that device.
> Slot
> > > > > information is fairly well deprecatred and simply not used >> in
> 2000
> > > and
> > > > > above.
> > > > >
> > > > > True, for most real-life situations. But say I have two similar
> boards
> > > > that
> > > > > connect to separate external devices. Due to the lack of a
reliable
> > > > > solution (known by me, anyway) I’ve resorted to flashing LED’s on
> the
> > > > > boards to help.
> > > > >
> > > > > Justin
> > > > >
> > > > >
> > > > >
> > > > > —
> > > > > You are currently subscribed to ntdev as: xxxxx@rassit.com
> > > > > To unsubscribe send a blank email to
> xxxxx@lists.osr.com
> > > > >
> > > > >
> > > > > THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY
FOR
> > THE
> > > > ADDRESSEE
> > > > > and may contain confidential and privileged information. If the
> reader
> > > of
> > > > this message
> > > > > is not the intended recipient, you are notified that any
> > dissemination,
> > > > distribution
> > > > > or copy of this communication is strictly Prohibited.If you have
> > > received
> > > > this message
> > > > > by error, please notify the sender immediately, return the
original
> > mail
> > > > to the sender
> > > > > and delete the message from your system.
> > > > >
> > > > >
> > > >
> > > >
> > > > THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR
> THE
> > > ADDRESSEE
> > > > and may contain confidential and privileged information. If the
reader
> > of
> > > this message
> > > > is not the intended recipient, you are notified that any
> dissemination,
> > > distribution
> > > > or copy of this communication is strictly Prohibited.If you have
> > received
> > > this message
> > > > by error, please notify the sender immediately, return the original
> mail
> > > to the sender
> > > > and delete the message from your system.
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > > —
> > > You are currently subscribed to ntdev as: xxxxx@rassit.com
> > > To unsubscribe send a blank email to xxxxx@lists.osr.com
> > >
> > >
> > > THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR
THE
> > ADDRESSEE
> > > and may contain confidential and privileged information. If the reader
> of
> > this message
> > > is not the intended recipient, you are notified that any
dissemination,
> > distribution
> > > or copy of this communication is strictly Prohibited.If you have
> received
> > this message
> > > by error, please notify the sender immediately, return the original
mail
> > to the sender
> > > and delete the message from your system.
> > >
> > >
> >
> >
> > THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE
> ADDRESSEE
> > and may contain confidential and privileged information. If the reader
of
> this message
> > is not the intended recipient, you are notified that any dissemination,
> distribution
> > or copy of this communication is strictly Prohibited.If you have
received
> this message
> > by error, please notify the sender immediately, return the original mail
> to the sender
> > and delete the message from your system.
> >
> >
> >
> >
> >
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@rassit.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE
ADDRESSEE
> and may contain confidential and privileged information. If the reader of
this message
> is not the intended recipient, you are notified that any dissemination,
distribution
> or copy of this communication is strictly Prohibited.If you have received
this message
> by error, please notify the sender immediately, return the original mail
to the sender
> and delete the message from your system.
>
>
THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE ADDRESSEE
and may contain confidential and privileged information. If the reader of this message
is not the intended recipient, you are notified that any dissemination, distribution
or copy of this communication is strictly Prohibited.If you have received this message
by error, please notify the sender immediately, return the original mail to the sender
and delete the message from your system.
—
You are currently subscribed to ntdev as: xxxxx@infiniconsys.com
To unsubscribe send a blank email to xxxxx@lists.osr.com