Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jul 1997 21:33:47 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, se@FreeBSD.ORG
Cc:        hackers@FreeBSD.ORG, hasty@rah.star-gate.com, luigi@labinfo.iet.unipi.it, multimedia@FreeBSD.ORG, rhh@ct.picker.com
Subject:   Re: snd driver attach routine
Message-ID:  <199707211133.VAA10007@godzilla.zeta.org.au>

index | next in thread | raw e-mail

>> >Problem: what should be the return type of *attach() routines ?
>> 
>> Perhaps it should be void to match reality, but it currently must be
>> int for isa drivers to match the prototype in `struct isa_driver'.
>> 
>> >The drivers in /sys/pci all return void for the attach routine.
>> 
>> They have to, to match the prototype in `strcuct pci_driver'.
>
>I could easily change the return type of 
>the PCI attach function. Should I ???

If anything is attached above the driver level, then you need a status
from the driver attach to decide whether to clean up or attach more.
For ISA, only interrupts are attached at a high level, but they shouldn't
be, so ISA attach function shouldn't need to return status (but they
should clean up if they fail).  I'm not sure about PCI.

Bruce


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199707211133.VAA10007>