DEVICE_ATTACH.9 (84306) | DEVICE_ATTACH.9 (128106) |
---|---|
1.\" -*- nroff -*- 2.\" 3.\" Copyright (c) 1998 Doug Rabson 4.\" 5.\" All rights reserved. 6.\" 7.\" This program is free software. 8.\" --- 12 unchanged lines hidden (view full) --- 21.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, 22.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 23.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28.\" | 1.\" -*- nroff -*- 2.\" 3.\" Copyright (c) 1998 Doug Rabson 4.\" 5.\" All rights reserved. 6.\" 7.\" This program is free software. 8.\" --- 12 unchanged lines hidden (view full) --- 21.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, 22.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 23.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28.\" |
29.\" $FreeBSD: head/share/man/man9/DEVICE_ATTACH.9 84306 2001-10-01 16:09:29Z ru $ | 29.\" $FreeBSD: head/share/man/man9/DEVICE_ATTACH.9 128106 2004-04-11 06:37:50Z imp $ |
30.\" 31.Dd June 16, 1998 32.Dt DEVICE_ATTACH 9 33.Os 34.Sh NAME 35.Nm DEVICE_ATTACH 36.Nd attach a device 37.Sh SYNOPSIS 38.In sys/param.h 39.In sys/bus.h 40.Ft int 41.Fn DEVICE_ATTACH "device_t dev" 42.Sh DESCRIPTION 43Attach a device to the system. 44The probe method will have been called and will have indicated that 45the device exists. 46This routine should initialise the hardware and allocate other 47system resources (such as devfs entries). | 30.\" 31.Dd June 16, 1998 32.Dt DEVICE_ATTACH 9 33.Os 34.Sh NAME 35.Nm DEVICE_ATTACH 36.Nd attach a device 37.Sh SYNOPSIS 38.In sys/param.h 39.In sys/bus.h 40.Ft int 41.Fn DEVICE_ATTACH "device_t dev" 42.Sh DESCRIPTION 43Attach a device to the system. 44The probe method will have been called and will have indicated that 45the device exists. 46This routine should initialise the hardware and allocate other 47system resources (such as devfs entries). |
48.Pp 49Devices which implement busses should use this method to probe for 50the existence of devices attached to the bus and add them as 51children. 52If this is combined with the use of 53.Xr bus_generic_attach 9 54the child devices will be automatically probed and attached. |
|
48.Sh RETURN VALUES 49Zero is returned on success, otherwise an appropriate error is returned. 50.Sh SEE ALSO 51.Xr device 9 , 52.Xr DEVICE_DETACH 9 , 53.Xr DEVICE_IDENTIFY 9 , 54.Xr DEVICE_PROBE 9 , 55.Xr DEVICE_SHUTDOWN 9 56.Sh AUTHORS 57This man page was written by 58.An Doug Rabson . | 55.Sh RETURN VALUES 56Zero is returned on success, otherwise an appropriate error is returned. 57.Sh SEE ALSO 58.Xr device 9 , 59.Xr DEVICE_DETACH 9 , 60.Xr DEVICE_IDENTIFY 9 , 61.Xr DEVICE_PROBE 9 , 62.Xr DEVICE_SHUTDOWN 9 63.Sh AUTHORS 64This man page was written by 65.An Doug Rabson . |