driver now enforces correct order of use of INIT_ACCELERANT and CLONE_ACCELERANT: bailing out with B_NOT_ALLOWED if incorrect use is detected.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16020 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rudolf Cornelissen 2006-01-21 14:49:39 +00:00
parent d1c4f04c78
commit 8bde8143eb
1 changed files with 4 additions and 1 deletions

View File

@ -4,7 +4,7 @@
Other authors:
Mark Watson;
Rudolf Cornelissen 3/2002-11/2005.
Rudolf Cornelissen 3/2002-1/2006.
*/
/* standard kernel driver stuff */
@ -984,6 +984,9 @@ static status_t open_hook (const char* name, uint32 flags, void** cookie) {
si->device = di->pcii.device;
si->function = di->pcii.function;
/* ensure that the accelerant's INIT_ACCELERANT function can be executed */
si->accelerant_in_use = false;
/* note the amount of system RAM the system BIOS assigned to the card if applicable:
* unified memory architecture (UMA) */
switch ((((uint32)(si->device_id)) << 16) | si->vendor_id)