1*7c478bd9Sstevel@tonic-gate /* 2*7c478bd9Sstevel@tonic-gate * CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate * 4*7c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate * with the License. 8*7c478bd9Sstevel@tonic-gate * 9*7c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate * and limitations under the License. 13*7c478bd9Sstevel@tonic-gate * 14*7c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate * 20*7c478bd9Sstevel@tonic-gate * CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate */ 22*7c478bd9Sstevel@tonic-gate /* 23*7c478bd9Sstevel@tonic-gate * Copyright 1999-2002 Sun Microsystems, Inc. All rights reserved. 24*7c478bd9Sstevel@tonic-gate * Use is subject to license terms. 25*7c478bd9Sstevel@tonic-gate */ 26*7c478bd9Sstevel@tonic-gate 27*7c478bd9Sstevel@tonic-gate #ifndef _SYS_1394_H1394_H 28*7c478bd9Sstevel@tonic-gate #define _SYS_1394_H1394_H 29*7c478bd9Sstevel@tonic-gate 30*7c478bd9Sstevel@tonic-gate /* 31*7c478bd9Sstevel@tonic-gate * h1394.h 32*7c478bd9Sstevel@tonic-gate * Contains the structure and error codes used to communicate 33*7c478bd9Sstevel@tonic-gate * between the HAL and the rest of the 1394 Software Framework 34*7c478bd9Sstevel@tonic-gate */ 35*7c478bd9Sstevel@tonic-gate 36*7c478bd9Sstevel@tonic-gate #include <sys/types.h> 37*7c478bd9Sstevel@tonic-gate #include <sys/modctl.h> 38*7c478bd9Sstevel@tonic-gate #include <sys/ddi.h> 39*7c478bd9Sstevel@tonic-gate #include <sys/sunddi.h> 40*7c478bd9Sstevel@tonic-gate #include <sys/note.h> 41*7c478bd9Sstevel@tonic-gate 42*7c478bd9Sstevel@tonic-gate #include <sys/1394/cmd1394.h> 43*7c478bd9Sstevel@tonic-gate #include <sys/1394/id1394.h> 44*7c478bd9Sstevel@tonic-gate 45*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 46*7c478bd9Sstevel@tonic-gate extern "C" { 47*7c478bd9Sstevel@tonic-gate #endif 48*7c478bd9Sstevel@tonic-gate 49*7c478bd9Sstevel@tonic-gate #define H1394_CLEANUP_LEVEL7 7 50*7c478bd9Sstevel@tonic-gate #define H1394_CLEANUP_LEVEL6 6 51*7c478bd9Sstevel@tonic-gate #define H1394_CLEANUP_LEVEL5 5 52*7c478bd9Sstevel@tonic-gate #define H1394_CLEANUP_LEVEL4 4 53*7c478bd9Sstevel@tonic-gate #define H1394_CLEANUP_LEVEL3 3 54*7c478bd9Sstevel@tonic-gate #define H1394_CLEANUP_LEVEL2 2 55*7c478bd9Sstevel@tonic-gate #define H1394_CLEANUP_LEVEL1 1 56*7c478bd9Sstevel@tonic-gate #define H1394_CLEANUP_LEVEL0 0 57*7c478bd9Sstevel@tonic-gate 58*7c478bd9Sstevel@tonic-gate /* h1394_phy_t */ 59*7c478bd9Sstevel@tonic-gate typedef enum { 60*7c478bd9Sstevel@tonic-gate H1394_PHY_1995 = 0, 61*7c478bd9Sstevel@tonic-gate H1394_PHY_1394A = 1 62*7c478bd9Sstevel@tonic-gate } h1394_phy_t; 63*7c478bd9Sstevel@tonic-gate 64*7c478bd9Sstevel@tonic-gate /* h1394_error_t */ 65*7c478bd9Sstevel@tonic-gate typedef enum { 66*7c478bd9Sstevel@tonic-gate H1394_LOCK_RESP_ERR = 1, 67*7c478bd9Sstevel@tonic-gate H1394_POSTED_WR_ERR = 2, 68*7c478bd9Sstevel@tonic-gate H1394_SELF_INITIATED_SHUTDOWN = 3, 69*7c478bd9Sstevel@tonic-gate H1394_CYCLE_TOO_LONG = 4 70*7c478bd9Sstevel@tonic-gate } h1394_error_t; 71*7c478bd9Sstevel@tonic-gate 72*7c478bd9Sstevel@tonic-gate /* 73*7c478bd9Sstevel@tonic-gate * h1394_posted_wr_err_t 74*7c478bd9Sstevel@tonic-gate * The upper 16 bits contain the source id (bus/node) of the source node, 75*7c478bd9Sstevel@tonic-gate * the lower 48 bits contain the address that the error occured at. 76*7c478bd9Sstevel@tonic-gate */ 77*7c478bd9Sstevel@tonic-gate typedef struct h1394_posted_wr_err_s { 78*7c478bd9Sstevel@tonic-gate uint64_t addr; 79*7c478bd9Sstevel@tonic-gate } h1394_posted_wr_err_t; 80*7c478bd9Sstevel@tonic-gate 81*7c478bd9Sstevel@tonic-gate /* 82*7c478bd9Sstevel@tonic-gate * h1394_node_pwr_flags_t 83*7c478bd9Sstevel@tonic-gate * Node power flags info 84*7c478bd9Sstevel@tonic-gate */ 85*7c478bd9Sstevel@tonic-gate typedef enum { 86*7c478bd9Sstevel@tonic-gate H1394_NODE_PWR_FLAGS_NONE = (1 << 1), 87*7c478bd9Sstevel@tonic-gate H1394_BUS_PWRD_NODES_ONE_MORE = (1 << 2), 88*7c478bd9Sstevel@tonic-gate H1394_BUS_PWRD_NODES_ONE_LESS = (1 << 3), 89*7c478bd9Sstevel@tonic-gate H1394_ACTIVE_NODES_ONE_MORE = (1 << 4), 90*7c478bd9Sstevel@tonic-gate H1394_ACTIVE_NODES_ONE_LESS = (1 << 5) 91*7c478bd9Sstevel@tonic-gate } h1394_node_pwr_flags_t; 92*7c478bd9Sstevel@tonic-gate 93*7c478bd9Sstevel@tonic-gate /* 94*7c478bd9Sstevel@tonic-gate * h1394_addr_type_t 95*7c478bd9Sstevel@tonic-gate * h1394_addr_map.addr_type 96*7c478bd9Sstevel@tonic-gate */ 97*7c478bd9Sstevel@tonic-gate typedef enum { 98*7c478bd9Sstevel@tonic-gate H1394_ADDR_POSTED_WRITE = 0, 99*7c478bd9Sstevel@tonic-gate H1394_ADDR_NORMAL = 1, 100*7c478bd9Sstevel@tonic-gate H1394_ADDR_CSR = 2, 101*7c478bd9Sstevel@tonic-gate H1394_ADDR_PHYSICAL = 3, 102*7c478bd9Sstevel@tonic-gate H1394_ADDR_RESERVED = 4 103*7c478bd9Sstevel@tonic-gate } h1394_addr_type_t; 104*7c478bd9Sstevel@tonic-gate 105*7c478bd9Sstevel@tonic-gate /* h1394_mblk_t */ 106*7c478bd9Sstevel@tonic-gate typedef struct h1394_mblk_s { 107*7c478bd9Sstevel@tonic-gate mblk_t *curr_mblk; 108*7c478bd9Sstevel@tonic-gate unsigned char *curr_offset; 109*7c478bd9Sstevel@tonic-gate uint_t length; 110*7c478bd9Sstevel@tonic-gate mblk_t *next_mblk; 111*7c478bd9Sstevel@tonic-gate unsigned char *next_offset; 112*7c478bd9Sstevel@tonic-gate } h1394_mblk_t; 113*7c478bd9Sstevel@tonic-gate 114*7c478bd9Sstevel@tonic-gate /* h1394_cmd_priv_t */ 115*7c478bd9Sstevel@tonic-gate typedef struct h1394_cmd_priv_s { 116*7c478bd9Sstevel@tonic-gate uint_t speed; 117*7c478bd9Sstevel@tonic-gate uint_t ack_tstamp; 118*7c478bd9Sstevel@tonic-gate uint_t recv_tstamp; 119*7c478bd9Sstevel@tonic-gate uint_t bus_generation; 120*7c478bd9Sstevel@tonic-gate h1394_mblk_t mblk; 121*7c478bd9Sstevel@tonic-gate void *hal_overhead; 122*7c478bd9Sstevel@tonic-gate } h1394_cmd_priv_t; 123*7c478bd9Sstevel@tonic-gate 124*7c478bd9Sstevel@tonic-gate _NOTE(SCHEME_PROTECTS_DATA("Used by a single thread", h1394_cmd_priv_s \ 125*7c478bd9Sstevel@tonic-gate h1394_mblk_s::next_mblk h1394_mblk_s::next_offset)) 126*7c478bd9Sstevel@tonic-gate 127*7c478bd9Sstevel@tonic-gate /* h1394_evts_t */ 128*7c478bd9Sstevel@tonic-gate typedef struct h1394_evts_s { 129*7c478bd9Sstevel@tonic-gate uint_t hal_version; 130*7c478bd9Sstevel@tonic-gate uint_t reserved; 131*7c478bd9Sstevel@tonic-gate void (*shutdown)(void *hal_private); 132*7c478bd9Sstevel@tonic-gate int (*send_phy_configuration_packet)(void *hal_private, 133*7c478bd9Sstevel@tonic-gate cmd1394_cmd_t *phy_pkt, h1394_cmd_priv_t *cmd_private, 134*7c478bd9Sstevel@tonic-gate int *result); 135*7c478bd9Sstevel@tonic-gate int (*read)(void *hal_private, cmd1394_cmd_t *req, 136*7c478bd9Sstevel@tonic-gate h1394_cmd_priv_t *cmd_private, int *result); 137*7c478bd9Sstevel@tonic-gate int (*read_response)(void *hal_private, cmd1394_cmd_t *resp, 138*7c478bd9Sstevel@tonic-gate h1394_cmd_priv_t *cmd_private, int *result); 139*7c478bd9Sstevel@tonic-gate int (*write)(void *hal_private, cmd1394_cmd_t *req, 140*7c478bd9Sstevel@tonic-gate h1394_cmd_priv_t *cmd_private, int *result); 141*7c478bd9Sstevel@tonic-gate int (*write_response)(void *hal_private, cmd1394_cmd_t *resp, 142*7c478bd9Sstevel@tonic-gate h1394_cmd_priv_t *cmd_private, int *result); 143*7c478bd9Sstevel@tonic-gate void (*response_complete)(void *hal_private, cmd1394_cmd_t *resp, 144*7c478bd9Sstevel@tonic-gate h1394_cmd_priv_t *cmd_private); 145*7c478bd9Sstevel@tonic-gate int (*lock)(void *hal_private, cmd1394_cmd_t *req, 146*7c478bd9Sstevel@tonic-gate h1394_cmd_priv_t *cmd_private, int *result); 147*7c478bd9Sstevel@tonic-gate int (*lock_response)(void *hal_private, cmd1394_cmd_t *resp, 148*7c478bd9Sstevel@tonic-gate h1394_cmd_priv_t *cmd_private, int *result); 149*7c478bd9Sstevel@tonic-gate int (*alloc_isoch_dma)(void *hal_private, 150*7c478bd9Sstevel@tonic-gate id1394_isoch_dmainfo_t *idi, void **hal_idma_handle, 151*7c478bd9Sstevel@tonic-gate int *result); 152*7c478bd9Sstevel@tonic-gate void (*free_isoch_dma)(void *hal_private, 153*7c478bd9Sstevel@tonic-gate void *hal_isoch_dma_handle); 154*7c478bd9Sstevel@tonic-gate int (*start_isoch_dma)(void *hal_private, 155*7c478bd9Sstevel@tonic-gate void *hal_isoch_dma_handle, 156*7c478bd9Sstevel@tonic-gate id1394_isoch_dma_ctrlinfo_t *idma_ctrlinfo, uint_t flags, 157*7c478bd9Sstevel@tonic-gate int *result); 158*7c478bd9Sstevel@tonic-gate void (*stop_isoch_dma)(void *hal_private, void *hal_isoch_dma_handle, 159*7c478bd9Sstevel@tonic-gate int *result); 160*7c478bd9Sstevel@tonic-gate int (*update_isoch_dma)(void *hal_private, 161*7c478bd9Sstevel@tonic-gate void *hal_isoch_dma_handle, 162*7c478bd9Sstevel@tonic-gate id1394_isoch_dma_updateinfo_t *idma_updateinfo, 163*7c478bd9Sstevel@tonic-gate uint_t flags, int *result); 164*7c478bd9Sstevel@tonic-gate int (*update_config_rom)(void *hal_private, void *local_buf, 165*7c478bd9Sstevel@tonic-gate uint_t quadlet_count); 166*7c478bd9Sstevel@tonic-gate int (*bus_reset)(void *hal_private); 167*7c478bd9Sstevel@tonic-gate int (*short_bus_reset)(void *hal_private); 168*7c478bd9Sstevel@tonic-gate int (*set_contender_bit)(void *hal_private); 169*7c478bd9Sstevel@tonic-gate int (*set_root_holdoff_bit)(void *hal_private); 170*7c478bd9Sstevel@tonic-gate int (*set_gap_count)(void *hal_private, uint_t gap_count); 171*7c478bd9Sstevel@tonic-gate int (*csr_read)(void *hal_private, uint_t offset, uint32_t *data); 172*7c478bd9Sstevel@tonic-gate int (*csr_write)(void *hal_private, uint_t offset, uint32_t data); 173*7c478bd9Sstevel@tonic-gate int (*csr_cswap32)(void *hal_private, uint_t generation, 174*7c478bd9Sstevel@tonic-gate uint_t offset, uint32_t compare, uint32_t swap, 175*7c478bd9Sstevel@tonic-gate uint32_t *old); 176*7c478bd9Sstevel@tonic-gate int (*physical_arreq_enable_set)(void *hal_private, uint64_t mask, 177*7c478bd9Sstevel@tonic-gate uint_t generation); 178*7c478bd9Sstevel@tonic-gate int (*physical_arreq_enable_clr)(void *hal_private, uint64_t mask, 179*7c478bd9Sstevel@tonic-gate uint_t generation); 180*7c478bd9Sstevel@tonic-gate void (*node_power_state_change)(void *hal_private, 181*7c478bd9Sstevel@tonic-gate h1394_node_pwr_flags_t nodeflags); 182*7c478bd9Sstevel@tonic-gate } h1394_evts_t; 183*7c478bd9Sstevel@tonic-gate /* Version value for h1394_evts_t */ 184*7c478bd9Sstevel@tonic-gate #define H1394_EVTS_V1 1 185*7c478bd9Sstevel@tonic-gate 186*7c478bd9Sstevel@tonic-gate #define HAL_CALL(hal) (hal)->halinfo.hal_events 187*7c478bd9Sstevel@tonic-gate 188*7c478bd9Sstevel@tonic-gate /* Result field returned by read/write/lock requests */ 189*7c478bd9Sstevel@tonic-gate #define H1394_STATUS_NO_ERROR 0 190*7c478bd9Sstevel@tonic-gate #define H1394_STATUS_INVALID_BUSGEN 1 191*7c478bd9Sstevel@tonic-gate #define H1394_STATUS_EMPTY_TLABEL 2 192*7c478bd9Sstevel@tonic-gate #define H1394_STATUS_NOMORE_SPACE 3 193*7c478bd9Sstevel@tonic-gate #define H1394_STATUS_INTERNAL_ERROR 4 194*7c478bd9Sstevel@tonic-gate 195*7c478bd9Sstevel@tonic-gate /* h1394_addr_map_t */ 196*7c478bd9Sstevel@tonic-gate typedef struct h1394_addr_map_s { 197*7c478bd9Sstevel@tonic-gate uint64_t address; 198*7c478bd9Sstevel@tonic-gate uint64_t length; 199*7c478bd9Sstevel@tonic-gate h1394_addr_type_t addr_type; 200*7c478bd9Sstevel@tonic-gate } h1394_addr_map_t; 201*7c478bd9Sstevel@tonic-gate 202*7c478bd9Sstevel@tonic-gate /* h1394_halinfo_t */ 203*7c478bd9Sstevel@tonic-gate typedef struct h1394_halinfo_s { 204*7c478bd9Sstevel@tonic-gate void *hal_private; 205*7c478bd9Sstevel@tonic-gate dev_info_t *dip; 206*7c478bd9Sstevel@tonic-gate h1394_evts_t hal_events; 207*7c478bd9Sstevel@tonic-gate ddi_iblock_cookie_t hw_interrupt; 208*7c478bd9Sstevel@tonic-gate 209*7c478bd9Sstevel@tonic-gate /* Buffer attributes */ 210*7c478bd9Sstevel@tonic-gate ddi_device_acc_attr_t acc_attr; 211*7c478bd9Sstevel@tonic-gate ddi_dma_attr_t dma_attr; 212*7c478bd9Sstevel@tonic-gate 213*7c478bd9Sstevel@tonic-gate /* Type of PHY on HAL */ 214*7c478bd9Sstevel@tonic-gate h1394_phy_t phy; 215*7c478bd9Sstevel@tonic-gate 216*7c478bd9Sstevel@tonic-gate uint_t hal_overhead; /* in bytes */ 217*7c478bd9Sstevel@tonic-gate uint32_t bus_capabilities; 218*7c478bd9Sstevel@tonic-gate uint64_t guid; 219*7c478bd9Sstevel@tonic-gate uint32_t node_capabilities; 220*7c478bd9Sstevel@tonic-gate 221*7c478bd9Sstevel@tonic-gate /* 222*7c478bd9Sstevel@tonic-gate * The maximum value generation can have before 223*7c478bd9Sstevel@tonic-gate * it rolls over (inclusive) 224*7c478bd9Sstevel@tonic-gate */ 225*7c478bd9Sstevel@tonic-gate uint_t max_generation; 226*7c478bd9Sstevel@tonic-gate 227*7c478bd9Sstevel@tonic-gate /* Description of the 1394 Address Space */ 228*7c478bd9Sstevel@tonic-gate h1394_addr_map_t *addr_map; 229*7c478bd9Sstevel@tonic-gate uint_t addr_map_num_entries; 230*7c478bd9Sstevel@tonic-gate 231*7c478bd9Sstevel@tonic-gate /* Description of the reserved spaces */ 232*7c478bd9Sstevel@tonic-gate h1394_addr_map_t *resv_map; 233*7c478bd9Sstevel@tonic-gate uint_t resv_map_num_entries; 234*7c478bd9Sstevel@tonic-gate } h1394_halinfo_t; 235*7c478bd9Sstevel@tonic-gate 236*7c478bd9Sstevel@tonic-gate 237*7c478bd9Sstevel@tonic-gate /* Calls to Services layer during HAL driver _init() and _fini() */ 238*7c478bd9Sstevel@tonic-gate int h1394_init(struct modlinkage *modlp); 239*7c478bd9Sstevel@tonic-gate void h1394_fini(struct modlinkage *modlp); 240*7c478bd9Sstevel@tonic-gate 241*7c478bd9Sstevel@tonic-gate 242*7c478bd9Sstevel@tonic-gate /* Calls to Services layer during HAL driver attach/detach */ 243*7c478bd9Sstevel@tonic-gate int h1394_attach(h1394_halinfo_t *halinfo, ddi_attach_cmd_t cmd, 244*7c478bd9Sstevel@tonic-gate void **sl_private); 245*7c478bd9Sstevel@tonic-gate 246*7c478bd9Sstevel@tonic-gate int h1394_detach(void **sl_private, ddi_detach_cmd_t cmd); 247*7c478bd9Sstevel@tonic-gate 248*7c478bd9Sstevel@tonic-gate 249*7c478bd9Sstevel@tonic-gate /* Calls to Services layer during HW interrupt processing */ 250*7c478bd9Sstevel@tonic-gate void h1394_cmd_is_complete(void *sl_private, cmd1394_cmd_t *command_id, 251*7c478bd9Sstevel@tonic-gate uint32_t cmd_type, int status); 252*7c478bd9Sstevel@tonic-gate /* Command types (passed to h1394_command_is_complete) */ 253*7c478bd9Sstevel@tonic-gate #define H1394_AT_REQ 0 254*7c478bd9Sstevel@tonic-gate #define H1394_AT_RESP 1 255*7c478bd9Sstevel@tonic-gate /* Command statuses (passed to h1394_command_is_complete) */ 256*7c478bd9Sstevel@tonic-gate #define H1394_CMD_SUCCESS 0x00 /* ack_complete */ 257*7c478bd9Sstevel@tonic-gate #define H1394_CMD_ETIMEOUT 0x01 /* evt_missing_ack */ 258*7c478bd9Sstevel@tonic-gate #define H1394_CMD_EBUSRESET 0x02 /* evt_flushed */ 259*7c478bd9Sstevel@tonic-gate #define H1394_CMD_EDEVICE_BUSY 0x03 /* ack_busy_? */ 260*7c478bd9Sstevel@tonic-gate #define H1394_CMD_EDATA_ERROR 0x04 /* ack_data_error */ 261*7c478bd9Sstevel@tonic-gate #define H1394_CMD_ETYPE_ERROR 0x05 /* ack_type_error */ 262*7c478bd9Sstevel@tonic-gate #define H1394_CMD_EADDR_ERROR 0x06 /* resp_address_error */ 263*7c478bd9Sstevel@tonic-gate #define H1394_CMD_ERSRC_CONFLICT 0x07 /* resp_conflict_error */ 264*7c478bd9Sstevel@tonic-gate #define H1394_CMD_EDEVICE_POWERUP 0x08 /* ack_tardy */ 265*7c478bd9Sstevel@tonic-gate #define H1394_CMD_EDEVICE_ERROR 0x09 /* device error */ 266*7c478bd9Sstevel@tonic-gate #define H1394_CMD_EUNKNOWN_ERROR 0x0A /* unknown error type */ 267*7c478bd9Sstevel@tonic-gate 268*7c478bd9Sstevel@tonic-gate void h1394_bus_reset(void *sl_private, void **selfid_buf_addr); 269*7c478bd9Sstevel@tonic-gate 270*7c478bd9Sstevel@tonic-gate void h1394_self_ids(void *sl_private, void *selfid_buf_addr, 271*7c478bd9Sstevel@tonic-gate uint32_t selfid_size, uint32_t node_id, uint32_t generation_count); 272*7c478bd9Sstevel@tonic-gate 273*7c478bd9Sstevel@tonic-gate void h1394_write_request(void *sl_private, cmd1394_cmd_t *req); 274*7c478bd9Sstevel@tonic-gate 275*7c478bd9Sstevel@tonic-gate void h1394_read_request(void *sl_private, cmd1394_cmd_t *req); 276*7c478bd9Sstevel@tonic-gate 277*7c478bd9Sstevel@tonic-gate void h1394_lock_request(void *sl_private, cmd1394_cmd_t *req); 278*7c478bd9Sstevel@tonic-gate 279*7c478bd9Sstevel@tonic-gate int h1394_alloc_cmd(void *sl_private, uint_t flags, cmd1394_cmd_t **cmdp, 280*7c478bd9Sstevel@tonic-gate h1394_cmd_priv_t **hal_priv_ptr); 281*7c478bd9Sstevel@tonic-gate /* Flags for h1394_alloc_cmd() */ 282*7c478bd9Sstevel@tonic-gate #define H1394_ALLOC_CMD_SLEEP 0x00000000 /* can sleep allocating */ 283*7c478bd9Sstevel@tonic-gate #define H1394_ALLOC_CMD_NOSLEEP 0x00000001 /* don't sleep allocating */ 284*7c478bd9Sstevel@tonic-gate 285*7c478bd9Sstevel@tonic-gate int h1394_free_cmd(void *sl_private, cmd1394_cmd_t **cmdp); 286*7c478bd9Sstevel@tonic-gate int h1394_ioctl(void *sl_private, int cmd, intptr_t arg, int mode, 287*7c478bd9Sstevel@tonic-gate cred_t *cred_p, int *rval_p); 288*7c478bd9Sstevel@tonic-gate 289*7c478bd9Sstevel@tonic-gate void h1394_phy_packet(void *sl_private, uint32_t *packet_data, 290*7c478bd9Sstevel@tonic-gate uint_t quadlet_count, uint_t timestamp); 291*7c478bd9Sstevel@tonic-gate 292*7c478bd9Sstevel@tonic-gate void h1394_error_detected(void *sl_private, h1394_error_t type, void *arg); 293*7c478bd9Sstevel@tonic-gate 294*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 295*7c478bd9Sstevel@tonic-gate } 296*7c478bd9Sstevel@tonic-gate #endif 297*7c478bd9Sstevel@tonic-gate 298*7c478bd9Sstevel@tonic-gate #endif /* _SYS_1394_H1394_H */ 299