Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ordering calls to driver's ::start() routine?



Francis Bouchard writes:
> I'm not a guru, but in your probe you could get the PCI slot number or some
> information from the PCI bus telling you the position of your card. From
> there you could set-up your driver properly.
>
> Am I misunderstanding what you want to do ?

No, but that requires me sorting a list and doing some other things
that are moderately tricky.

I figure the whole point of the IOKit interface was to reduce
duplicated code & protect driver authors from themselves, so I was
hoping for an "easy" way to do it. Like "put the following magic in
Info.plist" or something along those lines ;)

If there isn't, then I'll write the code..

Thanks,

Drew


> Regards
> Francis
>
> On 04/02/2002 16:29, "Andrew Gallatin" <email@hidden> wrote:
>
> > I'm working on an IOKit driver for a PCI device. I'm matching on
> > device id / vendor id in info.plist.
> >
> > All was well until I added a second card to the machine (dual g4).
> > When I did this, I noticed that my start() routine was being called in
> > parallel. This is bad because all units share some common data. To
> > fix this, I "locked" the start routine.
> >
> > However, I'm now having a problem where the start() routine is
> > called in a somewhat random order. By this I mean that most times
> > <device>@12 makes it into the start() routine first, but sometimes
> > <device>@14 wins the race. This is a problem because the first
> > device through my start() routine ends up as unit 0, the second as
> > unit 1, etc. I'd really like to keep these unit numbers
> > consistant across reboots.
> >
> > Is there an easy way to make this deterministic?
> >
> > Thanks in advance for your suggestions,
> >
> > Drew
> > _______________________________________________
> > darwin-drivers mailing list | email@hidden
> > Help/Unsubscribe/Archives:
> > http://www.lists.apple.com/mailman/listinfo/darwin-drivers
> > Do not post admin requests to the list. They will be ignored.


References: 
 >ordering calls to driver's ::start() routine? (From: Andrew Gallatin <email@hidden>)
 >Re: ordering calls to driver's ::start() routine? (From: Francis Bouchard <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.