fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER START
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * The contents of this file are subject to the terms of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Common Development and Distribution License (the "License").
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You may not use this file except in compliance with the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * See the License for the specific language governing permissions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and limitations under the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * When distributing Covered Code, include this CDDL HEADER in each
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * If applicable, add the following below this CDDL HEADER, with the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fields enclosed by brackets "[]" replaced with your own identifying
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * information: Portions Copyright [yyyy] [name of copyright owner]
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER END
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Use is subject to license terms.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Include any headers you depend on.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * I18N message number ranges
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * This file: 19000 - 19499
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Shared common messages: 1 - 1999
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * sys/fc4/fcio.h includes sys/fc4/fcal_linkapp.h. The following #define
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * keeps from actually including the contents of sys/fc4/fcal_linkapp.h
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * since that file contains the same structure definitions as sys/fc4/fcio.h.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* hotplug defines */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* format parameters to dump() */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Persistent Reservation */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Some constants for fabric/public loops */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Max number of retries */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Wait times in microseconds */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define WAIT_FCIO_IOCTL 250000 /* 1/4 of a second */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define WAIT_FCP_IOCTL 250000 /* 1/4 of a second */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define WAIT_OBJECT_OPEN 10000 /* 1/100 of a sec. */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Defines for VS inq_port field on standard page (bit 5 Byte 6 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Macro for deallocating memory pointed by dev_addr pointer
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * of gfc_map_t structure.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * It is defined here to make available at any place from
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * luxadm, liba5k and libg_fc.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Note: The macro will try to free any non-NULL dev_addr.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * So, dev_addr ptr needs to be initialized to NULL.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * map.dev_addr = (gfc_port_dev_info_t *)NULL
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * map->dev_addr = (gfc_port_dev_info_t *)NULL.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FREE_DEV_ADDR(D_PTR) if (D_PTR != NULL) {\
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Constants and macros used by the g_get_path_type() function */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define DEV_PREFIX "/devices/" /* base pathname for devfs names */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define DEV_PREFIX_LEN 9 /* Length of DEV_PREFIX string */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* Can do a strlen and generalize */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* but this is is easier */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Defines for minor names used to append to devfs paths */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Defines for ssd driver name passed to root tree search routines */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Property names
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * mplist structure typedef to support multipath
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* wwn_list_found to track previous calls to g_get_wwn */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Function prototyes defined for libg_fc modules */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern void *g_zalloc(int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern char *g_alloc_string(char *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern void g_destroy_data(void *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_object_open(char *, int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern char *g_scsi_find_command_name(int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte struct scsi_extended_sense *, int, char msg_string[], char *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_machineArch(int *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern void g_free_hotplug_dlist(struct hotplug_disk_list **);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_perf_statistics(char *, uchar_t *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_port_multipath(char *, struct dlist **, int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_start(char *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_stop(char *, int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_reserve(char *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_release(char *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_issue_fcio_ioctl(int, fcio_t *, int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern void g_sort_wwn_list(struct wwn_list_struct **);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern void g_free_wwn_list_found(struct wwn_list_found_struct **);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_scsi_persistent_reserve_in_cmd(int, uchar_t *, int, uchar_t);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_scsi_send_diag_cmd(int, uchar_t *, int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_scsi_rec_diag_cmd(int, uchar_t *, int, uchar_t);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_scsi_writebuffer_cmd(int, int, uchar_t *, int, int, int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_scsi_readbuffer_cmd(int, uchar_t *, int, int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_scsi_inquiry_cmd(int, uchar_t *, int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_scsi_log_sense_cmd(int, uchar_t *, int, uchar_t);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_scsi_mode_select_cmd(int, uchar_t *, int, uchar_t);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_scsi_mode_sense_cmd(int, uchar_t *, int, uchar_t, uchar_t);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_scsi_read_capacity_cmd(int, uchar_t *, int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_scsi_read_capacity_1016_cmd(int, struct scsi_capacity_16 *,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_scsi_release_cmd(int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_scsi_reserve_cmd(int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_scsi_start_cmd(int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_scsi_stop_cmd(int, int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_scsi_tur(int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_scsi_reset(int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_devid_get(char *, ddi_devid_t *, di_node_t root,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte const char *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_lun_str(char *, char *, int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_lun_number(char *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_pathcount(char *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_devices_get_all(struct wwn_list_struct **);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* _G_STATE_H */