15d571944SMatt Jacob /* $FreeBSD$ */ 25d571944SMatt Jacob /* 35d571944SMatt Jacob * Copyright (c) 2001 by Matthew Jacob 45d571944SMatt Jacob * 55d571944SMatt Jacob * Redistribution and use in source and binary forms, with or without 65d571944SMatt Jacob * modification, are permitted provided that the following conditions 75d571944SMatt Jacob * are met: 85d571944SMatt Jacob * 95d571944SMatt Jacob * 1. Redistributions of source code must retain the above copyright 105d571944SMatt Jacob * notice, this list of conditions and the following disclaimer. 115d571944SMatt Jacob * 2. Redistributions in binary form must reproduce the above copyright 125d571944SMatt Jacob * notice, this list of conditions and the following disclaimer in the 135d571944SMatt Jacob * documentation and/or other materials provided with the distribution. 145d571944SMatt Jacob * 155d571944SMatt Jacob * Alternatively, this software may be distributed under the terms of the 165d571944SMatt Jacob * the GNU Public License ("GPL", Library, Version 2). 175d571944SMatt Jacob * 185d571944SMatt Jacob * 195d571944SMatt Jacob * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR 205d571944SMatt Jacob * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 215d571944SMatt Jacob * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 225d571944SMatt Jacob * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 235d571944SMatt Jacob * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 245d571944SMatt Jacob * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 255d571944SMatt Jacob * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 265d571944SMatt Jacob * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 275d571944SMatt Jacob * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 285d571944SMatt Jacob * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 295d571944SMatt Jacob * 305d571944SMatt Jacob * Matthew Jacob <mjacob@feral.com) 315d571944SMatt Jacob * 325d571944SMatt Jacob */ 335d571944SMatt Jacob /* 345d571944SMatt Jacob * ioctl definitions for Qlogic FC/SCSI HBA driver 355d571944SMatt Jacob */ 365d571944SMatt Jacob #define ISP_IOC (021) /* 'Ctrl-Q' */ 375d571944SMatt Jacob 385d571944SMatt Jacob /* 395d571944SMatt Jacob * This ioctl sets/retrieves the debugging level for this hba instance. 405d571944SMatt Jacob * Note that this is not a simple integer level- see ispvar.h for definitions. 415d571944SMatt Jacob * 425d571944SMatt Jacob * The arguments is a pointer to an integer with the new debugging level. 435d571944SMatt Jacob * The old value is written into this argument. 445d571944SMatt Jacob */ 455d571944SMatt Jacob 465d571944SMatt Jacob #define ISP_SDBLEV _IOWR(ISP_IOC, 0, int) 475d571944SMatt Jacob 485d571944SMatt Jacob /* 495d571944SMatt Jacob * This ioctl resets the HBA. Use with caution. 505d571944SMatt Jacob */ 515d571944SMatt Jacob #define ISP_RESETHBA _IO(ISP_IOC, 1) 525d571944SMatt Jacob 535d571944SMatt Jacob /* 545d571944SMatt Jacob * This ioctl performs a fibre chanel rescan. 555d571944SMatt Jacob */ 565d571944SMatt Jacob #define ISP_FC_RESCAN _IO(ISP_IOC, 2) 575d571944SMatt Jacob 585d571944SMatt Jacob /* 595d571944SMatt Jacob * Initiate a LIP 605d571944SMatt Jacob */ 615d571944SMatt Jacob #define ISP_FC_LIP _IO(ISP_IOC, 3) 625d571944SMatt Jacob 635d571944SMatt Jacob /* 645d571944SMatt Jacob * Return the Port Database structure for the named device, or ENODEV if none. 655d571944SMatt Jacob * Caller fills in virtual loopid (0..255), aka 'target'. The driver returns 665d571944SMatt Jacob * ENODEV (if nothing valid there) or the actual loopid (for local loop devices 675d571944SMatt Jacob * only), 24 bit Port ID and Node and Port WWNs. 685d571944SMatt Jacob */ 695d571944SMatt Jacob struct isp_fc_device { 705d571944SMatt Jacob u_int32_t loopid; /* 0..255 */ 715d571944SMatt Jacob u_int32_t portid; /* 24 bit Port ID */ 725d571944SMatt Jacob u_int64_t node_wwn; 735d571944SMatt Jacob u_int64_t port_wwn; 745d571944SMatt Jacob }; 755d571944SMatt Jacob 765d571944SMatt Jacob #define ISP_FC_GETDINFO _IOWR(ISP_IOC, 4, struct isp_fc_device) 77