1.\" $NetBSD: iop.4,v 1.6 2001/01/07 16:01:10 ad Exp $ 2.\" 3.\" Copyright (c) 2000 The NetBSD Foundation, Inc. 4.\" All rights reserved. 5.\" 6.\" This code is derived from software contributed to The NetBSD Foundation 7.\" by Andrew Doran. 8.\" 9.\" Redistribution and use in source and binary forms, with or without 10.\" modification, are permitted provided that the following conditions 11.\" are met: 12.\" 1. Redistributions of source code must retain the above copyright 13.\" notice, this list of conditions and the following disclaimer. 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in the 16.\" documentation and/or other materials provided with the distribution. 17.\" 3. All advertising materials mentioning features or use of this software 18.\" must display the following acknowledgement: 19.\" This product includes software developed by the NetBSD 20.\" Foundation, Inc. and its contributors. 21.\" 4. Neither the name of The NetBSD Foundation nor the names of its 22.\" contributors may be used to endorse or promote products derived 23.\" from this software without specific prior written permission. 24.\" 25.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 26.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 27.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 28.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 29.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35.\" POSSIBILITY OF SUCH DAMAGE. 36.\" 37.Dd November 8, 2000 38.Dt IOP 4 39.Os 40.Sh NAME 41.Nm iop 42.Nd 43.Tn I2O adapter driver 44.Sh SYNOPSIS 45.Cd "iop* at pci? dev ? function ?" 46.Cd "iopsp*" at iop? tid ? 47.Cd "ld*" at iop? tid ? 48.Sh DESCRIPTION 49The 50.Nm 51driver provides support for 52.Tn PCI 53adapters conforming to the 54.Tn I2O 55specification, revision 1.5. 56.Sh IOCTL INTERFACE 57The following structures and constants are defined in 58.Pa dev/i2o/i2ovar.h . 59Note that the headers 60.Pa sys/types.h , 61.Pa sys/device.h 62and 63.Pa dev/i2o/i2o.h 64are prerequsites and must therefore be included beforehand. 65.Bl -tag -width OTTF 66.It Dv IOPIOCPT (struct ioppt) 67Submit a message to the IOP and return the reply. Note that the return 68value of this ioctl is not affected by completion status as indicated by the 69reply. 70.Bd -literal 71struct ioppt { 72 void *pt_msg; /* pointer to message buffer */ 73 size_t pt_msglen; /* message buffer size in bytes */ 74 void *pt_reply; /* pointer to reply buffer */ 75 size_t pt_replylen; /* reply buffer size in bytes */ 76 int pt_timo; /* completion timeout in ms */ 77 int pt_nbufs; /* number of transfers */ 78 struct ioppt_buf pt_bufs[IOP_MAX_MSG_XFERS]; /* transfers */ 79}; 80 81struct ioppt_buf { 82 void *ptb_data; /* pointer to buffer */ 83 size_t ptb_datalen; /* buffer size in bytes */ 84 int ptb_out; /* non-zero if transfer is to IOP */ 85}; 86.Ed 87.Pp 88The minimum timeout value that may be specified is 1000ms. All other values 89must not exceed the 90.Nm 91driver's operational limits. 92.It Dv IOPIOCGLCT (struct iovec) 93Retreive the 94.Nm 95driver's copy of the logical configuration table. This copy of the LCT 96matches the current device configuration, but is not necessarily the latest 97available version of the LCT. This ioctl may block while attempting to 98acquire a lock on the LCT, and may fail if the acquisition times out. 99.It Dv IOPIOCGSTATUS (struct iovec) 100Request the latest available status record from the IOP. This special-case 101ioctl is provided as the I2O_EXEC_STATUS_GET message does not post replies, 102and can therefore not be safely issued using the IOPIOCPT ioctl. 103.It Dv IOPIOCRECONFIG 104Request that the 105.Nm 106driver scan all bus ports, retrieve the latest version of the LCT, and 107attach or detach devices as necessary. Note that higher-level 108reconfiguration tasks (such as logically re-scanning SCSI busses) will not 109be performed by this ioctl. 110.It Dv IOPIOCGTIDMAP (struct iovec) 111Retrieve the TID to device map. This map indicates which targets are 112configured, and what the corresponding device name for each is. Although at 113any given point it contains the same number of entries as the LCT, the number 114of entries should be determined using the iov_len field from the returned 115iovec. 116.Bd -literal 117struct iop_tidmap { 118 u_short it_tid; 119 u_short it_flags; 120 char it_dvname[sizeof(((struct device *)NULL)->dv_xname)]; 121}; 122#define IT_CONFIGURED 0x02 /* target configured */ 123.Ed 124.El 125.Sh FILES 126.Bl -tag -width /dev/iopn -compact 127.It Pa /dev/iop Ns Ar u 128control device for IOP unit 129.Ar u 130.El 131.Sh SEE ALSO 132.Xr intro 4 , 133.Xr iopsp 4 , 134.Xr ld 4 , 135.Xr iopctl 8 136.Pp 137http://www.i2osig.org/ 138.Sh AUTHOR 139The 140.Nm 141driver was written by Andrew Doran 142.Aq ad@netbsd.org . 143.Sh HISTORY 144The 145.Nm 146driver first appeared in 147.Nx 1.6 . 148