1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27 #ifndef _SYS_1394_ADAPTERS_HCI1394_STATE_H 28 #define _SYS_1394_ADAPTERS_HCI1394_STATE_H 29 30 #pragma ident "%Z%%M% %I% %E% SMI" 31 32 /* 33 * hci1394_state.h 34 * The hci1394 driver soft state structure. 35 */ 36 37 #ifdef __cplusplus 38 extern "C" { 39 #endif 40 41 #include <sys/ddi.h> 42 #include <sys/modctl.h> 43 #include <sys/sunddi.h> 44 #include <sys/types.h> 45 #include <sys/note.h> 46 47 #include <sys/1394/h1394.h> 48 49 #include <sys/1394/adapters/hci1394_drvinfo.h> 50 #include <sys/1394/adapters/hci1394_vendor.h> 51 #include <sys/1394/adapters/hci1394_ohci.h> 52 #include <sys/1394/adapters/hci1394_csr.h> 53 #include <sys/1394/adapters/hci1394_async.h> 54 #include <sys/1394/adapters/hci1394_isoch.h> 55 56 57 /* 58 * hci1394 state structure 59 * put all handles and pointers at the top so it is easier to find things 60 * when debugging 61 */ 62 struct hci1394_state_s { 63 /* various module handles */ 64 hci1394_ohci_handle_t ohci; /* see hci1394_ohci.h */ 65 hci1394_async_handle_t async; /* see hci1394_async.h */ 66 hci1394_vendor_handle_t vendor; /* see hci1394_vendor.h */ 67 hci1394_csr_handle_t csr; /* see hci1394_csr.h */ 68 hci1394_isoch_handle_t isoch; /* see hci1394_isoch.h */ 69 70 /* 71 * This is the address of the buffer we are to copy the selfid info 72 * into. The Services layer will give us this during the Bus Reset 73 * interrupt and we will copy it into the buffer during the selfid 74 * complete interrupt. 75 */ 76 uint32_t *sl_selfid_buf; 77 78 /* 79 * drvinfo contains the core information which is shared among the 80 * various different parts of the this driver. (e.g. dip, instance, 81 * statistics, iblock_cookie, etc.) 82 */ 83 hci1394_drvinfo_t drvinfo; /* see hci1394_drvinfo.h */ 84 85 /* Vendor Information about this adapter */ 86 hci1394_vendor_info_t vendor_info; /* see hci1394_vendor.h */ 87 88 /* attach stuff */ 89 ddi_acc_handle_t pci_config; 90 boolean_t swap_data; 91 92 /* Adapter info passed up to the Services Layer */ 93 h1394_halinfo_t halinfo; /* see h1394.h */ 94 }; 95 96 _NOTE(SCHEME_PROTECTS_DATA("Single thread modifies", \ 97 hci1394_state_s::drvinfo.di_gencnt \ 98 hci1394_state_s::drvinfo.di_stats.st_bus_reset_count \ 99 hci1394_state_s::drvinfo.di_stats.st_selfid_count)) 100 101 #ifdef __cplusplus 102 } 103 #endif 104 105 #endif /* _SYS_1394_ADAPTERS_HCI1394_STATE_H */ 106